From 2beaa6c99eedb4922097dd7862bac4a4cb7b8b66 Mon Sep 17 00:00:00 2001 From: "lihao.ylh" Date: Mon, 29 Nov 2021 15:13:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A7=BB=E9=99=A4=20prop=20items=20cach?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/designer/src/document/node/props/prop.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/designer/src/document/node/props/prop.ts b/packages/designer/src/document/node/props/prop.ts index ac836fb06..a558aa70a 100644 --- a/packages/designer/src/document/node/props/prop.ts +++ b/packages/designer/src/document/node/props/prop.ts @@ -379,10 +379,7 @@ export class Prop implements IPropParent { * 构造 items 属性,同时构造 maps 属性 */ @computed private get items(): Prop[] | null { - // 当类型为 list 时,只要有 _items,直接返回,不再重新构造 - if (this._type === 'list' && this._items) return this._items; - // 当类型为 map 时,_items 和 _maps 理论上都应该存在,数量一致时,可以不再重新构造 - if (this._type === 'map' && this._items && this._items.length === this._maps?.size) return this._items; + if (this._items) return this._items; return runInAction(() => { let items: Prop[] | null = []; if (this._type === 'list') {