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 @@