From 19128021f9589b6a5a337c54e7ec120c3c87ce9a Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Wed, 21 Sep 2022 15:44:53 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=E6=A0=87?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E6=94=B9=EF=BC=8C=E9=98=B2=E6=AD=A2=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=A0=87=E9=A2=98=E6=97=B6=E5=88=87=E6=8D=A2=E8=A7=86?= =?UTF-8?q?=E5=9B=BE=E5=87=BA=E7=8E=B0=E4=BF=AE=E6=94=B9=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E4=B8=8E=E8=A7=86=E5=9B=BE=E4=B8=8D=E5=AF=B9=E5=BA=94=E6=83=85?= =?UTF-8?q?=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/DeDrag/index.vue | 4 +++- frontend/src/views/chart/view/ChartEdit.vue | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) 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 }) } },