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 = []