在使用table切换的时候出现报错:
解决iview table组件报错问题You may have an infinite update loop in watcher with expression “columns“的两种方法
代码是这样的:
解决iview table组件报错问题You may have an infinite update loop in watcher with expression “columns“的两种方法
表头是多级的。
查找了一下解决方案,多数是这一种:
方法一、更改iview.js源码:
解决iview table组件报错问题You may have an infinite update loop in watcher with expression “columns“的两种方法
改为:
解决iview table组件报错问题You may have an infinite update loop in watcher with expression “columns“的两种方法
但是这个仅限于本地使用,最好的是更改table组件,然后build生成iview.js和iview.min.js
更改table组件代码:
src/components/table/table.vue中:
将:
解决iview table组件报错问题You may have an infinite update loop in watcher with expression “columns“的两种方法
画红框线位置代码改为:
解决iview table组件报错问题You may have an infinite update loop in watcher with expression “columns“的两种方法
然后重新build一下生成iview.js和iview.min.js。

方法二:不更改源码
在table外一层用v-for来循环:
解决iview table组件报错问题You may have an infinite update loop in watcher with expression “columns“的两种方法

相关文章:

  • 2021-09-11
  • 2022-12-23
  • 2022-12-23
  • 2021-11-16
  • 2022-12-23
  • 2023-02-01
  • 2021-11-17
  • 2022-12-23
猜你喜欢
  • 2021-12-26
  • 2021-12-15
  • 2021-12-12
  • 2021-06-01
  • 2021-09-12
  • 2021-06-08
  • 2022-12-23
相关资源
相似解决方案