Vue更新数据不刷新?
直接改data有时候是不行的,
比如data[0].name='AAA',
数据不是props对象格式
------------------------------------------------------------------------------------------------------------
试试下面这种方式,亲测可用,$set方式才会被监听
this.$set(this.list[num], 'delflag', true)
-------------------------------------------------------下列是查问题过程的参考资料-----------------------------------------------------
vue更新数据的示例方法
const { config } = this
/**
* 只是这样做是无效
* config指向的内存地址没有发生变化
* 组件无法侦知数据变化
*/
this.config.value = 90
this.config.lineDash = [10, 4]
/**
* 使用ES6拓展运算符生成新的props对象
* 组件侦知数据变化 自动刷新状态
*/
this.config = { ...this.config }