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

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
            }
          }
        })
      }
    },

​

​

Logo

快速构建 Web 应用程序

更多推荐