rapid-spreadjs 1.0.186 → 1.0.187

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
@@ -23984,22 +23984,18 @@ const FormulaUtils = {
23984
23984
  optional: false,
23985
23985
  },
23986
23986
  {
23987
- name: '目标点x坐标',
23988
- repeatable: false,
23989
- optional: false,
23990
- },
23991
- {
23992
- name: '目标点y坐标',
23987
+ name: '目标点坐标,格式如 (3.5,6.5)',
23993
23988
  repeatable: false,
23994
23989
  optional: false,
23995
23990
  },
23996
23991
  ],
23997
23992
  funCallback: (spread, sheet, retData) => {
23998
- // 如果传递的参数小于3个,则返回/
23999
- if (retData.allCellVals.length < 3) {
23993
+ // 如果传递的参数小于2个,则返回/
23994
+ if (retData.allCellVals.length < 2) {
24000
23995
  return '/';
24001
23996
  }
24002
- let points = retData.allCellVals[0], xPoint = retData.allCellVals[1], yPoint = retData.allCellVals[2];
23997
+ const pointStrArr = retData.allCellVals[1].replace('(', '').replace(')', '').split(',');
23998
+ let points = retData.allCellVals[0], xPoint = pointStrArr[0], yPoint = pointStrArr[1];
24003
23999
  // 1. 格式校验
24004
24000
  if (typeof points !== 'string' || !points)
24005
24001
  return '/';