浏览代码

竖向粘贴bug

MaiXinRong 3 年之前
父节点
当前提交
05c5c4f9f4
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      app/public/js/spreadjs_rela/spreadjs_zh.js

+ 1 - 2
app/public/js/spreadjs_rela/spreadjs_zh.js

@@ -955,7 +955,6 @@ const SpreadJsObj = {
         return copyData.join('\r\n');
     },
     analysisPasteText: function (text, transpose = false) {
-        console.log(text);
         const result = [];
         if (text === '') return result;
 
@@ -973,7 +972,7 @@ const SpreadJsObj = {
     },
     transposePasteData: function (data) {
         const result = [];
-        const rowCount = data.length, colCount = data.reduce((r, x) => { return r ? Math.max(r, x.length) : x.length; });
+        const rowCount = data.length, colCount = data.reduce((r, x) => { return Math.max(r, x.length); }, 0);
         for (let c = 0; c < colCount; c++) {
             const newRow = [];
             for (let r = 0; r < rowCount; r++) {