Merge pull request #1819 from dataease/pr@dev@fix_tabs_init_error

fix: tabs初始化条件报错
This commit is contained in:
fit2cloud-chenyw 2022-02-24 18:13:11 +08:00 committed by GitHub
commit a52d4bfa13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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] = []
}
})
}
})