From 222ba6565d2723a33261ff9f2499401ee8b9f486 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Wed, 31 Aug 2022 14:47:44 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF-=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E5=99=A8):=20=E4=BB=AA=E8=A1=A8=E6=9D=BF=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E7=8A=B6=E6=80=81=E4=B8=8B=E5=88=87=E6=8D=A2=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E5=B8=83=E5=B1=80=E5=86=8D=E5=88=87=E5=9B=9E=E6=9D=A5?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E5=99=A8=E9=80=BB=E8=BE=91=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/store/index.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/frontend/src/store/index.js b/frontend/src/store/index.js index f83f7a7acc..91207ad0ea 100644 --- a/frontend/src/store/index.js +++ b/frontend/src/store/index.js @@ -244,6 +244,21 @@ const data = { }) }, + clearAllViewFilter(state) { + state.componentData.forEach(item => { + if (item.type === 'view' && item.filters && item.filters.length) { + item.filters = [] + } + if (item.type === 'de-tabs' && item.options.tabList && item.options.tabList.length) { + item.options.tabList.forEach(tab => { + if (tab.content && tab.content.type === 'view' && tab.content.filters && tab.content.filters.length) { + tab.content.filters = [] + } + }) + } + }) + }, + addViewFilter(state, data) { const condition = formatCondition(data) const vValid = valueValid(condition) @@ -505,6 +520,7 @@ const data = { }, // 启用移动端布局 openMobileLayout(state) { + this.commit('clearAllViewFilter') state.componentDataCache = null state.componentDataCache = JSON.stringify(state.componentData) state.pcComponentData = state.componentData