fix(视图): 修复设置默认时间后手动清除默认时间再复制视图显示数据依然是默认时间设置的数据

This commit is contained in:
wangjiahao 2022-12-16 13:42:13 +08:00
parent 8cc8541bdb
commit 00864766c0
2 changed files with 10 additions and 2 deletions

View File

@ -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',

View File

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