若依框架左侧菜单栏报错: “TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterato

 若依框架点击左侧菜单栏,会有以下报错信息。。

Error in nextTick: “TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterato

找到src\layout\components\TagsView\index.vue(加上一个判断 if (tags))

​
​
 moveToCurrentTag() {
      const tags = this.$refs.tag
      if (tags) {
        this.$nextTick(() => {
          for (const tag of tags) {
            if (tag.to.path === this.$route.path) {
              this.$refs.scrollPane.moveToTarget(tag)
              // when query is different then update
              if (tag.to.fullPath !== this.$route.fullPath) {
                this.$store.dispatch('tagsView/updateVisitedView', this.$route)
              }
              break
            }
          }
        })
      }
    },

​

​

猜你喜欢

转载自blog.csdn.net/weixin_58101575/article/details/121670863