From b988b5c52ada4eafcc388c6914485af38c2a14cb Mon Sep 17 00:00:00 2001 From: flowerField Date: Sat, 6 Mar 2021 13:22:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=8F=E5=90=8C=E7=BC=96=E8=BE=91=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=88=97=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/server.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/controllers/server.js b/src/controllers/server.js index f7cd526..4536d8d 100644 --- a/src/controllers/server.js +++ b/src/controllers/server.js @@ -703,16 +703,16 @@ const server = { } } else{ - file["column"] += len; + file["column"] += len; for(let i = 0; i < data.length; i++){ - // data[i].splice(st_i, 0, addData[i]); - - // 备注:区分插入的位置(可能是左侧插入或者右侧插入) - if(direction == "lefttop"){ - data[i].splice(st_i, 0, addData[i]); - }else{ - data[i].splice(st_i + 1, 0, addData[i]); + /* 在每一行的指定位置都插入一列 */ + for (let j = 0; j < len; j++) { + if(direction == "lefttop"){ + data[i].splice(st_i, 0, addData[j]); + }else{ + data[i].splice(st_i + 1, 0, addData[j]); + } } } }