From 77b37920af92960445a6ae5bf85cf1ca14a48d7d Mon Sep 17 00:00:00 2001 From: sakuya <81883387@qq.com> Date: Mon, 19 Jul 2021 22:40:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=B4=E6=97=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/tags.vue | 2 +- src/views/template/list/save.vue | 20 +++++++++++++++----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/layout/components/tags.vue b/src/layout/components/tags.vue index 0dfb3d2a..38cc6b8b 100644 --- a/src/layout/components/tags.vue +++ b/src/layout/components/tags.vue @@ -44,7 +44,7 @@ //判断标签容器是否出现滚动条 this.$nextTick(() => { const tags = this.$refs.tags - if(tags.scrollWidth > tags.clientWidth){ + if(tags && tags.scrollWidth > tags.clientWidth){ //确保当前标签在可视范围内 let targetTag = tags.querySelector(".active") targetTag.scrollIntoView() diff --git a/src/views/template/list/save.vue b/src/views/template/list/save.vue index 581c2c96..e929858f 100644 --- a/src/views/template/list/save.vue +++ b/src/views/template/list/save.vue @@ -9,8 +9,12 @@