From 962cf895dd5fa2d1ab2510340f8d1356077e05ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E8=8D=A3?= Date: Mon, 10 Jan 2022 15:43:51 +0800 Subject: [PATCH] =?UTF-8?q?fix(src/controllers/inlinestring.js=20updateinl?= =?UTF-8?q?inestringformat):=20=E5=86=85=E8=81=94=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E7=9A=84=E6=97=B6=E5=80=99=EF=BC=8C=E4=BC=9A?= =?UTF-8?q?=E5=AF=B9=E9=83=A8=E5=88=86=E5=86=85=E5=AE=B9=E5=A4=B1=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 假设一个单元格的内容是 luckysheet,其中ky两个字母是设置了加粗的样式,假设一个单元格的内容是 luckysheet,其中ky两个字母是设置了加粗的样式, 那此时如果我选中luckysheet,也就是选中全部,给选中的内容设置一个删除线的样式. 得到的效果会是: 只有luc和sheet才有斜体的效果,而ky并没有被设置成删除线样式. 这和用户预期的效果的不一致. fix # 917 --- src/controllers/inlineString.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/controllers/inlineString.js b/src/controllers/inlineString.js index 1e2c167..7a093aa 100644 --- a/src/controllers/inlineString.js +++ b/src/controllers/inlineString.js @@ -186,7 +186,8 @@ export function updateInlineStringFormat(cell, attr, value, $input){ if(startSpanIndex" + content + ""; + let cssText = getCssText(span.style.cssText, attr, value); + cont += "" + content + ""; } }