Browse Source

协同编辑增加列的bug

master
flowerField 5 years ago
parent
commit
b988b5c52a
  1. 16
      src/controllers/server.js

16
src/controllers/server.js

@ -703,16 +703,16 @@ const server = {
} }
} }
else{ else{
file["column"] += len; file["column"] += len;
for(let i = 0; i < data.length; i++){ for(let i = 0; i < data.length; i++){
// data[i].splice(st_i, 0, addData[i]); /* 在每一行的指定位置都插入一列 */
for (let j = 0; j < len; j++) {
// 备注:区分插入的位置(可能是左侧插入或者右侧插入) if(direction == "lefttop"){
if(direction == "lefttop"){ data[i].splice(st_i, 0, addData[j]);
data[i].splice(st_i, 0, addData[i]); }else{
}else{ data[i].splice(st_i + 1, 0, addData[j]);
data[i].splice(st_i + 1, 0, addData[i]); }
} }
} }
} }

Loading…
Cancel
Save