this.idcards.push(arr) 这个无效

就知道了

vuejs有个跟push相同的方法

console.log(this.list.push.toString())

这个push是个同名方法
并非 native 的 array push
只有用它这个“假”方法才能运行监听函数更新视图

你直接用 Array.prototype.push.apply
这种数组的原生方法就绕过监听去了
视图肯定不会变化
 
所以vue已经对数组操作进行封装,可以使用this.list = this.list.concat(newComing)

相关文章:

  • 2022-02-16
  • 2022-12-23
  • 2021-10-30
  • 2022-02-09
  • 2022-12-23
  • 2022-01-06
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-22
  • 2021-05-21
  • 2022-12-23
相关资源
相似解决方案