linkmore-design 1.1.27-alpha.0 → 1.1.27-alpha.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.
Files changed (63) hide show
  1. package/dist/LmEditTable/EditTable.d.ts +4 -0
  2. package/dist/LmEditTable/components/customRenderEmpty.d.ts +2 -0
  3. package/dist/LmEditTable/components/index.d.ts +2 -1
  4. package/dist/LmEditTable/util.d.ts +3 -0
  5. package/{lib/LmEditTable/virtual/VirtualRowBack.d.ts → dist/LmEditTable/virtual/VirtualRow2.d.ts} +7 -6
  6. package/dist/LmTable/virTual/VirtualRow.d.ts +1 -1
  7. package/dist/index.umd.js +398 -111
  8. package/dist/index.umd.min.js +21 -21
  9. package/dist/variables.css +41 -0
  10. package/es/LmEditTable/EditTable.d.ts +4 -0
  11. package/es/LmEditTable/EditTable.js +68 -11
  12. package/es/LmEditTable/components/customRenderEmpty.d.ts +2 -0
  13. package/es/LmEditTable/components/customRenderEmpty.js +20 -0
  14. package/es/LmEditTable/components/index.d.ts +2 -1
  15. package/es/LmEditTable/components/index.js +2 -1
  16. package/es/LmEditTable/rowSort/DndContainerRow.js +6 -3
  17. package/es/LmEditTable/style/index.css +41 -0
  18. package/es/LmEditTable/style/variables.css +41 -0
  19. package/es/LmEditTable/util.d.ts +3 -0
  20. package/es/LmEditTable/util.js +61 -1
  21. package/es/LmEditTable/virtual/VirtualRow.js +94 -16
  22. package/{dist/LmEditTable/virtual/VirtualRowBack.d.ts → es/LmEditTable/virtual/VirtualRow2.d.ts} +7 -6
  23. package/es/LmEditTable/virtual/VirtualRow2.js +62 -0
  24. package/es/LmEditTable/virtual/VirtualTable.js +17 -9
  25. package/es/LmEditTable/virtual/context.js +14 -2
  26. package/es/LmFilter/baseFilter/index.js +3 -2
  27. package/es/LmFilter/filterFns/index.js +4 -2
  28. package/es/LmTable/virTual/VirtualRow.d.ts +1 -1
  29. package/es/LmTable/virTual/VirtualRow.js +80 -44
  30. package/es/LmTable/virTual/VirtualTable.js +17 -9
  31. package/es/LmTable/virTual/context.js +14 -2
  32. package/es/LmUpload/body/UploadCore.js +1 -1
  33. package/es/Radio/index.js +9 -1
  34. package/es/Switch/index.js +7 -2
  35. package/es/styles/variables.css +41 -0
  36. package/lib/LmEditTable/EditTable.d.ts +4 -0
  37. package/lib/LmEditTable/EditTable.js +67 -9
  38. package/lib/LmEditTable/components/customRenderEmpty.d.ts +2 -0
  39. package/lib/LmEditTable/components/customRenderEmpty.js +32 -0
  40. package/lib/LmEditTable/components/index.d.ts +2 -1
  41. package/lib/LmEditTable/components/index.js +8 -0
  42. package/lib/LmEditTable/rowSort/DndContainerRow.js +5 -3
  43. package/lib/LmEditTable/style/index.css +41 -0
  44. package/lib/LmEditTable/style/variables.css +41 -0
  45. package/lib/LmEditTable/util.d.ts +3 -0
  46. package/lib/LmEditTable/util.js +64 -0
  47. package/lib/LmEditTable/virtual/VirtualRow.js +93 -16
  48. package/{es/LmEditTable/virtual/VirtualRowBack.d.ts → lib/LmEditTable/virtual/VirtualRow2.d.ts} +1 -0
  49. package/lib/LmEditTable/virtual/{VirtualRowBack.js → VirtualRow2.js} +13 -48
  50. package/lib/LmEditTable/virtual/VirtualTable.js +16 -8
  51. package/lib/LmEditTable/virtual/context.js +14 -2
  52. package/lib/LmFilter/baseFilter/index.js +3 -2
  53. package/lib/LmFilter/filterFns/index.js +4 -2
  54. package/lib/LmTable/virTual/VirtualRow.d.ts +1 -1
  55. package/lib/LmTable/virTual/VirtualRow.js +79 -44
  56. package/lib/LmTable/virTual/VirtualTable.js +16 -8
  57. package/lib/LmTable/virTual/context.js +14 -2
  58. package/lib/LmUpload/body/UploadCore.js +1 -1
  59. package/lib/Radio/index.js +9 -1
  60. package/lib/Switch/index.js +9 -2
  61. package/lib/styles/variables.css +41 -0
  62. package/package.json +1 -1
  63. package/es/LmEditTable/virtual/VirtualRowBack.js +0 -100
package/dist/index.umd.js CHANGED
@@ -91007,8 +91007,9 @@
91007
91007
  // 二级过滤 => 基础过滤组件
