1. 首页
  2. 数据库
  3. 其它
  4. Vue infinite update loop的问题解决

Vue infinite update loop的问题解决

上传者: 2020-12-30 22:00:52上传 PDF文件 135.42KB 热度 10次
一个尤大大曾回复过的问题 vue warn : You may have an infinite update loop in a component render function 最近再写一个数组渲染时,源数据是拿到的数组经过排序后的数组,正常运行却出现爆红: 报红代码: computed: { ...mapState({ fromNames (state) { let fromNames = state.quote.fromNames; return fromNames.sort((a, b) => b.isBind - a.isBind);; }, }), },
下载地址
用户评论