table编辑后赋值失败
一、更改某一个变量
this.$set(this.arr[index], 'name' , newObj.name)
二、更改整个对象:
错误写法
this.arr[index] = newObj
生效写法
this.$set(this.arr, index , newObj)
三、编辑不影响原table的值,使用深拷贝
this.currentObj = JSON.parse(JSON.stringify(obj))
或者
this.currentObj = Object.assign({},obj.row)