91008
91008
  var LmFilterBase = /*#__PURE__*/React__default['default'].memo(function (_ref) {
91009
91009
  var instance = _ref.instance;
91010
- var dataSource = instance.dataSource;
91011
- return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(FuzzySearch, {
91010
+ var dataSource = instance.dataSource,
91011
+ enableSearch = instance.enableSearch;
91012
+ return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, enableSearch && /*#__PURE__*/React__default['default'].createElement(FuzzySearch, {
91012
91013
  instance: instance
91013
91014
  }), dataSource.map(function (v, index) {
91014
91015
  var isHidden = !v.show && typeof v.show === 'boolean';
@@ -92881,6 +92882,7 @@
92881
92882
 
92882
92883
  if (getIsHas(itemValue) && !!item) {
92883
92884
  return [].concat(_toConsumableArray$1(pre), [{
92885
+ relation: obj[cur].mode || 'and',
92884
92886
  fieldName: cur,
92885
92887
  fieldType: (item === null || item === void 0 ? void 0 : item.valueType) || 'string',
92886
92888
  type: item.type,
@@ -92890,7 +92892,7 @@
92890
92892
  * and 等同于逻辑关系contains: 选中的值包含所有值
92891
92893
  * or 等同于逻辑关系in: 选中的值存在于所有值之中
92892
92894
  */
92893
- operator: obj[cur].mode === 'and' ? 'contains' : 'in'
92895
+ operator: 'in'
92894
92896
  }]);
92895
92897
  }
92896
92898
 
@@ -93056,11 +93058,12 @@
93056
93058
  if (getIsHas(itemValue) && !!item) {
93057
93059
  // eslint-disable-next-line no-param-reassign
93058
93060
  pre[cur] = {
93061
+ relation: complexFilter[cur].mode || 'and',
93059
93062
  fieldName: cur,
93060
93063
  fieldType: (item === null || item === void 0 ? void 0 : item.valueType) || 'string',
93061
93064
  type: item.type,
93062
93065
  value: Array.isArray(itemValue) ? itemValue : [itemValue],
93063
- operator: complexFilter[cur].mode === 'and' ? 'contains' : 'in'
93066
+ operator: 'in'
93064
93067
  };
93065
93068
  }
93066
93069
 
@@ -182040,7 +182043,7 @@
182040
182043
  var isUploading = getUploadStatus().uploading;
182041
182044
  if (isUploading) return;
182042
182045
  inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.click();
182043
- }, [getUploadStatus]); // 上传触发事件
182046
+ }, [disabled, getUploadStatus]); // 上传触发事件
182044
182047
 
182045
182048
  var uploadChange = React.useCallback(function (e) {
182046
182049
  var _inputRef$current2;
@@ -285842,13 +285845,20 @@
285842
285845
  rowHeight: 0,
285843
285846
  columnsLen: 0,
285844
285847
  // 总行数
285845
- totalLen: 0
285848
+ totalLen: 0,
285849
+ // 分割后的列数组
285850
+ sliceColumns: {
285851
+ leftColumns: [],
285852
+ centerColumns: [],
285853
+ rightColumns: []
285854
+ }
285846
285855
  };
285847
285856
 
285848
285857
  var reducer$4 = function reducer(state, action) {
285849
285858
  var totalLen = action.totalLen,
285850
285859
  columnsLen = action.columnsLen,
285851
- rowHeight = action.rowHeight;
285860
+ rowHeight = action.rowHeight,
285861
+ sliceColumns = action.sliceColumns;
285852
285862
 
285853
285863
  switch (action.type) {
285854
285864
  // 数据数量
@@ -285869,6 +285879,11 @@
285869
285879
  rowHeight: rowHeight
285870
285880
  });
285871
285881
 
285882
+ case 'changeSliceColumns':
285883
+ return _objectSpread(_objectSpread({}, state), {}, {
285884
+ sliceColumns: sliceColumns
285885
+ });
285886
+
285872
285887
  default:
285873
285888
  throw new Error();
285874
285889
  }
@@ -285879,14 +285894,14 @@
285879
285894
  };
285880
285895
 
285881
285896
  var VirtualTable = /*#__PURE__*/React__default['default'].memo(function (tableProps) {
285882
- var _bodyRef$current, _bodyRef$current2, _tableProps$children$3, _tableProps$children$4;
285897
+ var _bodyRef$current, _tableProps$children$3, _tableProps$children$4, _bodyRef$current2;
285883
285898
 
285884
285899
  var bodyRef = React.useRef(null);
285885
285900
 
285886
285901
  var _useRealive = useRealive(),
285887
285902
  _useRealive2 = _slicedToArray$1(_useRealive, 2),
285888
285903
  state = _useRealive2[0],
285889
- dispatch = _useRealive2[1]; // { totalSize, virtualItems }
285904
+ dispatch = _useRealive2[1]; // 行虚拟化 { totalSize, virtualItems }
285890
285905
 
285891
285906
 
285892
285907
  var rowVirtual = useVirtual({
@@ -285899,18 +285914,26 @@
285899
285914
  return state.rowHeight;
285900
285915
  }, [state.rowHeight]),
285901
285916
  overscan: 5
285902
- });
285917
+ }); // 列动态宽度
285918
+
285919
+ var columnEstimateSize = React.useCallback(function (i) {
285920
+ var _tableProps$children$, _tableProps$children$2;
285921
+
285922
+ var colWidths = tableProps === null || tableProps === void 0 ? void 0 : (_tableProps$children$ = tableProps.children[0]) === null || _tableProps$children$ === void 0 ? void 0 : (_tableProps$children$2 = _tableProps$children$.props) === null || _tableProps$children$2 === void 0 ? void 0 : _tableProps$children$2.colWidths;
285923
+ var leftColumnsLen = state.sliceColumns.leftColumns.length;
285924
+ var centerColumnsLen = state.sliceColumns.centerColumns.length; // 获取非固定列
285925
+
285926
+ var virList = colWidths.slice(leftColumnsLen, leftColumnsLen + centerColumnsLen);
285927
+ return virList[i] || 0;
285928
+ }, [(_tableProps$children$3 = tableProps.children[0]) === null || _tableProps$children$3 === void 0 ? void 0 : (_tableProps$children$4 = _tableProps$children$3.props) === null || _tableProps$children$4 === void 0 ? void 0 : _tableProps$children$4.colWidths, state.sliceColumns.leftColumns.length, state.sliceColumns.centerColumns.length]); // 列虚拟化
285929
+
285903
285930
  var columnVirtual = useVirtual({
285904
285931
  horizontal: true,
285905
285932
  size: state.columnsLen,
285906
285933
  parentRef: {
285907
285934
  current: bodyRef === null || bodyRef === void 0 ? void 0 : (_bodyRef$current2 = bodyRef.current) === null || _bodyRef$current2 === void 0 ? void 0 : _bodyRef$current2.parentNode
285908
285935
  },
285909
- estimateSize: React__default['default'].useCallback(function (i) {
285910
- var _tableProps$children$, _tableProps$children$2;
285911
-
285912
- return tableProps === null || tableProps === void 0 ? void 0 : (_tableProps$children$ = tableProps.children[0]) === null || _tableProps$children$ === void 0 ? void 0 : (_tableProps$children$2 = _tableProps$children$.props) === null || _tableProps$children$2 === void 0 ? void 0 : _tableProps$children$2.colWidths[i];
285913
- }, [(_tableProps$children$3 = tableProps.children[0]) === null || _tableProps$children$3 === void 0 ? void 0 : (_tableProps$children$4 = _tableProps$children$3.props) === null || _tableProps$children$4 === void 0 ? void 0 : _tableProps$children$4.colWidths]),
285936
+ estimateSize: columnEstimateSize,
285914
285937
  overscan: 5
285915
285938
  });
285916
285939
  var instance = {
@@ -285975,37 +285998,63 @@
285975
285998
  });
285976
285999
 
285977
286000
  var _excluded$28 = ["children"];
