rapid-spreadjs 1.0.74 → 1.0.76

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
@@ -115,9 +115,10 @@ const SheetUtils = {
115
115
  * @param sheet 工作表实例
116
116
  * @param selectRanges 单元格范围集合,格式如:[{ row: 0, col: 0, rowCount: 2, colCount: 2 }]
117
117
  * @param isMulColOrder 是否按照多列的顺序排序单元格(true:按照第一列从上到下、第二列从上到下……的顺序获取单元格数据、false:按照第一行从左到右、第二行从左到右……的顺序获取单元格数据)
118
+ * @param isDoSelectRangesOrder 是否按照selectRanges范围中的所有单元格顺序进行获取并返回,默认为:false
118
119
  * @returns 返回数组集合,格式如:[{ row: 0, col: 0, rowCount: 1, colCount: 1 }]
119
120
  */
120
- getAllCellObjsByRanges: (sheet, selectRanges, isMulColOrder = false) => {
121
+ getAllCellObjsByRanges: (sheet, selectRanges, isMulColOrder = false, isDoSelectRangesOrder = false) => {
121
122
  // 得到所有的单元格坐标对象集合,格式如:[{ row: 0, col: 0, rowCount: 1, colCount: 1 }]
122
123
  let allCellObjs = [];
123
124
  selectRanges.forEach((item, index) => {
@@ -151,7 +152,9 @@ const SheetUtils = {
151
152
  }
152
153
  });
153
154
  // 对所有单元格坐标对象集合进行排序
154
- allCellObjs = orderByJson(allCellObjs, !isMulColOrder ? ['row', 'col'] : ['col', 'row'], ['asc', 'asc']);
155
+ if (!isDoSelectRangesOrder) {
156
+ allCellObjs = orderByJson(allCellObjs, !isMulColOrder ? ['row', 'col'] : ['col', 'row'], ['asc', 'asc']);
157
+ }
155
158
  return allCellObjs;
156
159
  },
157
160
  /**
@@ -8193,13 +8196,13 @@ const EChartsUtilsAll = {
8193
8196
  const gsS = EChartsUtilsComm.calcTrend(xData, yDataSource, xData[0]);
8194
8197
  //输出方程表达式
8195
8198
  if (chartExtJson != null) {
8196
- if (chartExtJson.jxhslSnShScfc != null && chartExtJson.jxhslSnShScfc != undefined) {
8199
+ if (chartExtJson.yhmhlBzHgx != null && chartExtJson.yhmhlBzHgx != undefined) {
8197
8200
  // console.log('输出公式:',`Y=${getRound(gsS.xl,0.0001)}X+${getRound(gsS.jj,0.0001)}`)
8198
8201
  if (gsS.xl == '' || gsS.jj == '') {
8199
- sheet.setValue(chartExtJson.jxhslSnShScfc.row, chartExtJson.jxhslSnShScfc.col, '/');
8202
+ sheet.setValue(chartExtJson.yhmhlBzHgx.row, chartExtJson.yhmhlBzHgx.col, '/');
8200
8203
  }
8201
8204
  else {
8202
- sheet.setValue(chartExtJson.jxhslSnShScfc.row, chartExtJson.jxhslSnShScfc.col, `Y=${EChartsUtilsComm.getRound(gsS.xl, 0.0001)}X+${EChartsUtilsComm.getRound(gsS.jj, 0.0001)}`);
8205
+ sheet.setValue(chartExtJson.yhmhlBzHgx.row, chartExtJson.yhmhlBzHgx.col, `Y=${EChartsUtilsComm.getRound(gsS.xl, 0.0001)}X+${EChartsUtilsComm.getRound(gsS.jj, 0.0001)}`);
8203
8206
  }
8204
8207
  }
8205
8208
  }