mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-20 07:14:23 +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 属性
|
* 构造 items 属性,同时构造 maps 属性
|
||||||
*/
|
*/
|
||||||
@computed private get items(): Prop[] | null {
|
private get items(): Prop[] | null {
|
||||||
if (this._items) return this._items;
|
if (this._items) return this._items;
|
||||||
return runInAction(() => {
|
return runInAction(() => {
|
||||||
let items: Prop[] | null = null;
|
let items: Prop[] | null = null;
|
||||||
@ -617,9 +617,11 @@ export class Prop implements IPropParent {
|
|||||||
if (this._items) {
|
if (this._items) {
|
||||||
this._items.forEach((item) => item.purge());
|
this._items.forEach((item) => item.purge());
|
||||||
}
|
}
|
||||||
|
this._items = null;
|
||||||
this._maps = null;
|
this._maps = null;
|
||||||
if (this._slotNode && this._slotNode.slotFor === this) {
|
if (this._slotNode && this._slotNode.slotFor === this) {
|
||||||
this._slotNode.remove();
|
this._slotNode.remove();
|
||||||
|
this._slotNode = undefined;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user