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.cjs.js CHANGED
@@ -24006,22 +24006,18 @@ const FormulaUtils = {
24006
24006
  optional: false,
24007
24007
  },
24008
24008
  {
24009
- name: '目标点x坐标',
24010
- repeatable: false,
24011
- optional: false,
24012
- },
24013
- {
24014
- name: '目标点y坐标',
24009
+ name: '目标点坐标,格式如 (3.5,6.5)',
24015
24010
  repeatable: false,
24016
24011
  optional: false,
24017
24012
  },
24018
24013
  ],
24019
24014
  funCallback: (spread, sheet, retData) => {
24020
- // 如果传递的参数小于3个,则返回/
24021
- if (retData.allCellVals.length < 3) {
24015
+ // 如果传递的参数小于2个,则返回/
24016
+ if (retData.allCellVals.length < 2) {
24022
24017
  return '/';
24023
24018
  }
24024
- let points = retData.allCellVals[0], xPoint = retData.allCellVals[1], yPoint = retData.allCellVals[2];
24019
+ const pointStrArr = retData.allCellVals[1].replace('(', '').replace(')', '').split(',');
24020
+ let points = retData.allCellVals[0], xPoint = pointStrArr[0], yPoint = pointStrArr[1];
24025
24021
  // 1. 格式校验
24026
24022
  if (typeof points !== 'string' || !points)
24027
24023
  return '/';