From b931da354d56ef45185e71c59094ba8293c13c54 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Fri, 22 Mar 2024 15:51:49 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=BD=93=E4=BB=AA=E8=A1=A8=E6=9D=BF=E5=AD=98=E5=9C=A8?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=8C=89=E9=92=AE=E6=97=B6,=E5=8F=98?= =?UTF-8?q?=E5=8A=A8=E7=AA=97=E5=8F=A3=E5=A4=A7=E5=B0=8F=E4=BC=9A=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E8=A7=86=E5=9B=BE=E9=87=8D=E6=96=B0=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E4=B8=94=E6=9C=AA=E5=8A=A0=E8=BF=87=E6=BB=A4=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/canvas/components/editor/Preview.vue | 2 +- .../src/components/canvas/customComponent/UserView.vue | 1 + core/frontend/src/store/index.js | 9 +++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/core/frontend/src/components/canvas/components/editor/Preview.vue b/core/frontend/src/components/canvas/components/editor/Preview.vue index a47e9c757f..e95a517e29 100644 --- a/core/frontend/src/components/canvas/components/editor/Preview.vue +++ b/core/frontend/src/components/canvas/components/editor/Preview.vue @@ -313,7 +313,7 @@ export default { scaleWidth: '100', scaleHeight: '100', timer: null, - componentDataShow: null, + componentDataShow: [], mainWidth: '100%', mainHeight: '100%', searchCount: 0, diff --git a/core/frontend/src/components/canvas/customComponent/UserView.vue b/core/frontend/src/components/canvas/customComponent/UserView.vue index 5854d1fafa..904fe21254 100644 --- a/core/frontend/src/components/canvas/customComponent/UserView.vue +++ b/core/frontend/src/components/canvas/customComponent/UserView.vue @@ -946,6 +946,7 @@ export default { } if (this.isFirstLoad) { this.element.filters = this.filter.filter?.length ? JSON.parse(JSON.stringify(this.filter.filter)) : [] + this.$store.commit('setViewInitFilter', this.element) } method(id, this.panelInfo.id, requestInfo).then(response => { try { diff --git a/core/frontend/src/store/index.js b/core/frontend/src/store/index.js index 433c78b878..32d675aa4d 100644 --- a/core/frontend/src/store/index.js +++ b/core/frontend/src/store/index.js @@ -938,6 +938,15 @@ const data = { if (state.lastValidFilters[id]) { delete state.lastValidFilters[id] } + }, + setViewInitFilter(state, viewInfo) { + if (viewInfo) { + state.componentData.forEach(component => { + if (viewInfo.id === component.id) { + component.filters = viewInfo.filters + } + }) + } } }, modules: {