From 1072f142040f69f50e522f6f53eaf86734557513 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Thu, 24 Feb 2022 18:11:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20tabs=E5=88=9D=E5=A7=8B=E5=8C=96=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/widget/DeWidget/DeTabs.vue | 2 +- frontend/src/utils/conditionUtil.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/widget/DeWidget/DeTabs.vue b/frontend/src/components/widget/DeWidget/DeTabs.vue index 4e2b9b92b2..fb40d17deb 100644 --- a/frontend/src/components/widget/DeWidget/DeTabs.vue +++ b/frontend/src/components/widget/DeWidget/DeTabs.vue @@ -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" /> diff --git a/frontend/src/utils/conditionUtil.js b/frontend/src/utils/conditionUtil.js index 1d0428841d..cc48c9e150 100644 --- a/frontend/src/utils/conditionUtil.js +++ b/frontend/src/utils/conditionUtil.js @@ -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] = [] + } }) } })