文顶顶
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
11 additions and
4 deletions
-
src/controllers/handler.js
-
src/global/setdata.js
|
|
|
@ -503,6 +503,11 @@ export default function luckysheetHandler() { |
|
|
|
//按住ctrl 选择选区时 先处理上一个选区
|
|
|
|
let vText = $("#luckysheet-rich-text-editor").text(); |
|
|
|
|
|
|
|
if(vText[vText.length -1 ] === ")"){ |
|
|
|
vText = vText.substr(0,vText.length - 1); //先删除最后侧的圆括号)
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(vText.length > 0){ |
|
|
|
let lastWord = vText.substr(vText.length-1,1); |
|
|
|
if(lastWord!="," && lastWord!="=" && lastWord!="("){ |
|
|
|
@ -521,7 +526,9 @@ export default function luckysheetHandler() { |
|
|
|
formula.functionRangeIndex = textRange; |
|
|
|
} |
|
|
|
|
|
|
|
$("#luckysheet-rich-text-editor").html(vText); |
|
|
|
/* 在显示前重新 + 右侧的圆括号) */ |
|
|
|
|
|
|
|
$("#luckysheet-rich-text-editor").html(vText + ")"); |
|
|
|
|
|
|
|
formula.canceFunctionrangeSelected(); |
|
|
|
formula.createRangeHightlight(); |
|
|
|
@ -531,7 +538,7 @@ export default function luckysheetHandler() { |
|
|
|
formula.rangedrag_column_start = false; |
|
|
|
formula.rangedrag_row_start = false; |
|
|
|
|
|
|
|
$("#luckysheet-functionbox-cell").html(vText); |
|
|
|
$("#luckysheet-functionbox-cell").html(vText + ")"); |
|
|
|
formula.rangeHightlightselected($("#luckysheet-rich-text-editor")); |
|
|
|
|
|
|
|
//再进行 选区的选择
|
|
|
|
|
|
|
|
@ -179,9 +179,9 @@ function setcellvalue(r, c, d, v) { |
|
|
|
} |
|
|
|
else{ |
|
|
|
if(isRealNum(vupdate) && !/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[12])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(vupdate)){ |
|
|
|
vupdate = parseFloat(vupdate); |
|
|
|
|
|
|
|
cell.v = parseFloat(vupdate); |
|
|
|
|
|
|
|
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){ |
|
|
|
|