rapid-spreadjs 1.0.68 → 1.0.70

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.esm.js CHANGED
@@ -19470,11 +19470,12 @@ const FormulaUtils = {
19470
19470
  },
19471
19471
  ],
19472
19472
  funCallback: (spread, sheet, retData) => {
19473
- //如果传递的参数小于6个,则返回空字符串
19474
- if (retData.allCellValsEw.length < 6) {
19475
- return '';
19473
+ // 如果传递的参数小于5个,则返回空字符串
19474
+ // 本来有6个参数,最后一个参数可以不传,默认为:0
19475
+ if (retData.allCellValsEw.length < 5) {
19476
+ return '/';
19476
19477
  }
19477
- let array1 = retData.allCellValsEw[0], array2 = retData.allCellValsEw[1], operator = retData.allCellValsEw[2], value = retData.allCellValsEw[3], delimiter = retData.allCellValsEw[4], isOpposite = retData.allCellValsEw[5];
19478
+ let array1 = retData.allCellValsEw[0], array2 = retData.allCellValsEw[1], operator = retData.allCellValsEw[2], value = retData.allCellValsEw[3], delimiter = retData.allCellValsEw[4], isOpposite = retData.allCellValsEw.length == 5 ? 0 : retData.allCellValsEw[5];
19478
19479
  try {
19479
19480
  // 处理array1和array2的默认值
19480
19481
  if (array1 == null || array1 == undefined || (typeof array1 == 'string' && array1.trim().length == 0)) {
@@ -19687,21 +19688,7 @@ const FormulaUtils = {
19687
19688
  },
19688
19689
  ],
19689
19690
  funCallback: (spread, sheet, retData) => {
19690
- //如果传递的参数小于3个,则返回空字符串
19691
- if (retData.allCellValsEw.length < 3) {
19692
- return '';
19693
- }
19694
- let xData = FormulaUtils.commFun.convertToInt(retData.allCellValsEw[0].filter((item) => FormulaUtils.commFun.isNumber(item))), yData = FormulaUtils.commFun.convertToInt(retData.allCellValsEw[1].filter((item) => FormulaUtils.commFun.isNumber(item))), x = retData.allCellValsEw[2];
19695
- if (Array.isArray(x) && x.length > 0) {
19696
- x = Number(x[0]);
19697
- }
19698
- else {
19699
- x = Number(x);
19700
- }
19701
- console.log(111, retData);
19702
- console.log(222, xData);
19703
- console.log(333, yData);
19704
- console.log(444, x);
19691
+ console.log(retData);
19705
19692
  return 'OK';
19706
19693
  },
19707
19694
  },