285978
- var VirtualRow = /*#__PURE__*/React__default['default'].memo(function (_ref, ref) {
286001
+
286002
+ var useOptions$2 = function useOptions(_ref) {
285979
286003
  var children = _ref.children,
285980
- resetProps = _objectWithoutProperties$1(_ref, _excluded$28);
286004
+ ref = _ref.ref,
286005
+ trRef = _ref.trRef;
285981
286006
 
285982
286007
  var _useStore = useStore(),
285983
286008
  state = _useStore.state,
285984
286009
  dispatch = _useStore.dispatch,
285985
286010
  instance = _useStore.instance;
285986
286011
 
286012
+ var virtualItems = instance.columnVirtual.virtualItems;
285987
286013
  var rowHeight = state.rowHeight,
285988
286014
  totalLen = state.totalLen;
285989
- var virtualItems = instance.columnVirtual.virtualItems;
285990
- var trRef = React.useRef(null); // 非固定列长度
286015
+ var sliceColumns = React.useMemo(function () {
286016
+ return children === null || children === void 0 ? void 0 : children.reduce(function (pre, cur) {
286017
+ var _cur$props, _cur$props2;
285991
286018
 
285992
- var columnsLen = React.useMemo(function () {
285993
- var _children$filter$leng;
286019
+ if (typeof ((_cur$props = cur.props) === null || _cur$props === void 0 ? void 0 : _cur$props.fixLeft) === 'number') {
286020
+ pre.leftColumns.push(cur);
286021
+ return pre;
286022
+ }
285994
286023
 
285995
- return (_children$filter$leng = children === null || children === void 0 ? void 0 : children.filter(function (v) {
285996
- var _v$props, _v$props2;
286024
+ if (typeof ((_cur$props2 = cur.props) === null || _cur$props2 === void 0 ? void 0 : _cur$props2.fixRight) === 'number') {
286025
+ pre.rightColumns.push(cur);
286026
+ return pre;
286027
+ }
285997
286028
 
285998
- return typeof ((_v$props = v.props) === null || _v$props === void 0 ? void 0 : _v$props.fixLeft) !== 'number' && typeof ((_v$props2 = v.props) === null || _v$props2 === void 0 ? void 0 : _v$props2.fixRight) !== 'number';
285999
- }).length) !== null && _children$filter$leng !== void 0 ? _children$filter$leng : 0; // return children?.length ?? 0
286029
+ pre.centerColumns.push(cur);
286030
+ return pre;
286031
+ }, {
286032
+ leftColumns: [],
286033
+ rightColumns: [],
286034
+ centerColumns: []
286035
+ });
286000
286036
  }, [children]);
286001
286037
  React.useEffect(function () {
286002
- if (state.columnsLen !== columnsLen) {
286038
+ dispatch({
286039
+ type: 'changeSliceColumns',
286040
+ sliceColumns: sliceColumns
286041
+ });
286042
+ }, [sliceColumns]); // 非固定列长度
286043
+
286044
+ var centerColumnsLen = React.useMemo(function () {
286045
+ var _sliceColumns$centerC;
286046
+
286047
+ return (_sliceColumns$centerC = sliceColumns.centerColumns.length) !== null && _sliceColumns$centerC !== void 0 ? _sliceColumns$centerC : 0;
286048
+ }, [sliceColumns]);
286049
+ React.useEffect(function () {
286050
+ if (state.columnsLen !== centerColumnsLen) {
286003
286051
  dispatch({
286004
286052
  type: 'changeColumnsLen',
286005
- columnsLen: columnsLen !== null && columnsLen !== void 0 ? columnsLen : 0
286053
+ columnsLen: centerColumnsLen !== null && centerColumnsLen !== void 0 ? centerColumnsLen : 0
286006
286054
  });
286007
286055
  }
286008
- }, [columnsLen, dispatch, state.columnsLen]);
286056
+ }, [centerColumnsLen, dispatch, state.columnsLen]); // 获取行的高度
286057
+
286009
286058
  React.useEffect(function () {
286010
286059
  var initHeight = function initHeight(tempRef) {
286011
286060
  var _tempRef$current;
@@ -286016,50 +286065,60 @@
286016
286065
  var tempRowHeight = (_tempRef$current$offs = tempRef === null || tempRef === void 0 ? void 0 : (_tempRef$current2 = tempRef.current) === null || _tempRef$current2 === void 0 ? void 0 : _tempRef$current2.offsetHeight) !== null && _tempRef$current$offs !== void 0 ? _tempRef$current$offs : 0;
286017
286066
  dispatch({
286018
286067
  type: 'initHeight',
286019
- rowHeight: tempRowHeight
286068
+ rowHeight: tempRowHeight + 1
286020
286069
  });
286021
286070
  }
286022
286071
  };
286023
286072
 
286024
286073
  initHeight(Object.prototype.hasOwnProperty.call(ref, 'current') ? ref : trRef);
286025
- }, [trRef, dispatch, rowHeight, totalLen, ref]); // return {fixedLeft: [], fixedRight: [], columns: []}
286074
+ }, [trRef, dispatch, rowHeight, totalLen, ref]); // 横向单元格合并
286026
286075
 
286027
- var fixedColumns = React.useMemo(function () {
286028
- return children === null || children === void 0 ? void 0 : children.reduce(function (pre, cur) {
286029
- var _cur$props, _cur$props2;
286076
+ var leftColSpan = React.useMemo(function () {
286077
+ var _virtualItems$;
286030
286078
 
286031
- if (typeof ((_cur$props = cur.props) === null || _cur$props === void 0 ? void 0 : _cur$props.fixLeft) === 'number') {
286032
- pre.fixedLeft.push(cur);
286033
- return pre;
286034
- }
286079
+ return (_virtualItems$ = virtualItems[0]) === null || _virtualItems$ === void 0 ? void 0 : _virtualItems$.index;
286080
+ }, [virtualItems]); // 右侧隐藏数量
286081
+
286082
+ var rightColSpan = React.useMemo(function () {
286083
+ return sliceColumns.centerColumns.length - virtualItems.length - leftColSpan || 0;
286084
+ }, [sliceColumns.centerColumns.length, virtualItems.length, leftColSpan]);
286085
+ return _objectSpread(_objectSpread({
286086
+ virtualItems: virtualItems
286087
+ }, sliceColumns), {}, {
286088
+ leftColSpan: leftColSpan,
286089
+ rightColSpan: rightColSpan
286090
+ });
286091
+ };
286035
286092
 
286036
- if (typeof ((_cur$props2 = cur.props) === null || _cur$props2 === void 0 ? void 0 : _cur$props2.fixRight) === 'number') {
286037
- pre.fixedRight.push(cur);
286038
- return pre;
286039
- }
286093
+ var VirtualRow = /*#__PURE__*/React__default['default'].memo(function (_ref2, ref) {
286094
+ var children = _ref2.children,
286095
+ resetProps = _objectWithoutProperties$1(_ref2, _excluded$28);
286040
286096
 
286041
- pre.columns.push(cur);
286042
- return pre;
286043
- }, {
286044
- fixedLeft: [],
286045
- fixedRight: [],
286046
- columns: []
286047
- });
286048
- }, [children]); // 横线单元格合并
286097
+ var trRef = React.useRef(null);
286049
286098
 
286050
- var colSpan = React.useMemo(function () {
286051
- var _virtualItems$;
286099
+ var _useOptions = useOptions$2({
286100
+ children: children,
286101
+ ref: ref,
286102
+ trRef: trRef
286103
+ }),
286104
+ virtualItems = _useOptions.virtualItems,
286105
+ leftColumns = _useOptions.leftColumns,
286106
+ centerColumns = _useOptions.centerColumns,
286107
+ rightColumns = _useOptions.rightColumns,
286108
+ leftColSpan = _useOptions.leftColSpan,
286109
+ rightColSpan = _useOptions.rightColSpan;
286052
286110
 
286053
- return (_virtualItems$ = virtualItems[0]) === null || _virtualItems$ === void 0 ? void 0 : _virtualItems$.index;
286054
- }, [virtualItems]);
286055
- console.log('virtualItems', virtualItems);
286056
286111
  return /*#__PURE__*/React__default['default'].createElement("tr", _objectSpread(_objectSpread({}, resetProps), {}, {
286057
286112
  ref: Object.prototype.hasOwnProperty.call(ref, 'current') ? ref : trRef
286058
- }), fixedColumns.fixedLeft, !!colSpan && /*#__PURE__*/React__default['default'].createElement("td", {
286059
- colSpan: colSpan
286113
+ }), leftColumns, !!leftColSpan && /*#__PURE__*/React__default['default'].createElement("td", {
286114
+ key: "leftColSpan",
286115
+ colSpan: leftColSpan
286060
286116
  }), virtualItems.map(function (virtualCol) {
286061
- return fixedColumns.columns[virtualCol.index];
286062
- }), fixedColumns.fixedRight);
286117
+ return centerColumns[virtualCol.index];
286118
+ }), !!rightColSpan && /*#__PURE__*/React__default['default'].createElement("td", {
286119
+ key: "rightColSpan",
286120
+ colSpan: rightColSpan
286121
+ }), rightColumns);
286063
286122
  });
