rapid-spreadjs 1.0.180 → 1.0.182
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/dist/index.cjs.js +13 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.cjs.min.js +1 -1
- package/dist/index.cjs.min.js.map +1 -1
- package/dist/index.esm.js +13 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.esm.min.js +1 -1
- package/dist/index.esm.min.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1229,7 +1229,10 @@ const BusinessUtils = {
|
|
|
1229
1229
|
const letters = ['a', 'b', 'c', 'd', 'e', 'f'];
|
|
1230
1230
|
letters.forEach((letter) => {
|
|
1231
1231
|
if (itemExp.indexOf(letter) > -1) {
|
|
1232
|
-
|
|
1232
|
+
const findVal = varJsonObjs.find((itemVar) => itemVar.var == letter).value;
|
|
1233
|
+
// 如果findVal为数字,则使用数字,否则使用字符串(加上双引号)
|
|
1234
|
+
const replaceVal = /^(-?\d+)(\.\d+)?$/.test(findVal) ? findVal : `"${findVal}"`;
|
|
1235
|
+
itemExp = itemExp.replaceAll(letter, replaceVal);
|
|
1233
1236
|
}
|
|
1234
1237
|
});
|
|
1235
1238
|
return itemExp;
|
|
@@ -1315,7 +1318,8 @@ const BusinessUtils = {
|
|
|
1315
1318
|
.indicatorColor(commentColor)
|
|
1316
1319
|
.indicatorSize(commentSize)
|
|
1317
1320
|
.fontSize('10pt')
|
|
1318
|
-
.width(
|
|
1321
|
+
.width(250)
|
|
1322
|
+
.height(Math.ceil(item.tipMsg.length / 20) * 30);
|
|
1319
1323
|
if (commentDefaultTextIsSet) {
|
|
1320
1324
|
sheet.setValue(item.row, item.col, commentDefaultText);
|
|
1321
1325
|
}
|
|
@@ -1386,7 +1390,13 @@ const BusinessUtils = {
|
|
|
1386
1390
|
try {
|
|
1387
1391
|
//设置批注
|
|
1388
1392
|
if (eval(lastFor)) {
|
|
1389
|
-
sheet.comments
|
|
1393
|
+
sheet.comments
|
|
1394
|
+
.add(item.row, item.col, item.tipMsg)
|
|
1395
|
+
.indicatorColor(commentColor)
|
|
1396
|
+
.indicatorSize(commentSize)
|
|
1397
|
+
.fontSize('10pt')
|
|
1398
|
+
.width(250)
|
|
1399
|
+
.height(Math.ceil(item.tipMsg.length / 20) * 30);
|
|
1390
1400
|
if (commentDefaultTextIsSet) {
|
|
1391
1401
|
sheet.setValue(item.row, item.col, commentDefaultText);
|
|
1392
1402
|
}
|