refactor: 优化标题修改,防止修改标题时切换视图出现修改标题与视图不对应情况

This commit is contained in:
wangjiahao 2022-09-21 15:44:53 +08:00
parent cfd30ffa87
commit 19128021f9
2 changed files with 5 additions and 3 deletions

View File

@ -815,11 +815,13 @@ export default {
e.stopPropagation()
// pageX pageY
this.element.auxiliaryMatrix && this.$emit('elementMouseDown', e)
this.$store.commit('setCurComponent', { component: this.element, index: this.index })
//
this.mobileLayoutStatus && this.$store.commit('topComponent')
eventsFor = events.mouse
this.elementDown(e)
this.$nextTick(()=>{
this.$store.commit('setCurComponent', { component: this.element, index: this.index })
})
},
//
elementDown(e) {

View File

@ -1817,9 +1817,9 @@ export default {
viewEditSave(this.panelInfo.id, viewSave)
if (modifyName === 'color') {
bus.$emit('view-in-cache', { type: 'styleChange', viewId: this.param.id, viewInfo: view, refreshProp: 'customAttr' })
bus.$emit('view-in-cache', { type: 'styleChange', viewId: this.view.id, viewInfo: view, refreshProp: 'customAttr' })
} else {
bus.$emit('view-in-cache', { type: 'styleChange', viewId: this.param.id, viewInfo: view })
bus.$emit('view-in-cache', { type: 'styleChange', viewId: this.view.id, viewInfo: view })
}
},