From 9db73c2b636d445178d3cce63834d01a5aa94c47 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 14:45:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=9E=82=E7=9B=B4?= =?UTF-8?q?=E5=AF=B9=E9=BD=90=E5=8A=9F=E8=83=BD=E5=9C=A8=E8=B7=A8=E9=A1=B5?= =?UTF-8?q?=E5=A4=8D=E5=88=B6=E7=B2=98=E8=B4=B4=E4=B8=AD=E7=9A=84=E4=B8=A2?= =?UTF-8?q?=E5=A4=B1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/handler.js | 2 ++ src/controllers/menuButton.js | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/controllers/handler.js b/src/controllers/handler.js index e1c82de..7b417a7 100644 --- a/src/controllers/handler.js +++ b/src/controllers/handler.js @@ -5486,6 +5486,7 @@ export default function luckysheetHandler() { let fc = $td.css("color"); cell.fc = fc; + // 水平对齐属性 let ht = $td.css("text-align"); if (ht == "center") { cell.ht = 0; @@ -5497,6 +5498,7 @@ export default function luckysheetHandler() { cell.ht = 1; } + // 垂直对齐属性 let vt = $td.css("vertical-align"); if (vt == "middle") { cell.vt = 0; diff --git a/src/controllers/menuButton.js b/src/controllers/menuButton.js index 30c1421..4926972 100644 --- a/src/controllers/menuButton.js +++ b/src/controllers/menuButton.js @@ -4542,10 +4542,13 @@ const menuButton = { if(key == "vt" && value != "1"){ if(value == "0"){ - style += "align-items: center;"; + style += "vertical-align: middle;"; + } + else if(value == "1"){ + style += 'vertical-align: top;'; } else if(value == "2"){ - style += "align-items: flex-end;"; + style += "vertical-align: bottom;"; } }