From 08c4a22dbeb9d16a1c4c177518d490c04318119a Mon Sep 17 00:00:00 2001 From: break-wave <654896146@qq.com> Date: Thu, 4 Feb 2021 11:19:26 +0800 Subject: [PATCH] =?UTF-8?q?fix(bug):=20setcellvalue=20=E5=AF=B9=E5=85=B6?= =?UTF-8?q?=E6=96=B9=E5=BC=8F=E4=B8=8D=E5=BA=94=E8=A2=AB=E8=A6=86=E7=9B=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/global/setdata.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/global/setdata.js b/src/global/setdata.js index 8c1007c..c0d4f56 100644 --- a/src/global/setdata.js +++ b/src/global/setdata.js @@ -85,17 +85,14 @@ function setcellvalue(r, c, d, v) { else if(vupdateStr.toUpperCase() === "TRUE"){ cell.m = "TRUE"; cell.ct = { "fa": "General", "t": "b" }; - cell.ht = cell.ht || 0; cell.v = true; } else if(vupdateStr.toUpperCase() === "FALSE"){ cell.m = "FALSE"; cell.ct = { "fa": "General", "t": "b" }; - cell.ht = cell.ht || 0; cell.v = false; } else if(vupdateStr.substr(-1) === "%" && isRealNum(vupdateStr.substring(0, vupdateStr.length-1))){ - cell.ht = cell.ht || 2; cell.ct = {fa: "0%", t: "n"}; cell.v = vupdateStr.substring(0, vupdateStr.length-1) / 100; cell.m = vupdate; @@ -150,9 +147,6 @@ function setcellvalue(r, c, d, v) { // cell.m = mask[0].toString(); } } - - /* 如果是公式计算之后得到的结果:总是设置对齐方式为右对齐 */ - cell.ht = cell.ht || 2; } else if(cell.ct != null && cell.ct.fa == "@"){ cell.m = vupdateStr; @@ -183,7 +177,6 @@ function setcellvalue(r, c, d, v) { cell.v = vupdate; /* 备注:如果使用parseFloat,1.1111111111111111会转换为1.1111111111111112 ? */ cell.ct = { "fa": "General", "t": "n" }; - cell.ht = cell.ht || 2; if(cell.v == Infinity || cell.v == -Infinity){ cell.m = cell.v.toString(); }