286064
286123
 
286065
286124
  // 分组求和计算
@@ -288646,14 +288705,18 @@
288646
288705
  }));
288647
288706
  };
288648
288707
 
288649
- var _excluded$2g = ["children"],
288708
+ var _excluded$2g = ["children", "disabled"],
288650
288709
  _excluded2$y = ["children", "size", "buttonStyle", "direction", "className"];
288651
288710
 
288652
288711
  var LMRadio = function LMRadio(props) {
288653
288712
  var children = props.children,
288713
+ customDisabled = props.disabled,
288654
288714
  restProps = _objectWithoutProperties$1(props, _excluded$2g);
288655
288715
 
288716
+ var disabled = React__default['default'].useContext(DisabledContext$1);
288717
+ var mergedDisabled = customDisabled || disabled;
288656
288718
  return /*#__PURE__*/React__default['default'].createElement(Radio$1, _extends$2({
288719
+ disabled: mergedDisabled,
288657
288720
  className: "lm-radio"
288658
288721
  }, restProps), children);
288659
288722
  };
@@ -293583,17 +293646,21 @@
293583
293646
  Tabs$3.TabPane = TabPane$3;
293584
293647
  Tabs$3.AntdTabs = Tabs$1;
293585
293648
 
293586
- var _excluded$2w = ["size", "className"];
293649
+ var _excluded$2w = ["size", "className", "disabled"];
293587
293650
 
293588
293651
  var Switch$2 = function Switch(props) {
293589
293652
  var _props$size = props.size,
293590
293653
  size = _props$size === void 0 ? 'default' : _props$size,
293591
293654
  className = props.className,
293655
+ customDisabled = props.disabled,
293592
293656
  restProps = _objectWithoutProperties$1(props, _excluded$2w);
293593
293657
 
293658
+ var disabled = React__default['default'].useContext(DisabledContext$1);
293659
+ var mergedDisabled = customDisabled || disabled;
293594
293660
  var classs = classnames('lm-switch', className, _defineProperty$1({}, "lm-switch-".concat(size), size));
293595
293661
  return /*#__PURE__*/React__default['default'].createElement(Switch$1, _objectSpread(_objectSpread({
293596
- className: classs
293662
+ className: classs,
293663
+ disabled: mergedDisabled
293597
293664
  }, restProps), {}, {
293598
293665
  size: size
293599
293666
  }));
@@ -312779,13 +312846,20 @@
312779
312846
  rowHeight: 0,
312780
312847
  columnsLen: 0,
312781
312848
  // 总行数
312782
- totalLen: 0
312849
+ totalLen: 0,
312850
+ // 分割后的列数组
312851
+ sliceColumns: {
312852
+ leftColumns: [],
312853
+ centerColumns: [],
312854
+ rightColumns: []
312855
+ }
312783
312856
  };
312784
312857
 
312785
312858
  var reducer$5 = function reducer(state, action) {
312786
312859
  var totalLen = action.totalLen,
312787
312860
  columnsLen = action.columnsLen,
312788
- rowHeight = action.rowHeight;
312861
+ rowHeight = action.rowHeight,
312862
+ sliceColumns = action.sliceColumns;
312789
312863
 
312790
312864
  switch (action.type) {
312791
312865
  // 数据数量
@@ -312806,6 +312880,11 @@
312806
312880
  rowHeight: rowHeight
312807
312881
  });
312808
312882
 
312883
+ case 'changeSliceColumns':
312884
+ return _objectSpread(_objectSpread({}, state), {}, {
312885
+ sliceColumns: sliceColumns
312886
+ });
312887
+
312809
312888
  default:
312810
312889
  throw new Error();
312811
312890
  }
@@ -312816,14 +312895,14 @@
312816
312895
  };
312817
312896
 
312818
312897
  var VirtualTable$1 = /*#__PURE__*/React__default['default'].memo(function (tableProps) {
312819
- var _bodyRef$current, _bodyRef$current2, _tableProps$children$3, _tableProps$children$4;
312898
+ var _bodyRef$current, _tableProps$children$3, _tableProps$children$4, _bodyRef$current2;
312820
312899
 
312821
312900
  var bodyRef = React.useRef(null);
312822
312901
 
312823
312902
  var _useRealive = useRealive$1(),
312824
312903
  _useRealive2 = _slicedToArray$1(_useRealive, 2),
312825
312904
  state = _useRealive2[0],
312826
- dispatch = _useRealive2[1]; // { totalSize, virtualItems }
312905
+ dispatch = _useRealive2[1]; // 行虚拟化 { totalSize, virtualItems }
312827
312906
 
312828
312907
 
312829
312908
  var rowVirtual = useVirtual({
@@ -312836,18 +312915,26 @@
312836
312915
  return state.rowHeight;
312837
312916
  }, [state.rowHeight]),
312838
312917
  overscan: 5
312839
- });
312918
+ }); // 列动态宽度
312919
+
312920
+ var columnEstimateSize = React.useCallback(function (i) {
312921
+ var _tableProps$children$, _tableProps$children$2;
312922
+
312923
+ var colWidths = tableProps === null || tableProps === void 0 ? void 0 : (_tableProps$children$ = tableProps.children[0]) === null || _tableProps$children$ === void 0 ? void 0 : (_tableProps$children$2 = _tableProps$children$.props) === null || _tableProps$children$2 === void 0 ? void 0 : _tableProps$children$2.colWidths;
312924
+ var leftColumnsLen = state.sliceColumns.leftColumns.length;
312925
+ var centerColumnsLen = state.sliceColumns.centerColumns.length; // 获取非固定列
312926
+
312927
+ var virList = colWidths.slice(leftColumnsLen, leftColumnsLen + centerColumnsLen);
312928
+ return virList[i] || 0;
312929
+ }, [(_tableProps$children$3 = tableProps.children[0]) === null || _tableProps$children$3 === void 0 ? void 0 : (_tableProps$children$4 = _tableProps$children$3.props) === null || _tableProps$children$4 === void 0 ? void 0 : _tableProps$children$4.colWidths, state.sliceColumns.leftColumns.length, state.sliceColumns.centerColumns.length]); // 列虚拟化
312930
+
312840
312931
  var columnVirtual = useVirtual({
312841
312932
  horizontal: true,
312842
312933
  size: state.columnsLen,
312843
312934
  parentRef: {
312844
312935
  current: bodyRef === null || bodyRef === void 0 ? void 0 : (_bodyRef$current2 = bodyRef.current) === null || _bodyRef$current2 === void 0 ? void 0 : _bodyRef$current2.parentNode
312845
312936
  },
312846
- estimateSize: React__default['default'].useCallback(function (i) {
312847
- var _tableProps$children$, _tableProps$children$2;
312848
-
312849
- return tableProps === null || tableProps === void 0 ? void 0 : (_tableProps$children$ = tableProps.children[0]) === null || _tableProps$children$ === void 0 ? void 0 : (_tableProps$children$2 = _tableProps$children$.props) === null || _tableProps$children$2 === void 0 ? void 0 : _tableProps$children$2.colWidths[i];
312850
- }, [(_tableProps$children$3 = tableProps.children[0]) === null || _tableProps$children$3 === void 0 ? void 0 : (_tableProps$children$4 = _tableProps$children$3.props) === null || _tableProps$children$4 === void 0 ? void 0 : _tableProps$children$4.colWidths]),
312937
+ estimateSize: columnEstimateSize,
312851
312938
  overscan: 5
312852
312939
  });
