linkmore-design 1.1.27-beta.1 → 1.1.27-beta.2

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.
@@ -3,8 +3,6 @@ export interface IProps {
3
3
  record: Record<string, any>;
4
4
  rowKey: string;
5
5
  col: any;
6
- rowIndex: number;
7
- colIndex: number;
8
6
  [key: string]: any;
9
7
  }
10
8
  declare const CalcExpression: React.FC<IProps>;
package/dist/index.umd.js CHANGED
@@ -223260,12 +223260,13 @@
223260
223260
  };
223261
223261
  }, [items]);
223262
223262
  var isOk = function isOk(active, over) {
223263
+ var _items$row, _items$col;
223263
223264
  var item = filterColumns.find(function (item) {
223264
223265
  return item.title === active.id;
223265
223266
  });
223266
- if (over.id === 'row' || items.row.includes(over.id)) {
223267
+ if (over.id === 'row' || (items === null || items === void 0 ? void 0 : (_items$row = items.row) === null || _items$row === void 0 ? void 0 : _items$row.includes(over.id))) {
223267
223268
  return item && item.rowGroup;
223268
- } else if (over.id === 'col' || items.col.includes(over.id)) {
223269
+ } else if (over.id === 'col' || (items === null || items === void 0 ? void 0 : (_items$col = items.col) === null || _items$col === void 0 ? void 0 : _items$col.includes(over.id))) {
223269
223270
  return item && item.colGroup;
223270
223271
  }
223271
223272
  return true;
@@ -224078,6 +224079,7 @@
224078
224079
  * @param {Array<string>} oGroup 数组,列分组的keys值
224079
224080
  * @param {string} markStr
224080
224081
  * @returns
224082
+ * 2万条数据 393ms
224081
224083
  */
224082
224084
  var groupBy = function groupBy(source, columns, oGroup, markStr) {
224083
224085
  if (!(oGroup === null || oGroup === void 0 ? void 0 : oGroup.length)) {
@@ -224701,7 +224703,13 @@
224701
224703
  function getSortDndColumns(value, _ref2) {
224702
224704
  var columns = _ref2.columns;
224703
224705
  var tableHeader = value.tableHeader;
224704
- var hiddenArr = [].concat(_toConsumableArray$1(value.row), _toConsumableArray$1(value.col)) || [];
224706
+ var hiddenArr = [];
224707
+ if (value.row) {
224708
+ hiddenArr = [].concat(_toConsumableArray$1(hiddenArr), _toConsumableArray$1(value.row));
224709
+ }
224710
+ if (value.col) {
224711
+ hiddenArr = [].concat(_toConsumableArray$1(hiddenArr), _toConsumableArray$1(value.col));
224712
+ }
224705
224713
  if (!tableHeader || !tableHeader.length) {
224706
224714
  return [];
224707
224715
  }
@@ -224775,16 +224783,20 @@
224775
224783
  }, [customizeGroupRowKeys, customizeGroupColKeys]);
224776
224784
  // 初始化
224777
224785
  var defaultItems = {
224778
- row: [],
224779
- col: [],
224780
224786
  tableHeader: []
224781
224787
  };
224788
+ if (openRowGroup) {
224789
+ defaultItems.row = [];
224790
+ }
224791
+ if (openColGroup) {
224792
+ defaultItems.col = [];
224793
+ }
224782
224794
  if (openColGroup || openRowGroup || colSortOpen) {
224783
224795
  treeFind(columns, function (node) {
224784
- if (groupRowKeys.includes(node.dataIndex)) {
224785
- defaultItems.row.push(node.title);
224796
+ if (openRowGroup && groupRowKeys.includes(node.dataIndex)) {
224797
+ defaultItems.row && defaultItems.row.push(node.title);
224786
224798
  } else if (groupColKeys.includes(node.dataIndex)) {
224787
- defaultItems.col.push(node.title);
224799
+ defaultItems.col && defaultItems.col.push(node.title);
224788
224800
  } else {
224789
224801
  defaultItems.tableHeader.push(node.title);
224790
224802
  }
@@ -224808,8 +224820,13 @@
224808
224820
  }, [columns]);
224809
224821
  // 更新
224810
224822
  var updateItems = function updateItems(value, resume) {
224811
- value.row = value.row.filter(Boolean);
224812
- value.col = value.col.filter(Boolean);
224823
+ var _value$col;
224824
+ if (value.row) {
224825
+ value.row = value === null || value === void 0 ? void 0 : value.row.filter(Boolean);
224826
+ }
224827
+ if (value.col) {
224828
+ value.col = value.col.filter(Boolean);
224829
+ }
224813
224830
  if (resume) {
224814
224831
  // 删除
224815
224832
  del$1(value.row, resume);
@@ -224819,7 +224836,7 @@
224819
224836
  });
224820
224837
  }
224821
224838
  // 列分组进行覆盖,只允许存在一个
224822
- if (value.col.length >= 2) {
224839
+ if ((value === null || value === void 0 ? void 0 : (_value$col = value.col) === null || _value$col === void 0 ? void 0 : _value$col.length) >= 2) {
224823
224840
  value.tableHeader = getSortInsert(value.tableHeader, items.col[0], {
224824
224841
  columns: columns
224825
224842
  });
@@ -225763,11 +225780,10 @@
225763
225780
  };
225764
225781
  };
225765
225782
  } else if (openRowGroup) {
225766
- col.onCell = function (record, rowIndex) {
225783
+ col.onCell = function (record) {
225767
225784
  i = _i;
225768
225785
  return {
225769
225786
  record: record,
225770
- rowIndex: rowIndex,
225771
225787
  col: col,
225772
225788
  onChangeRecord: function onChangeRecord() {
225773
225789
  update();