若依框架點擊左側菜單欄,會有以下報錯信息。。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