From e21fbd98078cec88cfdc051c4e2beb9d4aff9188 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8F=9C=E7=8C=AB=E5=AD=90neko?= <815743831@qq.com> Date: Fri, 6 May 2022 09:41:27 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=A0=BC=E6=9C=89=E9=83=A8=E5=88=86=E6=A0=B7=E5=BC=8F=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E5=9B=9E=E8=BD=A6=E6=8D=A2=E8=A1=8C=E8=AE=A9=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E6=95=B4=E4=BD=93=E8=A6=86=E7=9B=96=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/inlineString.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/controllers/inlineString.js b/src/controllers/inlineString.js index 7a093aa..cfd00c8 100644 --- a/src/controllers/inlineString.js +++ b/src/controllers/inlineString.js @@ -72,7 +72,7 @@ export function updateInlineStringFormat(cell, attr, value, $input){ if(startContainer===endContainer){ let span = startContainer.parentNode, spanIndex, inherit=false; - let content = span.innerHTML; + let content = span.innerText; let fullContent = $textEditor.html(); if(fullContent.substr(0,5) != "" + sleft + "\n\n" + ""; } From c3a80dda7e936261a40e9d9a421df909a40cd1a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8F=9C=E7=8C=AB=E5=AD=90neko?= <815743831@qq.com> Date: Fri, 6 May 2022 09:45:56 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=A0=BC=E4=B8=BA=E5=90=88=E5=B9=B6=E5=8D=95=E5=85=83=E6=A0=BC?= =?UTF-8?q?=E6=97=B6=E4=BB=8D=E7=84=B6=E8=A1=8C=E9=AB=98=E8=87=AA=E9=80=82?= =?UTF-8?q?=E5=BA=94=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/global/formula.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/global/formula.js b/src/global/formula.js index 9609910..cdb9d1d 100755 --- a/src/global/formula.js +++ b/src/global/formula.js @@ -1562,7 +1562,9 @@ const luckysheetformula = { cfg["rowlen"] = {}; } - if ((d[r][c].tb == "2" && d[r][c].v != null) || isInlineStringCell(d[r][c])) {//自动换行 + // 单元格行高自适应,只有在单元格不是合并单元格时才能生效 + if ((d[r][c].tb == "2" && d[r][c].v != null) || isInlineStringCell(d[r][c]) && (typeof d[r][c]['mc'] == 'undefined')) { + //自动换行 let defaultrowlen = Store.defaultrowlen; let canvas = $("#luckysheetTableContent").get(0).getContext("2d");