举例 :
let Warningdata = [ ] // 轮播表数据
this.config.data = Warningdata 这样的双向绑定是无效的 ×
this.config = {data:Warningdata} 这种双向绑定是有效的 √
实际运用如 :
官方解释 :
组件内部没有设置deep
监听props,数据变更时,请生成新的props,不然组件将无法刷新状态
this.config.data = ['foo', 'foo']
是无效的
this.config = { data: ['foo', 'foo'] }
才是有效的
赞~