fix: fix outline-tree initialization failed

This commit is contained in:
LeoYuan 袁力皓 2022-05-13 14:11:45 +08:00
parent 28afa05543
commit a2d5c6fd90
2 changed files with 6 additions and 2 deletions

View File

@ -60,7 +60,7 @@ export class OutlineMain implements ISensor, ITreeBoard, IScrollable {
return false;
}
inited = true;
const designer = await editor.onceGot(Designer);
const designer = await editor.onceGot('designer');
this.setupDesigner(designer);
};

View File

@ -117,8 +117,12 @@ export default class ComponentMeta {
* @param parent
* @returns
*/
checkNestingDown(my: Node | NodeData, target: NodeSchema | Node | NodeSchema[]) {
checkNestingDown(my: Node | NodeData, target: NodeSchema | Node | NodeSchema[]) {
const curNode = my.isNode ? my[nodeSymbol] : my;
return this[componentMetaSymbol].checkNestingDown(curNode as any, target[nodeSymbol] || target);
}
refreshMetadata() {
this[componentMetaSymbol].refreshMetadata();
}
}