diff --git a/frontend/src/components/DeDrag/index.vue b/frontend/src/components/DeDrag/index.vue index d232e01bf5..515f573c62 100644 --- a/frontend/src/components/DeDrag/index.vue +++ b/frontend/src/components/DeDrag/index.vue @@ -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) { diff --git a/frontend/src/views/chart/view/ChartEdit.vue b/frontend/src/views/chart/view/ChartEdit.vue index e876b24dc4..68085f2936 100644 --- a/frontend/src/views/chart/view/ChartEdit.vue +++ b/frontend/src/views/chart/view/ChartEdit.vue @@ -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 }) } },