rapid-spreadjs 1.0.88 → 1.0.90

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
@@ -850,10 +850,29 @@ const BusinessUtils = {
850
850
  cellRange.colCount, // 源列数
851
851
  GC.Spread.Sheets.CopyToOptions.all // 复制内容类型(值、样式、公式等)
852
852
  );
853
+ // 使用命令的方式
854
+ // // 定义源区域
855
+ // var fromRange = [new GC.Spread.Sheets.Range(cellRange.row, cellRange.col, cellRange.rowCount, cellRange.colCount)];
856
+ // // 定义目标区域
857
+ // var toRange = [new GC.Spread.Sheets.Range(targetRow, cellRange.col, cellRange.rowCount, cellRange.colCount)];
858
+ // // 执行复制命令
859
+ // spread.commandManager().execute({
860
+ // cmd: "clipboardPaste",
861
+ // sheetName: sheet.name(), // 目标工作表名称
862
+ // fromSheet: sheet, // 源工作表对象
863
+ // fromRanges: fromRange, // 源区域数组
864
+ // pastedRanges: toRange, // 目标区域数组
865
+ // isCutting: false, // false 表示复制
866
+ // clipboardText: "", // 留空
867
+ // pasteOption: GC.Spread.Sheets.ClipboardPasteOptions.all // 粘贴全部内容(数据、样式、公式等)
868
+ // });
853
869
  }
854
870
  };
855
- // 暂停绘制
871
+ // 暂停绘制、计算、事件
856
872
  sheet.suspendPaint();
873
+ sheet.suspendCalcService();
874
+ sheet.suspendDirty();
875
+ sheet.suspendEvent();
857
876
  // 当前默认点数<=1并且上一次默认点数>0的时候,则删除所有循环的行
858
877
  if (curDefaultPointCount <= 1 && lastDefaultPointCount > 0) {
859
878
  sheet.deleteRows(cellRange.row + cellRange.rowCount, (curDefaultPointCount - 1) * cellRange.rowCount);
@@ -874,7 +893,7 @@ const BusinessUtils = {
874
893
  addRowsFun(cellRange.row + cellRange.rowCount, (curDefaultPointCount - 1) * cellRange.rowCount, curDefaultPointCount - 1);
875
894
  }
876
895
  // 循环后的所有单元格范围
877
- const cyclicCellsRangeObj = sheet.getRange(cellRange.row, cellRange.col, curDefaultPointCount * cellRange.rowCount, cellRange.colCount);
896
+ const cyclicCellsRangeObj = sheet.getRange(cellRange.row, cellRange.col, curDefaultPointCount * cellRange.rowCount, cellRange.colCount > 77 ? 77 : cellRange.colCount);
878
897
  // 判断要循环的单元格最后一行是否为表格的末尾行,如果是,则在循环创建单元行的最后一行的时候,下边框线位细线样式
879
898
  if (isCyclicLastRowIsSheetLastRow) {
880
899
  // 设置所有内边框线为细线样式
@@ -905,12 +924,15 @@ const BusinessUtils = {
905
924
  });
906
925
  });
907
926
  }
927
+ // 恢复事件、计算、绘制
928
+ sheet.resumeDirty();
929
+ sheet.resumeEvent();
930
+ sheet.resumeCalcService();
931
+ sheet.resumePaint();
908
932
  // 创建完成后的回调函数
909
933
  if (created != null && created != undefined && typeof created === 'function') {
910
934
  created(cyclicCellsRange, allCellsByRow);
911
935
  }
912
- // 恢复绘制
913
- sheet.resumePaint();
914
936
  },
915
937
  };
916
938
 
@@ -8477,9 +8499,10 @@ const EChartsUtilsAll = {
8477
8499
  {
8478
8500
  show: true,
8479
8501
  text: title,
8502
+ left: 'center',
8480
8503
  top: 2,
8481
8504
  textStyle: {
8482
- fontSize: 12,
8505
+ fontSize: 14,
8483
8506
  fontWeight: 'normal',
8484
8507
  },
8485
8508
  },
@@ -19981,7 +20004,7 @@ const FormulaUtils = {
19981
20004
  isAcceptArea: true,
19982
20005
  funParams: [
19983
20006
  {
19984
- name: '需要用作判断的数字数组或字符串数组',
20007
+ name: '需要用作判断的数字数组、字符串数组或单值',
19985
20008
  repeatable: false,
19986
20009
  optional: false,
19987
20010
  },
@@ -20017,7 +20040,7 @@ const FormulaUtils = {
20017
20040
  if (retData.allCellValsEw.length < 5) {
20018
20041
  return '/';
20019
20042
  }
20020
- 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];
20043
+ 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 < 6 ? 0 : retData.allCellValsEw[5];
20021
20044
  try {
20022
20045
  // 处理array1和array2的默认值
20023
20046
  if (array1 == null || array1 == undefined || (typeof array1 == 'string' && array1.trim().length == 0)) {
@@ -20086,7 +20109,7 @@ const FormulaUtils = {
20086
20109
  case '>':
20087
20110
  case '>':
20088
20111
  if (isSingleValue1) {
20089
- conditionMet = num1 > num2;
20112
+ conditionMet = num2 > num1;
20090
20113
  }
20091
20114
  else {
20092
20115
  conditionMet = num1 > numValue;
@@ -20095,7 +20118,7 @@ const FormulaUtils = {
20095
20118
  case '<':
20096
20119
  case '<':
20097
20120
  if (isSingleValue1) {
20098
- conditionMet = num1 < num2;
20121
+ conditionMet = num2 < num1;
20099
20122
  }
20100
20123
  else {
20101
20124
  conditionMet = num1 < numValue;
@@ -20105,7 +20128,7 @@ const FormulaUtils = {
20105
20128
  case '≥':
20106
20129
  case '≧':
20107
20130
  if (isSingleValue1) {
20108
- conditionMet = num1 >= num2;
20131
+ conditionMet = num2 >= num1;
20109
20132
  }
20110
20133
  else {
20111
20134
  conditionMet = num1 >= numValue;
@@ -20115,7 +20138,7 @@ const FormulaUtils = {
20115
20138
  case '≤':
20116
20139
  case '≦':
20117
20140
  if (isSingleValue1) {
20118
- conditionMet = num1 <= num2;
20141
+ conditionMet = num2 <= num1;
20119
20142
  }
20120
20143
  else {
20121
20144
  conditionMet = num1 <= numValue;
@@ -20124,7 +20147,7 @@ const FormulaUtils = {
20124
20147
  case '=':
20125
20148
  case '=':
20126
20149
  if (isSingleValue1) {
20127
- conditionMet = num1 === num2;
20150
+ conditionMet = num2 === num1;
20128
20151
  }
20129
20152
  else {
20130
20153
  conditionMet = num1 === numValue;