fix: 处理复杂 prop 对象在 dispose 时没有清除子对象中的 slot 实例

This commit is contained in:
lihao.ylh 2021-07-30 11:17:17 +08:00
parent 901510f326
commit 9babbe7f9c
2 changed files with 2 additions and 1 deletions

View File

@ -590,7 +590,7 @@ export class Prop implements IPropParent {
}
this._maps = null;
if (this._slotNode && this._slotNode.slotFor === this) {
this._slotNode.purge();
this._slotNode.remove();
}
}

View File

@ -95,6 +95,7 @@ export type RootSchema = PageSchema | ComponentSchema | BlockSchema;
export interface SlotSchema extends NodeSchema {
componentName: 'Slot';
name?: string;
params?: string[];
}