vue 深拷貝

Vue.set(row,'isEdit',true);
let newRow = JSON.parse(JSON.stringify(row));
this.totalData.push(newRow);
console.log('添加',this.totalData)
 
從其它表格添加進來的數據若是有相同的就會指向同一個引用,因此須要深度複製一次。
相關文章
相關標籤/搜索