@fileverse-dev/fortune-core 1.2.96 → 1.2.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es/modules/cell.js
CHANGED
|
@@ -309,7 +309,7 @@ export function setCellValue(ctx, r, c, d, v) {
|
|
|
309
309
|
var flag = vupdate.split("").every(function (ele) {
|
|
310
310
|
return ele === "0" || ele === ".";
|
|
311
311
|
});
|
|
312
|
-
if (flag) {
|
|
312
|
+
if (flag || /^0+\d/.test(vupdate)) {
|
|
313
313
|
vupdate = parseFloat(vupdate);
|
|
314
314
|
}
|
|
315
315
|
}
|
package/es/modules/validation.js
CHANGED
|
@@ -25,7 +25,7 @@ export function isRealNull(val) {
|
|
|
25
25
|
return _.isNil(val) || val.toString().replace(/\s/g, "") === "";
|
|
26
26
|
}
|
|
27
27
|
export function isHexValue(str) {
|
|
28
|
-
return /^0x
|
|
28
|
+
return /^0x[a-fA-F0-9]+$/i.test(str);
|
|
29
29
|
}
|
|
30
30
|
export function isRealNum(val) {
|
|
31
31
|
if (isHexValue(val === null || val === void 0 ? void 0 : val.toString())) {
|
package/lib/modules/cell.js
CHANGED
|
@@ -42,7 +42,7 @@ function isRealNull(val) {
|
|
|
42
42
|
return _lodash.default.isNil(val) || val.toString().replace(/\s/g, "") === "";
|
|
43
43
|
}
|
|
44
44
|
function isHexValue(str) {
|
|
45
|
-
return /^0x
|
|
45
|
+
return /^0x[a-fA-F0-9]+$/i.test(str);
|
|
46
46
|
}
|
|
47
47
|
function isRealNum(val) {
|
|
48
48
|
if (isHexValue(val === null || val === void 0 ? void 0 : val.toString())) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fileverse-dev/fortune-core",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.97",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"dev": "father-build --watch"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@fileverse-dev/formula-parser": "0.2.
|
|
18
|
+
"@fileverse-dev/formula-parser": "0.2.95",
|
|
19
19
|
"dayjs": "^1.11.0",
|
|
20
20
|
"immer": "^9.0.12",
|
|
21
21
|
"lodash": "^4.17.21",
|