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.cjs.js CHANGED
@@ -137,9 +137,10 @@ const SheetUtils = {
137
137
  * @param sheet 工作表实例
138
138
  * @param selectRanges 单元格范围集合,格式如:[{ row: 0, col: 0, rowCount: 2, colCount: 2 }]
139
139
  * @param isMulColOrder 是否按照多列的顺序排序单元格(true:按照第一列从上到下、第二列从上到下……的顺序获取单元格数据、false:按照第一行从左到右、第二行从左到右……的顺序获取单元格数据)
140
+ * @param isDoSelectRangesOrder 是否按照selectRanges范围中的所有单元格顺序进行获取并返回,默认为:false
140
141
  * @returns 返回数组集合,格式如:[{ row: 0, col: 0, rowCount: 1, colCount: 1 }]
141
142
  */
142
- getAllCellObjsByRanges: (sheet, selectRanges, isMulColOrder = false) => {
143
+ getAllCellObjsByRanges: (sheet, selectRanges, isMulColOrder = false, isDoSelectRangesOrder = false) => {
143
144
  // 得到所有的单元格坐标对象集合,格式如:[{ row: 0, col: 0, rowCount: 1, colCount: 1 }]
144
145
  let allCellObjs = [];
145
146
  selectRanges.forEach((item, index) => {
@@ -173,7 +174,9 @@ const SheetUtils = {
173
174
  }
174
175
  });
175
176
  // 对所有单元格坐标对象集合进行排序
176
- allCellObjs = rapidUtils.orderByJson(allCellObjs, !isMulColOrder ? ['row', 'col'] : ['col', 'row'], ['asc', 'asc']);
177
+ if (!isDoSelectRangesOrder) {
178
+ allCellObjs = rapidUtils.orderByJson(allCellObjs, !isMulColOrder ? ['row', 'col'] : ['col', 'row'], ['asc', 'asc']);
179
+ }
177
180
  return allCellObjs;
178
181
  },
179
182
  /**
@@ -8215,13 +8218,13 @@ const EChartsUtilsAll = {
8215
8218
  const gsS = EChartsUtilsComm.calcTrend(xData, yDataSource, xData[0]);
8216
8219
  //输出方程表达式
8217
8220
  if (chartExtJson != null) {
8218
- if (chartExtJson.jxhslSnShScfc != null && chartExtJson.jxhslSnShScfc != undefined) {
8221
+ if (chartExtJson.yhmhlBzHgx != null && chartExtJson.yhmhlBzHgx != undefined) {
8219
8222
  // console.log('输出公式:',`Y=${getRound(gsS.xl,0.0001)}X+${getRound(gsS.jj,0.0001)}`)
8220
8223
  if (gsS.xl == '' || gsS.jj == '') {
8221
- sheet.setValue(chartExtJson.jxhslSnShScfc.row, chartExtJson.jxhslSnShScfc.col, '/');
8224
+ sheet.setValue(chartExtJson.yhmhlBzHgx.row, chartExtJson.yhmhlBzHgx.col, '/');
8222
8225
  }
8223
8226
  else {
8224
- sheet.setValue(chartExtJson.jxhslSnShScfc.row, chartExtJson.jxhslSnShScfc.col, `Y=${EChartsUtilsComm.getRound(gsS.xl, 0.0001)}X+${EChartsUtilsComm.getRound(gsS.jj, 0.0001)}`);
8227
+ sheet.setValue(chartExtJson.yhmhlBzHgx.row, chartExtJson.yhmhlBzHgx.col, `Y=${EChartsUtilsComm.getRound(gsS.xl, 0.0001)}X+${EChartsUtilsComm.getRound(gsS.jj, 0.0001)}`);
8225
8228
  }
8226
8229
  }
8227
8230
  }