fix: tabs初始化条件报错

This commit is contained in:
fit2cloud-chenyw 2022-02-24 18:11:49 +08:00
parent 527f5daac2
commit 1072f14204
2 changed files with 4 additions and 2 deletions

View File

@ -52,7 +52,7 @@
:is-edit="isEdit"
:active="active"
:element="item.content"
:filters="filterMap[item.content.propValue && item.content.propValue.viewId]"
:filters="filterMap[item.content.propValue && item.content.propValue.viewId] || []"
:out-style="outStyle"
/>
</div>

View File

@ -48,7 +48,9 @@ export const buildFilterMap = panelItems => {
}
if (element.type === 'de-tabs') {
element.options.tabList && element.options.tabList.forEach(tab => {
result[tab.content.propValue.viewId] = []
if (tab.content.propValue && tab.content.propValue.viewId) {
result[tab.content.propValue.viewId] = []
}
})
}
})