Browse Source

fix: 对第表格一列的左侧添加列时,添加出来的列数据会同步的问题.

master
菜猫子neko 4 years ago
parent
commit
035ebe51c3
  1. 6
      src/global/extend.js

6
src/global/extend.js

@ -638,8 +638,9 @@ function luckysheetextendtable(type, index, value, direction, sheetIndex) {
let row = [],
curRow = [...d][index]
for(let c = 0; c < d[0].length; c++){
// *这个地方的Store.defaultCell不能使用引用.
let cell = curRow[c],
templateCell = cell ? {...cell, v: '', m: ''} : Store.defaultCell;
templateCell = cell ? { ...cell, v: '', m: '' } : JSON.parse(JSON.stringify(Store.defaultCell));
delete templateCell.ps;
row.push(templateCell);
}
@ -812,8 +813,9 @@ function luckysheetextendtable(type, index, value, direction, sheetIndex) {
let col = [],
curd= [...d];
for(let r = 0; r < d.length; r++){
// *这个地方的Store.defaultCell不能使用引用.
let cell = curd[r][index],
templateCell = cell ? {...cell, v: '', m: ''} : Store.defaultCell;
templateCell = cell ? { ...cell, v: '', m: '' } : JSON.parse(JSON.stringify(Store.defaultCell));
delete templateCell.ps;
col.push(templateCell);
}

Loading…
Cancel
Save