From b23dd3d8f0e28a68e103e539fe509e4f7e678e1b Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Tue, 12 Oct 2021 18:38:33 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=B8=BB=E9=A2=98=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E4=BF=AE=E6=94=B9=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/canvas/components/Editor/index.vue | 2 +- frontend/src/components/canvas/index.vue | 2 +- frontend/src/views/panel/SubjectSetting/PreSubject/Slider.vue | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/canvas/components/Editor/index.vue b/frontend/src/components/canvas/components/Editor/index.vue index e2e7b17f93..220fd6f346 100644 --- a/frontend/src/components/canvas/components/Editor/index.vue +++ b/frontend/src/components/canvas/components/Editor/index.vue @@ -296,7 +296,7 @@ function fillPositionBox(maxY) { function removeItemFromPositionBox(item) { const pb = positionBox // console.log('removeItem=>x:' + item.x + ';y:' + item.y + ';sizex:' + item.sizex + ';sizey:' + item.sizey) - if (item.x <= 0 || item.y <= 0) return + if (!item || item.x <= 0 || item.y <= 0) return for (let i = item.x - 1; i < item.x - 1 + item.sizex; i++) { for (let j = item.y - 1; j < item.y - 1 + item.sizey; j++) { if (pb[j][i]) { diff --git a/frontend/src/components/canvas/index.vue b/frontend/src/components/canvas/index.vue index bbdf3fc9fb..201d42e639 100644 --- a/frontend/src/components/canvas/index.vue +++ b/frontend/src/components/canvas/index.vue @@ -55,7 +55,7 @@ export default { created() { this.restore() // 全局监听按键事件 - listenGlobalKeyDown() + // listenGlobalKeyDown() }, methods: { restore() { diff --git a/frontend/src/views/panel/SubjectSetting/PreSubject/Slider.vue b/frontend/src/views/panel/SubjectSetting/PreSubject/Slider.vue index f26f152376..48f0109df6 100644 --- a/frontend/src/views/panel/SubjectSetting/PreSubject/Slider.vue +++ b/frontend/src/views/panel/SubjectSetting/PreSubject/Slider.vue @@ -12,7 +12,7 @@
-
    +
    • { + this.sliders = [] this.sliders = response.data this.slidersLoading = false }).catch(() => {