From 6526bf06edbbe36f84d93f7d2016f2fa4d137dfa Mon Sep 17 00:00:00 2001 From: pipipi-pikachu Date: Sat, 15 Jan 2022 16:34:53 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E5=BD=A2=E7=8A=B6=E9=80=89=E4=B8=AD?= =?UTF-8?q?=E8=8C=83=E5=9B=B4=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/components/element/LineElement/index.vue | 2 +- src/views/components/element/ShapeElement/index.vue | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/views/components/element/LineElement/index.vue b/src/views/components/element/LineElement/index.vue index 0c987ee4..0bff8139 100644 --- a/src/views/components/element/LineElement/index.vue +++ b/src/views/components/element/LineElement/index.vue @@ -10,6 +10,7 @@
diff --git a/src/views/components/element/ShapeElement/index.vue b/src/views/components/element/ShapeElement/index.vue index 730b599a..b8153439 100644 --- a/src/views/components/element/ShapeElement/index.vue +++ b/src/views/components/element/ShapeElement/index.vue @@ -44,6 +44,7 @@ :transform="`scale(${elementInfo.width / elementInfo.viewBox}, ${elementInfo.height / elementInfo.viewBox}) translate(0,0) matrix(1,0,0,1,0,0)`" > -
+
.editable-element-shape { position: absolute; + pointer-events: none; &.lock .element-content { cursor: default; @@ -215,6 +217,10 @@ export default defineComponent({ transform-origin: 0 0; overflow: visible; } + + .shape-path { + pointer-events: all; + } } .shape-text { position: absolute; @@ -227,6 +233,11 @@ export default defineComponent({ padding: 10px; line-height: 1.2; word-break: break-word; + pointer-events: none; + + &.editable { + pointer-events: all; + } &.top { justify-content: flex-start;