From 6ceddf85e44915ebb25a5aba4057280da5cf9c2c Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Sat, 9 Oct 2021 18:22:11 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=A2=9E=E5=8A=A0=E8=A7=86?= =?UTF-8?q?=E5=9B=BE=E7=9A=84=E5=88=86=E5=B8=83=E6=96=B9=E5=BC=8F=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/canvas/components/Editor/EditBar.vue | 10 ++++++++-- frontend/src/store/index.js | 3 +++ frontend/src/views/chart/view/DrillPath.vue | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/canvas/components/Editor/EditBar.vue b/frontend/src/components/canvas/components/Editor/EditBar.vue index dafc32b7dd..7b6529a0af 100644 --- a/frontend/src/components/canvas/components/Editor/EditBar.vue +++ b/frontend/src/components/canvas/components/Editor/EditBar.vue @@ -15,10 +15,10 @@ - + - + @@ -61,6 +61,7 @@ export default { return { componentType: null, linkageActiveStatus: false, + auxiliaryMatrix: false, editFilter: [ 'view', 'custom' @@ -84,6 +85,9 @@ export default { linkageInfo() { return this.targetLinkageInfo[this.element.propValue.viewId] }, + mounted() { + this.auxiliaryMatrix = this.$store.state.curComponent.auxiliaryMatrix + }, ...mapState([ 'menuTop', 'menuLeft', @@ -108,12 +112,14 @@ export default { this.curComponent.style.width = this.curComponent.sizex * this.curCanvasScale.matrixStyleOriginWidth this.curComponent.style.height = this.curComponent.sizey * this.curCanvasScale.matrixStyleOriginHeight this.curComponent.auxiliaryMatrix = false + this.auxiliaryMatrix = false } else { this.curComponent.x = Math.round(this.curComponent.style.left / this.curCanvasScale.matrixStyleOriginWidth) + 1 this.curComponent.y = Math.round(this.curComponent.style.top / this.curCanvasScale.matrixStyleOriginHeight) + 1 this.curComponent.sizex = Math.round(this.curComponent.style.width / this.curCanvasScale.matrixStyleOriginWidth) this.curComponent.sizey = Math.round(this.curComponent.style.height / this.curCanvasScale.matrixStyleOriginHeight) this.curComponent.auxiliaryMatrix = true + this.auxiliaryMatrix = true } this.$store.state.styleChangeTimes++ bus.$emit('auxiliaryMatrixChange') diff --git a/frontend/src/store/index.js b/frontend/src/store/index.js index d2a0ffca4a..7f7ddac0cd 100644 --- a/frontend/src/store/index.js +++ b/frontend/src/store/index.js @@ -94,6 +94,9 @@ const data = { dragging: false, resizing: false } + if (!component.auxiliaryMatrix) { + component['auxiliaryMatrix'] = false + } } state.styleChangeTimes = 0 state.curComponent = component diff --git a/frontend/src/views/chart/view/DrillPath.vue b/frontend/src/views/chart/view/DrillPath.vue index b3370eae0d..868ddf9b35 100644 --- a/frontend/src/views/chart/view/DrillPath.vue +++ b/frontend/src/views/chart/view/DrillPath.vue @@ -13,7 +13,7 @@ export default { props: { drillFilters: { type: Array, - required: true + default: () => [] } }, data() {