From 81340970ae816579d5edf7739e11ae0a58e3cb6a Mon Sep 17 00:00:00 2001 From: fan Date: Tue, 13 Jun 2023 11:16:32 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=98=E5=88=B6=E5=AE=8C=E6=AF=95=E9=80=89?= =?UTF-8?q?=E4=B8=AD=E5=9B=BE=E5=BD=A2=E7=8A=B6=E6=80=81=E6=B6=88=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/graphics/signal/SignalDrawAssistant.ts | 2 +- src/layouts/DrawLayout.vue | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/graphics/signal/SignalDrawAssistant.ts b/src/graphics/signal/SignalDrawAssistant.ts index 605cf78..7556589 100644 --- a/src/graphics/signal/SignalDrawAssistant.ts +++ b/src/graphics/signal/SignalDrawAssistant.ts @@ -23,7 +23,7 @@ export class SignalDraw extends GraphicDrawAssistant< app, new SignalTemplate(), createData, - 'svguse:../drawIcon.svg#icon-signal', + 'svguse: /drawIcon.svg#icon-signal', '信号机Signal' ); diff --git a/src/layouts/DrawLayout.vue b/src/layouts/DrawLayout.vue index 7677be4..6b93952 100644 --- a/src/layouts/DrawLayout.vue +++ b/src/layouts/DrawLayout.vue @@ -169,7 +169,7 @@ import { } from 'src/drawApp'; import { JlDrawApp } from 'src/jl-graphic'; import { useDrawStore } from 'src/stores/draw-store'; -import { onMounted, onUnmounted, reactive, ref } from 'vue'; +import { onMounted, onUnmounted, reactive, ref, watch } from 'vue'; import { useRoute, useRouter } from 'vue-router'; import { errorNotify, successNotify } from 'src/utils/CommonNotify'; import { saveAsDraft } from 'src/api/DraftApi'; @@ -180,6 +180,15 @@ const router = useRouter(); const drawStore = useDrawStore(); +watch( + () => drawStore.drawMode, + (drawMode) => { + if (!drawMode) { + selectUtil.value = ''; + } + } +); + const leftDrawerOpen = ref(false); const rightDrawerOpen = ref(false); function toggleRightDrawer() {