fix: 移除 prop items cache

This commit is contained in:
lihao.ylh 2021-11-29 15:13:33 +08:00
parent cd9a991fbb
commit 2beaa6c99e

View File

@ -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') {