312853
312940
  var instance = {
@@ -312933,32 +313020,63 @@
312933
313020
  }
312934
313021
 
312935
313022
  var _excluded$2Q = ["children", "pref"];
312936
- var VirtualRow$1 = /*#__PURE__*/React__default['default'].memo(function (_ref, ref) {
313023
+
313024
+ var useOptions$3 = function useOptions(_ref) {
312937
313025
  var children = _ref.children,
312938
- pref = _ref.pref,
312939
- resetProps = _objectWithoutProperties$1(_ref, _excluded$2Q);
313026
+ ref = _ref.ref,
313027
+ trRef = _ref.trRef;
312940
313028
 
312941
313029
  var _useStore = useStore$1(),
312942
313030
  state = _useStore.state,
312943
- dispatch = _useStore.dispatch;
313031
+ dispatch = _useStore.dispatch,
313032
+ instance = _useStore.instance;
312944
313033
 
313034
+ var virtualItems = instance.columnVirtual.virtualItems;
312945
313035
  var rowHeight = state.rowHeight,
312946
313036
  totalLen = state.totalLen;
312947
- var trRef = React.useRef(null); // 列长度
313037
+ var sliceColumns = React.useMemo(function () {
313038
+ return children === null || children === void 0 ? void 0 : children.reduce(function (pre, cur) {
313039
+ var _cur$props, _cur$props2;
312948
313040
 
312949
- var columnsLen = React.useMemo(function () {
312950
- var _children$length;
313041
+ if (typeof ((_cur$props = cur.props) === null || _cur$props === void 0 ? void 0 : _cur$props.fixLeft) === 'number') {
313042
+ pre.leftColumns.push(cur);
313043
+ return pre;
313044
+ }
312951
313045
 
312952
- return (_children$length = children === null || children === void 0 ? void 0 : children.length) !== null && _children$length !== void 0 ? _children$length : 0;
313046
+ if (typeof ((_cur$props2 = cur.props) === null || _cur$props2 === void 0 ? void 0 : _cur$props2.fixRight) === 'number') {
313047
+ pre.rightColumns.push(cur);
313048
+ return pre;
313049
+ }
313050
+
313051
+ pre.centerColumns.push(cur);
313052
+ return pre;
313053
+ }, {
313054
+ leftColumns: [],
313055
+ rightColumns: [],
313056
+ centerColumns: []
313057
+ });
312953
313058
  }, [children]);
312954
313059
  React.useEffect(function () {
312955
- if (state.columnsLen !== columnsLen) {
313060
+ dispatch({
313061
+ type: 'changeSliceColumns',
313062
+ sliceColumns: sliceColumns
313063
+ });
313064
+ }, [sliceColumns]); // 非固定列长度
313065
+
313066
+ var centerColumnsLen = React.useMemo(function () {
313067
+ var _sliceColumns$centerC;
313068
+
313069
+ return (_sliceColumns$centerC = sliceColumns.centerColumns.length) !== null && _sliceColumns$centerC !== void 0 ? _sliceColumns$centerC : 0;
313070
+ }, [sliceColumns]);
313071
+ React.useEffect(function () {
313072
+ if (state.columnsLen !== centerColumnsLen) {
312956
313073
  dispatch({
312957
313074
  type: 'changeColumnsLen',
312958
- columnsLen: columnsLen !== null && columnsLen !== void 0 ? columnsLen : 0
313075
+ columnsLen: centerColumnsLen !== null && centerColumnsLen !== void 0 ? centerColumnsLen : 0
312959
313076
  });
312960
313077
  }
312961
- }, [columnsLen, dispatch, state.columnsLen]);
313078
+ }, [centerColumnsLen, dispatch, state.columnsLen]); // 获取行的高度
313079
+
312962
313080
  React.useEffect(function () {
312963
313081
  var initHeight = function initHeight(tempRef) {
312964
313082
  var _tempRef$current;
@@ -312969,16 +313087,63 @@
312969
313087
  var tempRowHeight = (_tempRef$current$offs = tempRef === null || tempRef === void 0 ? void 0 : (_tempRef$current2 = tempRef.current) === null || _tempRef$current2 === void 0 ? void 0 : _tempRef$current2.offsetHeight) !== null && _tempRef$current$offs !== void 0 ? _tempRef$current$offs : 0;
312970
313088
  dispatch({
312971
313089
  type: 'initHeight',
312972
- rowHeight: tempRowHeight
313090
+ rowHeight: tempRowHeight + 1
312973
313091
  });
312974
313092
  }
312975
313093
  };
312976
313094
 
312977
- initHeight(trRef);
312978
- }, [trRef, dispatch, rowHeight, totalLen, ref]);
313095
+ initHeight(Object.prototype.hasOwnProperty.call(ref, 'current') ? ref : trRef);
313096
+ }, [trRef, dispatch, rowHeight, totalLen, ref]); // 横向单元格合并
313097
+
313098
+ var leftColSpan = React.useMemo(function () {
313099
+ var _virtualItems$;
313100
+
313101
+ return (_virtualItems$ = virtualItems[0]) === null || _virtualItems$ === void 0 ? void 0 : _virtualItems$.index;
313102
+ }, [virtualItems]); // 右侧隐藏数量
313103
+
313104
+ var rightColSpan = React.useMemo(function () {
313105
+ return sliceColumns.centerColumns.length - virtualItems.length - leftColSpan || 0;
313106
+ }, [sliceColumns.centerColumns.length, virtualItems.length, leftColSpan]);
313107
+ return _objectSpread(_objectSpread({
313108
+ virtualItems: virtualItems
313109
+ }, sliceColumns), {}, {
313110
+ leftColSpan: leftColSpan,
313111
+ rightColSpan: rightColSpan
313112
+ });
313113
+ };
313114
+
313115
+ var VirtualRow$1 = /*#__PURE__*/React__default['default'].memo(function (_ref2, ref) {
313116
+ var children = _ref2.children,
313117
+ pref = _ref2.pref,
313118
+ resetProps = _objectWithoutProperties$1(_ref2, _excluded$2Q);
313119
+
313120
+ var trRef = React.useRef(null);
313121
+
313122
+ var _useOptions = useOptions$3({
313123
+ children: children,
313124
+ ref: ref,
313125
+ trRef: trRef
313126
+ }),
313127
+ virtualItems = _useOptions.virtualItems,
313128
+ leftColumns = _useOptions.leftColumns,
313129
+ centerColumns = _useOptions.centerColumns,
313130
+ rightColumns = _useOptions.rightColumns,
313131
+ leftColSpan = _useOptions.leftColSpan,
313132
+ rightColSpan = _useOptions.rightColSpan;
313133
+
312979
313134
  return /*#__PURE__*/React__default['default'].createElement("tr", _objectSpread(_objectSpread({}, resetProps), {}, {
312980
313135
  ref: useForkRef(pref, trRef)
312981
- }), children);
313136
+ }), leftColumns, !!leftColSpan && /*#__PURE__*/React__default['default'].createElement("td", {
313137
+ key: "leftColSpan",
313138
+ colSpan: leftColSpan
313139
+ }), virtualItems.map(function (virtualCol) {
313140
+ return /*#__PURE__*/React__default['default'].cloneElement(centerColumns[virtualCol.index], {
313141
+ ref: virtualCol.measureRef
313142
+ });
313143
+ }), !!rightColSpan && /*#__PURE__*/React__default['default'].createElement("td", {
313144
+ key: "rightColSpan",
313145
+ colSpan: rightColSpan
313146
+ }), rightColumns);
312982
313147
  });
