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.esm.js
CHANGED
|
@@ -1207,7 +1207,10 @@ const BusinessUtils = {
|
|
|
1207
1207
|
const letters = ['a', 'b', 'c', 'd', 'e', 'f'];
|
|
1208
1208
|
letters.forEach((letter) => {
|
|
1209
1209
|
if (itemExp.indexOf(letter) > -1) {
|
|
1210
|
-
|
|
1210
|
+
const findVal = varJsonObjs.find((itemVar) => itemVar.var == letter).value;
|
|
1211
|
+
// 如果findVal为数字,则使用数字,否则使用字符串(加上双引号)
|
|
1212
|
+
const replaceVal = /^(-?\d+)(\.\d+)?$/.test(findVal) ? findVal : `"${findVal}"`;
|
|
1213
|
+
itemExp = itemExp.replaceAll(letter, replaceVal);
|
|
1211
1214
|
}
|
|
1212
1215
|
});
|
|
1213
1216
|
return itemExp;
|
|
@@ -1293,7 +1296,8 @@ const BusinessUtils = {
|
|
|
1293
1296
|
.indicatorColor(commentColor)
|
|
1294
1297
|
.indicatorSize(commentSize)
|
|
1295
1298
|
.fontSize('10pt')
|
|
1296
|
-
.width(
|
|
1299
|
+
.width(250)
|
|
1300
|
+
.height(Math.ceil(item.tipMsg.length / 20) * 30);
|
|
1297
1301
|
if (commentDefaultTextIsSet) {
|
|
1298
1302
|
sheet.setValue(item.row, item.col, commentDefaultText);
|
|
1299
1303
|
}
|
|
@@ -1364,7 +1368,13 @@ const BusinessUtils = {
|
|
|
1364
1368
|
try {
|
|
1365
1369
|
//设置批注
|
|
1366
1370
|
if (eval(lastFor)) {
|
|
1367
|
-
sheet.comments
|
|
1371
|
+
sheet.comments
|
|
1372
|
+
.add(item.row, item.col, item.tipMsg)
|
|
1373
|
+
.indicatorColor(commentColor)
|
|
1374
|
+
.indicatorSize(commentSize)
|
|
1375
|
+
.fontSize('10pt')
|
|
1376
|
+
.width(250)
|
|
1377
|
+
.height(Math.ceil(item.tipMsg.length / 20) * 30);
|
|
1368
1378
|
if (commentDefaultTextIsSet) {
|
|
1369
1379
|
sheet.setValue(item.row, item.col, commentDefaultText);
|
|
1370
1380
|
}
|