若依框架点击左侧菜单栏,会有以下报错信息。。Error in nextTick: “TypeError: undefined is not iterable (cannot read property Symbol


 

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

moveToCurrentTag() {
      const tags = this.$refs.tag;
      // 解决 undefined is not iterable 
      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
            }
          }
        })
       }
    },
 

https://blog.csdn.net/weixin_58101575/article/details/121670863?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522164015484316780274156516%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=164015484316780274156516&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduend~default-2-121670863.first_rank_v2_pc_rank_v29&utm_term=+undefined+is+not+iterable&spm=1018.2226.3001.4187


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM