From 00864766c0e5c0d3448c7e8f0faaacce423b907b Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Fri, 16 Dec 2022 13:42:13 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=A7=86=E5=9B=BE):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E9=BB=98=E8=AE=A4=E6=97=B6=E9=97=B4=E5=90=8E?= =?UTF-8?q?=E6=89=8B=E5=8A=A8=E6=B8=85=E9=99=A4=E9=BB=98=E8=AE=A4=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E5=86=8D=E5=A4=8D=E5=88=B6=E8=A7=86=E5=9B=BE=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=95=B0=E6=8D=AE=E4=BE=9D=E7=84=B6=E6=98=AF=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E6=97=B6=E9=97=B4=E8=AE=BE=E7=BD=AE=E7=9A=84=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/canvas/customComponent/UserView.vue | 7 ++++++- frontend/src/store/index.js | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/canvas/customComponent/UserView.vue b/frontend/src/components/canvas/customComponent/UserView.vue index 5e0ef1e4df..eab9fd0802 100644 --- a/frontend/src/components/canvas/customComponent/UserView.vue +++ b/frontend/src/components/canvas/customComponent/UserView.vue @@ -350,6 +350,10 @@ export default { }, computed: { + //首次加载且非编辑状态新复制的视图,使用外部filter + initLoad() { + return !(this.isEdit && this.currentCanvasNewId.includes(this.element.id)) && this.isFirstLoad + }, scaleCoefficient() { if (this.terminal === 'pc' && !this.mobileLayoutStatus) { return 1.1 @@ -396,7 +400,7 @@ export default { }, filter() { const filter = {} - filter.filter = this.isFirstLoad ? this.filters : this.cfilters + filter.filter = this.initLoad ? this.filters : this.cfilters filter.linkageFilters = this.element.linkageFilters filter.outerParamsFilters = this.element.outerParamsFilters filter.drill = this.drillClickDimensionList @@ -455,6 +459,7 @@ export default { return this.element.commonBackground && this.element.commonBackground.innerPadding || 0 }, ...mapState([ + 'currentCanvasNewId', 'nowPanelTrackInfo', 'nowPanelJumpInfo', 'publicLinkStatus', diff --git a/frontend/src/store/index.js b/frontend/src/store/index.js index 52dae89a39..fda7afc92e 100644 --- a/frontend/src/store/index.js +++ b/frontend/src/store/index.js @@ -151,7 +151,8 @@ const data = { height: 0 }, previewVisible: false, - previewComponentData: [] + previewComponentData: [], + currentCanvasNewId: [] }, mutations: { ...animation.mutations, @@ -271,6 +272,7 @@ const data = { state.componentData.splice(index, 0, component) } else { state.componentData.push(component) + state.currentCanvasNewId.push(component.id) } this.commit('setCurComponent', { component: component, index: index || state.componentData.length - 1 }) }, @@ -749,6 +751,7 @@ const data = { this.commit('clearLinkageSettingInfo', false) this.commit('resetViewEditInfo') this.commit('initCurMultiplexingComponents') + state.currentCanvasNewId = [] state.batchOptStatus = false // Currently selected components state.curBatchOptComponents = []