312983
313148
 
312984
313149
  var _excluded$2R = ["data-row-key", "children", "className", "virtual"];
@@ -313248,6 +313413,66 @@
313248
313413
  });
313249
313414
  return arr.length;
313250
313415
  }
313416
+ function checkDataSourceIsEmpty(config, dataSource, scrollInfo) {
313417
+ var resultConfig = _objectSpread({}, config);
313418
+
313419
+ if (scrollInfo) {
313420
+ var _resultConfig$scroll, _resultConfig$scroll2;
313421
+
313422
+ resultConfig = _objectSpread(_objectSpread({}, resultConfig), {}, {
313423
+ scroll: {
313424
+ x: ((_resultConfig$scroll = resultConfig.scroll) === null || _resultConfig$scroll === void 0 ? void 0 : _resultConfig$scroll.x) || '100%',
313425
+ y: scrollInfo.height || ((_resultConfig$scroll2 = resultConfig.scroll) === null || _resultConfig$scroll2 === void 0 ? void 0 : _resultConfig$scroll2.y)
313426
+ }
313427
+ });
313428
+ }
313429
+
313430
+ if (dataSource.length) {
313431
+ return resultConfig;
313432
+ }
313433
+
313434
+ return _objectSpread(_objectSpread({}, resultConfig), {}, {
313435
+ components: _objectSpread(_objectSpread({}, resultConfig.components), {}, {
313436
+ body: {}
313437
+ })
313438
+ });
313439
+ }
313440
+ /** 根据传入的disabedRows, 得出最终需要disabed的rowKeys */
313441
+
313442
+ function checkTableRowIsDisable(deepDataSource, disabledRows, rowKey) {
313443
+ var disabledRkeys = [];
313444
+
313445
+ if (!disabledRows.length) {
313446
+ return disabledRkeys;
313447
+ }
313448
+
313449
+ var disableIds = disabledRows.map(function (item) {
313450
+ return lodash.isObject(item) ? item === null || item === void 0 ? void 0 : item[rowKey] : item;
313451
+ });
313452
+
313453
+ function deep(children, arrs) {
313454
+ children === null || children === void 0 ? void 0 : children.forEach(function (item) {
313455
+ arrs.push(item[rowKey]);
313456
+
313457
+ if (item.children) {
313458
+ deep(item.children, arrs);
313459
+ }
313460
+ });
313461
+ }
313462
+
313463
+ if (disableIds.length) {
313464
+ disableIds === null || disableIds === void 0 ? void 0 : disableIds.forEach(function (item) {
313465
+ disabledRkeys.push(item);
313466
+ var record = deepDataSource[item];
313467
+
313468
+ if (record === null || record === void 0 ? void 0 : record.children) {
313469
+ deep(record.children, disabledRkeys);
313470
+ }
313471
+ });
313472
+ }
313473
+
313474
+ return disabledRkeys;
313475
+ }
313251
313476
 
313252
313477
  var DndContainer$3 = function DndContainer(_ref) {
313253
313478
  var children = _ref.children,
@@ -313298,19 +313523,8 @@
313298
313523
  if (active.id !== over.id) {
313299
313524
  move(active.id, over.id);
313300
313525
  }
313301
- };
313526
+ }; // @ts-ignore
313302
313527
 
313303
- var instance = {
313304
- isDragging: isDragging,
313305
- activeId: activeId,
313306
- options: options,
313307
- rowKey: rowKey,
313308
- children: children,
313309
- move: move,
313310
- items: items,
313311
- tableWidth: tableWidth
313312
- };
313313
- console.log('instance', instance);
313314
313528
  return /*#__PURE__*/React__default['default'].createElement(DndContext, {
313315
313529
  sensors: sensors,
313316
313530
  onDragStart: handleDragStart,
@@ -313507,12 +313721,29 @@
313507
313721
  }) : null);
313508
313722
  };
313509
313723
 
313724
+ var ConfigContext$7 = ConfigProvider$1.ConfigContext;
313725
+
313726
+ var CustomizeRenderEmpty$1 = function CustomizeRenderEmpty() {
313727
+ var _React$useContext = React__default['default'].useContext(ConfigContext$7),
313728
+ locale = _React$useContext.locale;
313729
+
313730
+ return /*#__PURE__*/React__default['default'].createElement("div", {
313731
+ className: "lm_table_empty"
313732
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
313733
+ className: "empty_img",
313734
+ style: {
313735
+ width: '130px',
313736
+ height: '80px'
313737
+ }
313738
+ }), /*#__PURE__*/React__default['default'].createElement("span", null, (locale === null || locale === void 0 ? void 0 : locale.locale) === 'en' ? 'no Data' : '暂无数据'));
313739
+ };
313740
+
313510
313741
  var _excluded$2V = ["index", "virtual"],
313511
313742
  _excluded2$I = ["index"],
