From 2c14e7515b4fdb87dd56e6a94b5281424a3c1e97 Mon Sep 17 00:00:00 2001 From: "lihao.ylh" Date: Wed, 29 Dec 2021 19:22:07 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E7=AE=80=E5=8C=96=20prop.items=20?= =?UTF-8?q?=E7=9A=84=E7=94=9F=E6=88=90=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/designer/src/document/node/props/prop.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/designer/src/document/node/props/prop.ts b/packages/designer/src/document/node/props/prop.ts index 4c83a4d76..3da3b153e 100644 --- a/packages/designer/src/document/node/props/prop.ts +++ b/packages/designer/src/document/node/props/prop.ts @@ -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; } }