mirror of
https://github.com/ruilisi/fortune-sheet.git
synced 2025-01-09 04:07:33 +08:00
fix: index function ref error
This commit is contained in:
parent
4ccfc45528
commit
1781467662
@ -320,7 +320,6 @@ export function setCellValue(
|
||||
const mask = genarate(cell.v as string);
|
||||
if (mask) {
|
||||
cell.m = mask[0].toString();
|
||||
[, , cell.v] = mask;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -317,7 +317,7 @@ export function escapeHTML(preValue: string) {
|
||||
let resultValue = preValue;
|
||||
if (
|
||||
(!resultValue && typeof resultValue !== "string") ||
|
||||
preValue.startsWith("=")
|
||||
(typeof preValue === "string" && preValue.startsWith("="))
|
||||
)
|
||||
return preValue;
|
||||
try {
|
||||
|
@ -433,11 +433,11 @@ function checkSpecialFunctionRange(
|
||||
}
|
||||
try {
|
||||
ctx.calculateSheetId = id;
|
||||
let str = new Function(`return ${function_str}`)();
|
||||
const str = function_str
|
||||
.split(",")
|
||||
[function_str.split(",").length - 1].split("'")[1]
|
||||
.split("'")[0];
|
||||
|
||||
if (str instanceof Object && !_.isNil(str.startCell)) {
|
||||
str = str.startCell;
|
||||
}
|
||||
const str_nb = _.trim(str);
|
||||
// console.log(function_str, tempFunc,str, this.iscelldata(str_nb),this.isFunctionRangeSave,r,c);
|
||||
if (iscelldata(str_nb)) {
|
||||
@ -785,7 +785,6 @@ function isFunctionRange(
|
||||
|
||||
i += 1;
|
||||
}
|
||||
// console.log(function_str);
|
||||
checkSpecialFunctionRange(
|
||||
ctx,
|
||||
function_str,
|
||||
|
Loading…
Reference in New Issue
Block a user