313512
313743
  _excluded3$b = ["value", "onChange", "record", "rowIndex", "colIndex", "validator"],
313513
313744
  _excluded4$2 = ["record", "rowKey", "isEdit", "col", "rowIndex", "colIndex", "handleTableRowDelete", "handleTableRowAdd", "quickOpetateClearAll", "getLength", "isHoverEdit", "editEnum", "valueType", "children", "handleSave", "handleAdd", "handleDelete", "handleCopy", "itemProps"],
313514
313745
  _excluded5 = ["onMouseEnter", "onMouseLeave"],
313515
- _excluded6 = ["value", "columns", "isEdit", "isAdd", "onChange", "rowKey", "rowHoverEdit", "isUseForm", "isHoverEdit", "useQuickOpetate", "quickOpetateClearAll", "rowSelection", "virtual", "sortOpen", "disabled", "colSortOpen", "indexCol", "filterChange", "size", "recordCreatorProps", "shouldUpdate", "loading"];
313746
+ _excluded6 = ["value", "columns", "isEdit", "isAdd", "onChange", "rowKey", "rowHoverEdit", "isUseForm", "isHoverEdit", "useQuickOpetate", "quickOpetateClearAll", "rowSelection", "rowDisabled", "virtual", "sortOpen", "disabled", "colSortOpen", "indexCol", "filterChange", "size", "recordCreatorProps", "shouldUpdate", "loading", "autoSizer"];
313516
313747
  var UploadBtn$1 = UploadOss.UploadBtn;
313517
313748
  var EditableContext$1 = /*#__PURE__*/React__default['default'].createContext(null); // 表格行
313518
313749
 
@@ -313527,6 +313758,7 @@
313527
313758
 
313528
313759
  return /*#__PURE__*/React__default['default'].createElement(Form$4, {
313529
313760
  form: form,
313761
+ disabled: props.disabled || false,
313530
313762
  component: false
313531
313763
  }, /*#__PURE__*/React__default['default'].createElement(EditableContext$1.Provider, {
313532
313764
  value: form
@@ -314111,6 +314343,7 @@
314111
314343
  _props$quickOpetateCl = props.quickOpetateClearAll,
314112
314344
  quickOpetateClearAll = _props$quickOpetateCl === void 0 ? true : _props$quickOpetateCl,
314113
314345
  rowSelection = props.rowSelection,
314346
+ rowDisabled = props.rowDisabled,
314114
314347
  virtual = props.virtual,
314115
314348
  sortOpen = props.sortOpen,
314116
314349
  disabled = props.disabled,
@@ -314125,6 +314358,8 @@
314125
314358
  shouldUpdate = _props$shouldUpdate === void 0 ? false : _props$shouldUpdate,
314126
314359
  _props$loading = props.loading,
314127
314360
  loading = _props$loading === void 0 ? false : _props$loading,
314361
+ _props$autoSizer = props.autoSizer,
314362
+ autoSizer = _props$autoSizer === void 0 ? false : _props$autoSizer,
314128
314363
  resetProps = _objectWithoutProperties$1(props, _excluded6);
314129
314364
 
314130
314365
  var _useControllableValue = useControllableValue({
@@ -314150,6 +314385,14 @@
314150
314385
  _useControllableValue4 = _slicedToArray$1(_useControllableValue3, 2),
314151
314386
  localRowSelectList = _useControllableValue4[0],
314152
314387
  setLocalRowSelectList = _useControllableValue4[1];
314388
+
314389
+ var _useControllableValue5 = useControllableValue({
314390
+ value: {
314391
+ disabledRows: (rowDisabled === null || rowDisabled === void 0 ? void 0 : rowDisabled.disabledRows) || []
314392
+ }
314393
+ }),
314394
+ _useControllableValue6 = _slicedToArray$1(_useControllableValue5, 1),
314395
+ localDisabledRows = _useControllableValue6[0];
314153
314396
  /** TODO: 当前展开的列 */
314154
314397
 
314155
314398
 
@@ -314162,7 +314405,10 @@
314162
314405
  var deepDataSourceRef = React.useRef(deepDataSourcePreKeys(dataSource, _rowKey));
314163
314406
  dataSourceRef.current = dataSource;
314164
314407
  deepDataSourceRef.current = deepDataSourcePreKeys(dataSource, _rowKey);
314408
+ var disabledDataSourceRowKeys = React.useRef(checkTableRowIsDisable(deepDataSourceRef.current, localDisabledRows.disabledRows, _rowKey));
314409
+ disabledDataSourceRowKeys.current = checkTableRowIsDisable(deepDataSourceRef.current, localDisabledRows.disabledRows, _rowKey);
314165
314410
  var tableWarpRef = React.useRef(null);
314411
+ var autoSizerRef = React.useRef(null);
314166
314412
 
314167
314413
  var onColSortEnd = function onColSortEnd(active, over) {
314168
314414
  var _arrayMove;
@@ -314547,7 +314793,6 @@
314547
314793
  render: function render(_, record, index) {
314548
314794
  var _deepDataSourceRef$cu9, _deepDataSourceRef$cu10, _deepDataSourceRef$cu11;
314549
314795
 
314550
- console.log(deepDataSourceRef.current, '--deepDataSourceRef.current', _rowKey);
314551
314796
  return ((_deepDataSourceRef$cu9 = deepDataSourceRef.current) === null || _deepDataSourceRef$cu9 === void 0 ? void 0 : (_deepDataSourceRef$cu10 = _deepDataSourceRef$cu9[record[_rowKey]]) === null || _deepDataSourceRef$cu10 === void 0 ? void 0 : (_deepDataSourceRef$cu11 = _deepDataSourceRef$cu10['_deepIds']) === null || _deepDataSourceRef$cu11 === void 0 ? void 0 : _deepDataSourceRef$cu11.join('-')) || "".concat(index + 1);
314552
314797
  }
314553
314798
  } : _objectSpread(_objectSpread({
@@ -314715,7 +314960,10 @@
314715
314960
  setLocalRowSelectList({
314716
314961
  selectedRows: value
314717
314962
  });
314718
- }
314963
+ },
314964
+ columns: columns.map(function (item) {
314965
+ return lodash.omit(item, ['render', 'sorter', 'onFilter', 'filters', 'componentProps', 'formProps', 'editable']);
314966
+ })
314719
314967
  };
314720
314968
  });
314721
314969
  var isShowAddAction = React.useMemo(function () {
@@ -314764,11 +315012,39 @@
314764
315012
  }
314765
315013
  },
314766
315014
  onRow: function onRow(record, index) {
315015
+ var _disabledDataSourceRo;
315016
+
314767
315017
  return {
314768
- disabled: disabled
315018
+ disabled: disabled || !!((_disabledDataSourceRo = disabledDataSourceRowKeys.current) === null || _disabledDataSourceRo === void 0 ? void 0 : _disabledDataSourceRo.includes(record[_rowKey]))
314769
315019
  };
314770
315020
  }
314771
315021
  }, resetProps));
