refactor: rename append to appendTo

This commit is contained in:
AncTe committed 2025-05-21 18:12:44 +08:00
1 parent 771e61e6aa
commit 5cd00534c0
11 files changed
+35 -36

No files matched your search

+3 -3
View File
@@ -58,7 +58,7 @@ export class Container<E extends EContainerEvent = EContainerEvent>
*/
appendChild(...children: RenderItem<any>[]) {
children.forEach(v => {
v.append(this);
v.appendTo(this);
});
this.requestSort();
this.update(this);
@@ -77,8 +77,8 @@ export class Container<E extends EContainerEvent = EContainerEvent>
this.update(this);
}
append(parent: RenderItem): void {
super.append(parent);
appendTo(parent: RenderItem): void {
super.appendTo(parent);
if (this.root) {
const root = this.root;
this.forEachChild(ele => {
+1 -1
View File
@@ -728,7 +728,7 @@ export abstract class RenderItem<E extends ERenderItemEvent = ERenderItemEvent>
* 将这个渲染元素添加到其他父元素上
* @param parent 父元素
*/
append(parent: RenderItem) {
appendTo(parent: RenderItem) {
this.remove();
parent.children.add(this);
this._parent = parent;