From 5d62486c0632051f8fc1db7b704549ffa114a452 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8F=9C=E7=8C=AB=E5=AD=90neko?= <815743831@qq.com> Date: Mon, 7 Mar 2022 16:16:18 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E5=A4=8D=E5=88=B6?= =?UTF-8?q?=E7=94=9F=E6=88=90html=E6=97=B6=EF=BC=8Ccolgroup=E7=9A=84?= =?UTF-8?q?=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/selection.js | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/src/controllers/selection.js b/src/controllers/selection.js index 8b93ea7..8cabc2d 100644 --- a/src/controllers/selection.js +++ b/src/controllers/selection.js @@ -100,8 +100,6 @@ const selection = { if (!clipboardData) { // for chrome clipboardData = e.originalEvent.clipboardData; } - console.log('clipboardData', clipboardData); - Store.luckysheet_selection_range = []; //copy范围 @@ -189,10 +187,18 @@ const selection = { cpdata += ``; } - for (let j = 0; j < colIndexArr.length; j++) { let c = colIndexArr[j]; + if(r == rowIndexArr[0]){ + if(Store.config == null || Store.config["columnlen"] == null || Store.config["columnlen"][c.toString()] == null){ + colgroup += ''; + } + else { + colgroup += ''; + } + } + if (Store.config["colhidden"] != null && Store.config["colhidden"][c] != null) { continue; } @@ -202,15 +208,6 @@ const selection = { if (d[r] != null && d[r][c] != null) { let style = "", span = ""; - if(r == rowIndexArr[0]){ - if(Store.config == null || Store.config["columnlen"] == null || Store.config["columnlen"][c.toString()] == null){ - colgroup += ''; - } - else { - colgroup += ''; - } - } - let reg = /^(w|W)((0?)|(0\.0+))$/; let c_value; if(d[r][c].ct != null && d[r][c].ct.fa != null && d[r][c].ct.fa.match(reg)){ @@ -509,15 +506,6 @@ const selection = { column += ""; - if(r == rowIndexArr[0]){ - if(Store.config == null || Store.config["columnlen"] == null || Store.config["columnlen"][c.toString()] == null){ - colgroup += ''; - } - else { - colgroup += ''; - } - } - column = replaceHtml(column, {"style": style, "span": ""}); column += ""; }