315022
+ React.useEffect(function () {
315023
+ if (autoSizer) {
315024
+ var _tableWarpRef$current3;
315025
+
315026
+ var tableClient = tableWarpRef === null || tableWarpRef === void 0 ? void 0 : (_tableWarpRef$current3 = tableWarpRef.current) === null || _tableWarpRef$current3 === void 0 ? void 0 : _tableWarpRef$current3.getBoundingClientRect();
315027
+ var height = (tableClient === null || tableClient === void 0 ? void 0 : tableClient.height) || '100%';
315028
+ var TailorHeight = size === 'middle' ? 48 : 40;
315029
+
315030
+ if (isAdd) {
315031
+ TailorHeight += 48;
315032
+ }
315033
+
315034
+ if (props.summary) {
315035
+ TailorHeight += 48;
315036
+ }
315037
+
315038
+ if (props.pagination) {
315039
+ TailorHeight += 48;
315040
+ }
315041
+
315042
+ autoSizerRef.current = {
315043
+ width: tableClient === null || tableClient === void 0 ? void 0 : tableClient.width,
315044
+ height: typeof height === 'string' ? "calc(".concat(height, " - ").concat(TailorHeight, "px)") : height - TailorHeight
315045
+ };
315046
+ }
315047
+ }, []);
314772
315048
 
314773
315049
  if (colSortOpen) {
314774
315050
  var _localRowSelectList$s;
@@ -314776,6 +315052,10 @@
314776
315052
  return /*#__PURE__*/React__default['default'].createElement("div", {
314777
315053
  className: "lm_editTable_warpper",
314778
315054
  ref: tableWarpRef
315055
+ }, /*#__PURE__*/React__default['default'].createElement(ConfigProvider$1, {
315056
+ renderEmpty: loading ? function () {
315057
+ return null;
315058
+ } : CustomizeRenderEmpty$1
314779
315059
  }, /*#__PURE__*/React__default['default'].createElement(DndContainer$2, {
314780
315060
  rowKey: _rowKey,
314781
315061
  options: resultColumns,
@@ -314784,7 +315064,7 @@
314784
315064
  items: columns.reduce(function (acc, item) {
314785
315065
  return [].concat(_toConsumableArray$1(acc), [item.dataIndex]);
314786
315066
  }, [])
314787
- }, /*#__PURE__*/React__default['default'].createElement(Table$1, _objectSpread(_objectSpread({}, config.current), {}, {
315067
+ }, /*#__PURE__*/React__default['default'].createElement(Table$1, _objectSpread(_objectSpread({}, checkDataSourceIsEmpty(config.current, dataSourceRef.current, autoSizerRef.current)), {}, {
314788
315068
  loading: loading,
314789
315069
  size: size || 'small',
314790
315070
  columns: resultColumns,
@@ -314804,7 +315084,7 @@
314804
315084
  }
314805
315085
  }),
314806
315086
  dataSource: dataSource
314807
- })))), /*#__PURE__*/React__default['default'].createElement(BottomOpetateComponent, {
315087
+ }))))), /*#__PURE__*/React__default['default'].createElement(BottomOpetateComponent, {
314808
315088
  disabled: disabled,
314809
315089
  isShowAddAction: isShowAddAction,
314810
315090
  recordCreatorProps: recordCreatorProps,
@@ -314814,14 +315094,21 @@
314814
315094
 
314815
315095
 
314816
315096
  return /*#__PURE__*/React__default['default'].createElement("div", {
314817
- className: "lm_editTable_warpper",
315097
+ className: classnames('lm_editTable_warpper', autoSizer && 'lm_editable_autosize'),
314818
315098
  ref: tableWarpRef
314819
- }, /*#__PURE__*/React__default['default'].createElement(Table$1, _objectSpread(_objectSpread({}, config.current), {}, {
315099
+ }, /*#__PURE__*/React__default['default'].createElement(ConfigProvider$1, {
315100
+ renderEmpty: loading ? function () {
315101
+ return null;
315102
+ } : CustomizeRenderEmpty$1
315103
+ }, /*#__PURE__*/React__default['default'].createElement(Table$1, _objectSpread(_objectSpread({}, checkDataSourceIsEmpty(config.current, dataSourceRef.current, autoSizerRef.current)), {}, {
314820
315104
  size: size || 'small',
314821
315105
  columns: resultColumns,
314822
315106
  rowClassName: "editable-row",
314823
315107
  bordered: true,
314824
315108
  loading: loading,
315109
+ style: autoSizer ? {
315110
+ height: isAdd ? "calc(100% - ".concat(48, "px)") : '100%'
315111
+ } : undefined,
314825
315112
  pagination: false,
314826
315113
  // components={tableComponents}
314827
315114
  expandable: (resetProps === null || resetProps === void 0 ? void 0 : resetProps.expandable) || {
@@ -314850,7 +315137,7 @@
314850
315137
  }
314851
315138
  }),
314852
315139
  dataSource: dataSource
314853
- })), /*#__PURE__*/React__default['default'].createElement(BottomOpetateComponent, {
315140
+ }))), /*#__PURE__*/React__default['default'].createElement(BottomOpetateComponent, {
314854
315141
  disabled: disabled,
314855
315142
  isShowAddAction: isShowAddAction,
314856
315143
  recordCreatorProps: recordCreatorProps,
@@ -320662,7 +320949,7 @@
320662
320949
 
320663
320950
  var _excluded$35 = ["defaultExpandAll", "defaultExpandParent", "defaultExpandedKeys"],
320664
320951
  _excluded2$J = ["prefixCls", "className"];
320665
- var ConfigContext$7 = ConfigProvider$1.ConfigContext;
320952
+ var ConfigContext$8 = ConfigProvider$1.ConfigContext;
320666
320953
 
320667
320954
  function getIcon$1(props) {
320668
320955
  var isLeaf = props.isLeaf,
@@ -320796,7 +321083,7 @@
320796
321083
  }
320797
321084
  };
320798
321085
 
320799
- var _React$useContext = React.useContext(ConfigContext$7),
321086
+ var _React$useContext = React.useContext(ConfigContext$8),
320800
321087
  getPrefixCls = _React$useContext.getPrefixCls,
320801
321088
  direction = _React$useContext.direction;
320802
321089
 
@@ -321103,11 +321390,11 @@
321103
321390
  });
321104
321391
  }
321105
321392
 
321106
- var ConfigContext$8 = ConfigProvider$1.ConfigContext;
321393
+ var ConfigContext$9 = ConfigProvider$1.ConfigContext;
321107
321394
  var Tree$2 = /*#__PURE__*/React.forwardRef(function (props, ref) {
321108
321395
  var _classNames;
321109
321396
 
321110
- var _React$useContext = React.useContext(ConfigContext$8),
321397
+ var _React$useContext = React.useContext(ConfigContext$9),
321111
321398
  getPrefixCls = _React$useContext.getPrefixCls,
321112
321399
  direction = _React$useContext.direction,
321113
321400
  virtual = _React$useContext.virtual;