mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-12 08:58:15 +00:00
refactor: 简化 prop.items 的生成逻辑
This commit is contained in:
parent
93f7de0309
commit
2c14e7515b
@ -379,7 +379,7 @@ export class Prop implements IPropParent {
|
||||
/**
|
||||
* 构造 items 属性,同时构造 maps 属性
|
||||
*/
|
||||
@computed private get items(): Prop[] | null {
|
||||
private get items(): Prop[] | null {
|
||||
if (this._items) return this._items;
|
||||
return runInAction(() => {
|
||||
let items: Prop[] | null = null;
|
||||
@ -617,9 +617,11 @@ export class Prop implements IPropParent {
|
||||
if (this._items) {
|
||||
this._items.forEach((item) => item.purge());
|
||||
}
|
||||
this._items = null;
|
||||
this._maps = null;
|
||||
if (this._slotNode && this._slotNode.slotFor === this) {
|
||||
this._slotNode.remove();
|
||||
this._slotNode = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user