From faa3690f8094c92f5a04435fde042f3006e59c46 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Mon, 29 Mar 2021 15:50:52 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E6=94=B9topology=E5=9B=BE?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E7=BC=A9=E6=94=BE=E6=97=B6=20=E7=BC=A9?= =?UTF-8?q?=E6=94=BE=E6=98=BE=E7=A4=BA=E6=B2=A1=E6=9C=89=E7=9B=B8=E5=BA=94?= =?UTF-8?q?=E5=8F=98=E5=8C=96=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/common/project/L5/CanvasProps.vue | 1 + .../components/common/project/L5/topologyTopTool.vue | 3 +-- .../src/components/common/project/topologyL5.vue | 11 +++++++---- .../src/components/common/project/topologyPrev.vue | 11 +++++++---- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/nezha-fronted/src/components/common/project/L5/CanvasProps.vue b/nezha-fronted/src/components/common/project/L5/CanvasProps.vue index d0d176760..4575750b9 100644 --- a/nezha-fronted/src/components/common/project/L5/CanvasProps.vue +++ b/nezha-fronted/src/components/common/project/L5/CanvasProps.vue @@ -1245,6 +1245,7 @@ export default { }, onClickName (name) { this.pen.name = name + // this.pen.calcControlPoints() this.drowdown = 0 if (this.selection.pen) { this.selection.pen.name = name diff --git a/nezha-fronted/src/components/common/project/L5/topologyTopTool.vue b/nezha-fronted/src/components/common/project/L5/topologyTopTool.vue index 4ed39a69c..1502cc0b3 100644 --- a/nezha-fronted/src/components/common/project/L5/topologyTopTool.vue +++ b/nezha-fronted/src/components/common/project/L5/topologyTopTool.vue @@ -109,14 +109,13 @@ export default { const dataOption = getTopology(this.index).data Object.keys(this.option).forEach(key => { if (key === 'scale') { - this.scaleNum = (JSON.stringify(dataOption[key]) ? dataOption[key] * 100 : this.scaleNum) + this.scaleNum = (JSON.stringify(dataOption[key]) ? parseInt(dataOption[key] * 100) : this.scaleNum) } else { this.option[key] = (JSON.stringify(dataOption[key]) ? dataOption[key] : this.option[key]) } }) }, methods: { - // todo 1清空后的 处理属性工具的默认值 2工具栏的移动 以及节点工具和属性工具的移动 3 结束箭头类型的方向 changeOption (key) { getTopology(this.index).data[key] = this.option[key] getTopology(this.index).render() diff --git a/nezha-fronted/src/components/common/project/topologyL5.vue b/nezha-fronted/src/components/common/project/topologyL5.vue index fba8a02c8..b77195792 100644 --- a/nezha-fronted/src/components/common/project/topologyL5.vue +++ b/nezha-fronted/src/components/common/project/topologyL5.vue @@ -81,7 +81,7 @@ { + this.toolShow.topTool = false + this.$nextTick(() => { this.toolShow.attr = true + this.toolShow.topTool = true }) if (data) { this.notModuleIDArr.forEach(item => { @@ -1418,7 +1421,7 @@ export default { } case 'scale': { if (this.$refs.topTool) { - this.$refs.topTool.option.scale = data + this.$refs.topTool.scaleNum = parseInt(data * 100) } break } diff --git a/nezha-fronted/src/components/common/project/topologyPrev.vue b/nezha-fronted/src/components/common/project/topologyPrev.vue index 94b0599ea..a87cb23e2 100644 --- a/nezha-fronted/src/components/common/project/topologyPrev.vue +++ b/nezha-fronted/src/components/common/project/topologyPrev.vue @@ -81,7 +81,7 @@ { + this.toolShow.topTool = false + this.$nextTick(() => { this.toolShow.attr = true + this.toolShow.topTool = true }) if (data) { this.notModuleIDArr.forEach(item => { @@ -1418,7 +1421,7 @@ } case 'scale': { if (this.$refs.topTool) { - this.$refs.topTool.option.scale = data + this.$refs.topTool.scaleNum = parseInt(data * 100) } break }