From 0a63bf4e88e4ffc96579640ed536e01d5c4bccae Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Thu, 24 Feb 2022 12:33:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20tabs=E7=BB=84=E4=BB=B6=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E8=A7=86=E5=9B=BE=E5=85=A8=E5=B1=8F=E9=A2=84=E8=A7=88=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/widget/DeWidget/DeTabs.vue | 28 +++++++++++++++++-- frontend/src/utils/conditionUtil.js | 5 ++++ 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/widget/DeWidget/DeTabs.vue b/frontend/src/components/widget/DeWidget/DeTabs.vue index b2b7c38d4e..4e2b9b92b2 100644 --- a/frontend/src/components/widget/DeWidget/DeTabs.vue +++ b/frontend/src/components/widget/DeWidget/DeTabs.vue @@ -35,7 +35,26 @@
- + +
@@ -96,7 +115,7 @@ import bus from '@/utils/bus' import componentList from '@/components/canvas/custom-component/component-list' import { mapState } from 'vuex' import { chartCopy } from '@/api/chart/chart' - +import { buildFilterMap } from '@/utils/conditionUtil' export default { name: 'DeTabls', components: { ViewSelect }, @@ -142,7 +161,12 @@ export default { panelInfo() { return this.$store.state.panel.panelInfo }, + filterMap() { + const map = buildFilterMap(this.componentData) + return map + }, ...mapState([ + 'componentData', 'curComponent', 'mobileLayoutStatus' ]) diff --git a/frontend/src/utils/conditionUtil.js b/frontend/src/utils/conditionUtil.js index a0cbea5ccf..1d0428841d 100644 --- a/frontend/src/utils/conditionUtil.js +++ b/frontend/src/utils/conditionUtil.js @@ -46,6 +46,11 @@ export const buildFilterMap = panelItems => { if (element.type === 'view') { result[element.propValue.viewId] = [] } + if (element.type === 'de-tabs') { + element.options.tabList && element.options.tabList.forEach(tab => { + result[tab.content.propValue.viewId] = [] + }) + } }) panelItems.forEach(element => { if (element.type !== 'custom') {