linkmore-design 1.1.12 → 1.1.13-alpha.1

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 (75) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/dist/LmEditTable/DndContainer.d.ts +4 -3
  3. package/dist/LmEditTable/EditTable.d.ts +2 -0
  4. package/dist/LmEditTable/components/DraggableContainer.d.ts +7 -0
  5. package/dist/LmEditTable/components/index.d.ts +11 -0
  6. package/dist/LmEditTable/sortableItem.d.ts +3 -2
  7. package/dist/LmEditTable/util.d.ts +2 -0
  8. package/dist/LmEditTable/virtual/VirtualRow.d.ts +6 -0
  9. package/dist/LmEditTable/virtual/VirtualRowBack.d.ts +6 -0
  10. package/dist/LmEditTable/virtual/VirtualTable.d.ts +3 -0
  11. package/dist/LmEditTable/virtual/VirtualWrapper.d.ts +3 -0
  12. package/dist/LmEditTable/virtual/context.d.ts +13 -0
  13. package/dist/LmEditTable/virtual/index.d.ts +4 -0
  14. package/dist/index.umd.js +479 -217
  15. package/dist/index.umd.min.js +5 -5
  16. package/dist/variables.css +29 -0
  17. package/es/IconFont/index.js +1 -1
  18. package/es/LmEditTable/DndContainer.d.ts +4 -3
  19. package/es/LmEditTable/DndContainer.js +2 -2
  20. package/es/LmEditTable/EditTable.d.ts +2 -0
  21. package/es/LmEditTable/EditTable.js +139 -150
  22. package/es/LmEditTable/components/DraggableContainer.d.ts +7 -0
  23. package/es/LmEditTable/components/DraggableContainer.js +32 -0
  24. package/es/LmEditTable/components/index.d.ts +11 -0
  25. package/es/LmEditTable/components/index.js +5 -0
  26. package/es/LmEditTable/sortableItem.d.ts +3 -2
  27. package/es/LmEditTable/sortableItem.js +15 -4
  28. package/es/LmEditTable/style/index.css +29 -0
  29. package/es/LmEditTable/style/variables.css +29 -0
  30. package/es/LmEditTable/util.d.ts +2 -0
  31. package/es/LmEditTable/util.js +47 -1
  32. package/es/LmEditTable/virtual/VirtualRow.d.ts +6 -0
  33. package/es/LmEditTable/virtual/VirtualRow.js +60 -0
  34. package/es/LmEditTable/virtual/VirtualRowBack.d.ts +6 -0
  35. package/es/LmEditTable/virtual/VirtualRowBack.js +102 -0
  36. package/es/LmEditTable/virtual/VirtualTable.d.ts +3 -0
  37. package/es/LmEditTable/virtual/VirtualTable.js +54 -0
  38. package/es/LmEditTable/virtual/VirtualWrapper.d.ts +3 -0
  39. package/es/LmEditTable/virtual/VirtualWrapper.js +60 -0
  40. package/es/LmEditTable/virtual/context.d.ts +13 -0
  41. package/es/LmEditTable/virtual/context.js +54 -0
  42. package/es/LmEditTable/virtual/index.d.ts +4 -0
  43. package/es/LmEditTable/virtual/index.js +4 -0
  44. package/es/hooks/useEvent/index.js +1 -1
  45. package/es/styles/variables.css +29 -0
  46. package/lib/IconFont/index.js +1 -1
  47. package/lib/LmEditTable/DndContainer.d.ts +4 -3
  48. package/lib/LmEditTable/DndContainer.js +4 -3
  49. package/lib/LmEditTable/EditTable.d.ts +2 -0
  50. package/lib/LmEditTable/EditTable.js +135 -146
  51. package/lib/LmEditTable/components/DraggableContainer.d.ts +7 -0
  52. package/lib/LmEditTable/components/DraggableContainer.js +45 -0
  53. package/lib/LmEditTable/components/index.d.ts +11 -0
  54. package/lib/LmEditTable/components/index.js +21 -0
  55. package/lib/LmEditTable/sortableItem.d.ts +3 -2
  56. package/lib/LmEditTable/sortableItem.js +18 -5
  57. package/lib/LmEditTable/style/index.css +29 -0
  58. package/lib/LmEditTable/style/variables.css +29 -0
  59. package/lib/LmEditTable/util.d.ts +2 -0
  60. package/lib/LmEditTable/util.js +50 -0
  61. package/lib/LmEditTable/virtual/VirtualRow.d.ts +6 -0
  62. package/lib/LmEditTable/virtual/VirtualRow.js +73 -0
  63. package/lib/LmEditTable/virtual/VirtualRowBack.d.ts +6 -0
  64. package/lib/LmEditTable/virtual/VirtualRowBack.js +115 -0
  65. package/lib/LmEditTable/virtual/VirtualTable.d.ts +3 -0
  66. package/lib/LmEditTable/virtual/VirtualTable.js +71 -0
  67. package/lib/LmEditTable/virtual/VirtualWrapper.d.ts +3 -0
  68. package/lib/LmEditTable/virtual/VirtualWrapper.js +73 -0
  69. package/lib/LmEditTable/virtual/context.d.ts +13 -0
  70. package/lib/LmEditTable/virtual/context.js +64 -0
  71. package/lib/LmEditTable/virtual/index.d.ts +4 -0
  72. package/lib/LmEditTable/virtual/index.js +31 -0
  73. package/lib/hooks/useEvent/index.js +1 -1
  74. package/lib/styles/variables.css +29 -0
  75. package/package.json +1 -1
package/dist/index.umd.js CHANGED
@@ -68580,7 +68580,7 @@
68580
68580
  });
68581
68581
 
68582
68582
  var IconFont = create({
68583
- scriptUrl: '//at.alicdn.com/t/c/font_2966019_totaqlvhjak.js' // 在 iconfont.cn 上生成
68583
+ scriptUrl: '//at.alicdn.com/t/c/font_2966019_neaxovtw4w.js' // 在 iconfont.cn 上生成
68584
68584
  // scriptUrl: require('./font/iconfont.js'),
68585
68585
 
68586
68586
  });
@@ -287098,7 +287098,12 @@
287098
287098
 
287099
287099
  return React.useCallback(function () {
287100
287100
  var fn = handlerRef.current;
287101
- return fn.apply(void 0, arguments);
287101
+
287102
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
287103
+ args[_key] = arguments[_key];
287104
+ }
287105
+
287106
+ return fn === null || fn === void 0 ? void 0 : fn.apply(void 0, args);
287102
287107
  }, []);
287103
287108
  }
287104
287109
 
@@ -311953,31 +311958,220 @@
311953
311958
  }, children);
311954
311959
  };
311955
311960
 
311961
+ var DndContainer$2 = /*#__PURE__*/React.memo(DndContainer$1);
311962
+
311956
311963
  var SortableBox$1 = function SortableBox(_ref) {
311957
311964
  var items = _ref.items,
311958
311965
  children = _ref.children;
311959
311966
  return /*#__PURE__*/React__default['default'].createElement(SortableContext$1, {
311960
311967
  items: items,
311961
- strategy: verticalListSortingStrategy
311968
+ strategy: horizontalListSortingStrategy
311962
311969
  }, children);
311963
311970
  };
311964
311971
 
311965
- var SortableBox$2 = function SortableBox(_ref) {
311966
- var items = _ref.items,
311967
- children = _ref.children;
311968
- return /*#__PURE__*/React__default['default'].createElement(SortableContext$1, {
311969
- items: items,
311970
- strategy: horizontalListSortingStrategy
311971
- }, children);
311972
+ var TableContext$2 = /*#__PURE__*/React.createContext({
311973
+ state: null,
311974
+ dispatch: null,
311975
+ instance: {}
311976
+ });
311977
+
311978
+ var useStore$1 = function useStore() {
311979
+ return React.useContext(TableContext$2);
311980
+ };
311981
+
311982
+ var initialState$3 = {
311983
+ // 行高度
311984
+ rowHeight: 0,
311985
+ columnsLen: 0,
311986
+ // 总行数
311987
+ totalLen: 0
311972
311988
  };
311973
311989
 
311974
- var _excluded$2Q = ["data-row-key", "children", "className"];
311990
+ var reducer$5 = function reducer(state, action) {
311991
+ var totalLen = action.totalLen,
311992
+ columnsLen = action.columnsLen,
311993
+ rowHeight = action.rowHeight;
311994
+
311995
+ switch (action.type) {
311996
+ // 数据数量
311997
+ case 'changeTotalLen':
311998
+ return _objectSpread(_objectSpread({}, state), {}, {
311999
+ totalLen: totalLen
312000
+ });
312001
+ // 列数量
312002
+
312003
+ case 'changeColumnsLen':
312004
+ return _objectSpread(_objectSpread({}, state), {}, {
312005
+ columnsLen: columnsLen
312006
+ });
312007
+ // 初始化行高度
312008
+
312009
+ case 'initHeight':
312010
+ return _objectSpread(_objectSpread({}, state), {}, {
312011
+ rowHeight: rowHeight
312012
+ });
312013
+
312014
+ default:
312015
+ throw new Error();
312016
+ }
312017
+ };
312018
+
312019
+ var useRealive$1 = function useRealive() {
312020
+ return React.useReducer(reducer$5, initialState$3);
312021
+ };
312022
+
312023
+ var VirtualTable$1 = /*#__PURE__*/React__default['default'].memo(function (tableProps) {
312024
+ var _bodyRef$current, _bodyRef$current2, _tableProps$children$3, _tableProps$children$4;
312025
+
312026
+ var bodyRef = React.useRef(null);
312027
+
312028
+ var _useRealive = useRealive$1(),
312029
+ _useRealive2 = _slicedToArray$1(_useRealive, 2),
312030
+ state = _useRealive2[0],
312031
+ dispatch = _useRealive2[1]; // { totalSize, virtualItems }
312032
+
312033
+
312034
+ var rowVirtual = useVirtual({
312035
+ size: state.totalLen,
312036
+ // 绑定父节点
312037
+ parentRef: {
312038
+ current: bodyRef === null || bodyRef === void 0 ? void 0 : (_bodyRef$current = bodyRef.current) === null || _bodyRef$current === void 0 ? void 0 : _bodyRef$current.parentNode
312039
+ },
312040
+ estimateSize: React__default['default'].useCallback(function () {
312041
+ return state.rowHeight;
312042
+ }, [state.rowHeight]),
312043
+ overscan: 5
312044
+ });
312045
+ var columnVirtual = useVirtual({
312046
+ horizontal: true,
312047
+ size: state.columnsLen,
312048
+ parentRef: {
312049
+ current: bodyRef === null || bodyRef === void 0 ? void 0 : (_bodyRef$current2 = bodyRef.current) === null || _bodyRef$current2 === void 0 ? void 0 : _bodyRef$current2.parentNode
312050
+ },
312051
+ estimateSize: React__default['default'].useCallback(function (i) {
312052
+ var _tableProps$children$, _tableProps$children$2;
312053
+
312054
+ 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];
312055
+ }, [(_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]),
312056
+ overscan: 5
312057
+ });
312058
+ var instance = {
312059
+ rowVirtual: rowVirtual,
312060
+ columnVirtual: columnVirtual
312061
+ };
312062
+ return /*#__PURE__*/React__default['default'].createElement(TableContext$2.Provider, {
312063
+ value: {
312064
+ state: state,
312065
+ dispatch: dispatch,
312066
+ instance: instance
312067
+ }
312068
+ }, /*#__PURE__*/React__default['default'].createElement("table", _objectSpread({
312069
+ ref: bodyRef
312070
+ }, tableProps)));
312071
+ });
312072
+
312073
+ var _excluded$2Q = ["children"];
312074
+ var VirtualWrapper$1 = /*#__PURE__*/React__default['default'].memo(function (wrapperProps) {
312075
+ var _virtualItems$, _virtualItems;
312076
+
312077
+ var children = wrapperProps.children,
312078
+ resetProps = _objectWithoutProperties$1(wrapperProps, _excluded$2Q);
312079
+
312080
+ var _useStore = useStore$1(),
312081
+ state = _useStore.state,
312082
+ dispatch = _useStore.dispatch,
312083
+ instance = _useStore.instance;
312084
+
312085
+ var _instance$rowVirtual = instance.rowVirtual,
312086
+ virtualItems = _instance$rowVirtual.virtualItems,
312087
+ totalSize = _instance$rowVirtual.totalSize;
312088
+ var contents = React.useMemo(function () {
312089
+ return children[1];
312090
+ }, [children]);
312091
+ var contentsLen = React.useMemo(function () {
312092
+ var _contents$length;
312093
+
312094
+ return (_contents$length = contents === null || contents === void 0 ? void 0 : contents.length) !== null && _contents$length !== void 0 ? _contents$length : 0;
312095
+ }, [contents]);
312096
+ React.useEffect(function () {
312097
+ if (state.totalLen !== contentsLen) {
312098
+ dispatch({
312099
+ type: 'changeTotalLen',
312100
+ totalLen: contentsLen !== null && contentsLen !== void 0 ? contentsLen : 0
312101
+ });
312102
+ }
312103
+ }, [contentsLen, dispatch, state.totalLen]);
312104
+ var paddingTop = virtualItems.length > 0 ? (virtualItems === null || virtualItems === void 0 ? void 0 : (_virtualItems$ = virtualItems[0]) === null || _virtualItems$ === void 0 ? void 0 : _virtualItems$.start) || 0 : 0;
312105
+ var paddingBottom = virtualItems.length > 0 ? totalSize - ((virtualItems === null || virtualItems === void 0 ? void 0 : (_virtualItems = virtualItems[virtualItems.length - 1]) === null || _virtualItems === void 0 ? void 0 : _virtualItems.end) || 0) : 0;
312106
+ return /*#__PURE__*/React__default['default'].createElement("tbody", _objectSpread({}, resetProps), paddingTop > 0 && /*#__PURE__*/React__default['default'].createElement("tr", null, /*#__PURE__*/React__default['default'].createElement("td", {
312107
+ style: {
312108
+ height: "".concat(paddingTop, "px")
312109
+ }
312110
+ })), children[0], virtualItems.map(function (virtualRow) {
312111
+ return contents[virtualRow.index];
312112
+ }), paddingBottom > 0 && /*#__PURE__*/React__default['default'].createElement("tr", null, /*#__PURE__*/React__default['default'].createElement("td", {
312113
+ style: {
312114
+ height: "".concat(paddingBottom, "px")
312115
+ }
312116
+ })));
312117
+ });
312118
+
312119
+ var _excluded$2R = ["children"];
312120
+ var VirtualRow$1 = /*#__PURE__*/React__default['default'].memo(function (_ref, ref) {
312121
+ var children = _ref.children,
312122
+ resetProps = _objectWithoutProperties$1(_ref, _excluded$2R);
312123
+
312124
+ var _useStore = useStore$1(),
312125
+ state = _useStore.state,
312126
+ dispatch = _useStore.dispatch;
312127
+
312128
+ var rowHeight = state.rowHeight,
312129
+ totalLen = state.totalLen;
312130
+ var trRef = React.useRef(null); // 列长度
312131
+
312132
+ var columnsLen = React.useMemo(function () {
312133
+ var _children$length;
312134
+
312135
+ return (_children$length = children === null || children === void 0 ? void 0 : children.length) !== null && _children$length !== void 0 ? _children$length : 0;
312136
+ }, [children]);
312137
+ React.useEffect(function () {
312138
+ if (state.columnsLen !== columnsLen) {
312139
+ dispatch({
312140
+ type: 'changeColumnsLen',
312141
+ columnsLen: columnsLen !== null && columnsLen !== void 0 ? columnsLen : 0
312142
+ });
312143
+ }
312144
+ }, [columnsLen, dispatch, state.columnsLen]);
312145
+ React.useEffect(function () {
312146
+ var initHeight = function initHeight(tempRef) {
312147
+ var _tempRef$current;
312148
+
312149
+ if ((tempRef === null || tempRef === void 0 ? void 0 : (_tempRef$current = tempRef.current) === null || _tempRef$current === void 0 ? void 0 : _tempRef$current.offsetHeight) && !rowHeight && totalLen) {
312150
+ var _tempRef$current$offs, _tempRef$current2;
312151
+
312152
+ 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;
312153
+ dispatch({
312154
+ type: 'initHeight',
312155
+ rowHeight: tempRowHeight
312156
+ });
312157
+ }
312158
+ };
312159
+
312160
+ initHeight(Object.prototype.hasOwnProperty.call(ref, 'current') ? ref : trRef);
312161
+ }, [trRef, dispatch, rowHeight, totalLen, ref]);
312162
+ return /*#__PURE__*/React__default['default'].createElement("tr", _objectSpread(_objectSpread({}, resetProps), {}, {
312163
+ ref: Object.prototype.hasOwnProperty.call(ref, 'current') ? ref : trRef
312164
+ }), children);
312165
+ });
312166
+
312167
+ var _excluded$2S = ["data-row-key", "children", "className", "virtual"];
311975
312168
 
311976
312169
  var SortableItem$1 = function SortableItem(props) {
311977
312170
  var key = props['data-row-key'],
311978
312171
  children = props.children,
311979
312172
  className = props.className,
311980
- resetField = _objectWithoutProperties$1(props, _excluded$2Q);
312173
+ virtual = props.virtual,
312174
+ resetField = _objectWithoutProperties$1(props, _excluded$2S);
311981
312175
 
311982
312176
  var _useSortable = useSortable({
311983
312177
  id: key
@@ -311991,25 +312185,36 @@
311991
312185
  transform: CSS.Transform.toString(transform),
311992
312186
  transition: transition
311993
312187
  };
311994
- return /*#__PURE__*/React__default['default'].createElement("tr", _objectSpread(_objectSpread({}, resetField), {}, {
312188
+
312189
+ if (!virtual) {
312190
+ return /*#__PURE__*/React__default['default'].createElement("tr", _objectSpread(_objectSpread({}, resetField), {}, {
312191
+ ref: setNodeRef,
312192
+ key: key,
312193
+ style: style
312194
+ }, attributes), children);
312195
+ }
312196
+
312197
+ return /*#__PURE__*/React__default['default'].createElement(VirtualRow$1, _objectSpread(_objectSpread({}, resetField), {}, {
311995
312198
  ref: setNodeRef,
311996
312199
  key: key,
311997
312200
  style: style
311998
312201
  }, attributes), children);
311999
312202
  };
312000
312203
 
312001
- var _excluded$2R = ["children"];
312204
+ var SortableItem$2 = /*#__PURE__*/React.memo(SortableItem$1);
312205
+
312206
+ var _excluded$2T = ["children"];
312002
312207
  var Item$5 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
312003
312208
  var _children$props;
312004
312209
 
312005
312210
  var children = _ref.children,
312006
- props = _objectWithoutProperties$1(_ref, _excluded$2R);
312211
+ props = _objectWithoutProperties$1(_ref, _excluded$2T);
312007
312212
 
312008
312213
  return /*#__PURE__*/React__default['default'].createElement("th", _objectSpread(_objectSpread({}, props), {}, {
312009
312214
  ref: ref
312010
312215
  }), (children === null || children === void 0 ? void 0 : (_children$props = children.props) === null || _children$props === void 0 ? void 0 : _children$props.children) || children);
312011
312216
  });
312012
- function SortableItem$2(props) {
312217
+ function SortableItem$3(props) {
312013
312218
  var _useSortable = useSortable({
312014
312219
  id: props.id
312015
312220
  }),
@@ -312109,19 +312314,92 @@
312109
312314
  });
312110
312315
  return res;
312111
312316
  }
312317
+ function getExpandStatus(children) {
312318
+ var _children$2, _children$2$props, _children$2$props$chi, _children$2$props$chi2, _children$2$props$chi3;
312319
+
312320
+ return isExpandRow(children) ? children === null || children === void 0 ? void 0 : (_children$2 = children[0]) === null || _children$2 === void 0 ? void 0 : (_children$2$props = _children$2.props) === null || _children$2$props === void 0 ? void 0 : (_children$2$props$chi = _children$2$props.children) === null || _children$2$props$chi === void 0 ? void 0 : (_children$2$props$chi2 = _children$2$props$chi[1]) === null || _children$2$props$chi2 === void 0 ? void 0 : (_children$2$props$chi3 = _children$2$props$chi2.props) === null || _children$2$props$chi3 === void 0 ? void 0 : _children$2$props$chi3['aria-label'] : '';
312321
+ }
312322
+ function checkMemoShouldUploadSpecialFun(prev, next) {
312323
+ var _prevCol$componentPro, _nextCol$componentPro, _prevCol$componentPro2, _nextCol$componentPro2, _prevCol$componentPro3, _nextCol$componentPro3;
312324
+
312325
+ var checkExpandStatus = getExpandStatus(prev.children) === getExpandStatus(next.children);
312326
+
312327
+ if (!checkExpandStatus) {
312328
+ return false;
312329
+ }
312330
+
312331
+ var prevCol = prev === null || prev === void 0 ? void 0 : prev.col;
312332
+ var nextCol = next === null || next === void 0 ? void 0 : next.col;
312333
+
312334
+ if (((prevCol === null || prevCol === void 0 ? void 0 : prevCol.fixed) || (nextCol === null || nextCol === void 0 ? void 0 : nextCol.fixed)) && !lodash.isEqual(prev === null || prev === void 0 ? void 0 : prev.style, next === null || next === void 0 ? void 0 : next.style)) {
312335
+ return false;
312336
+ }
312337
+
312338
+ if (((prevCol === null || prevCol === void 0 ? void 0 : (_prevCol$componentPro = prevCol.componentProps) === null || _prevCol$componentPro === void 0 ? void 0 : _prevCol$componentPro.optionOnly) || (nextCol === null || nextCol === void 0 ? void 0 : (_nextCol$componentPro = nextCol.componentProps) === null || _nextCol$componentPro === void 0 ? void 0 : _nextCol$componentPro.optionOnly)) && !lodash.isEqual(prevCol === null || prevCol === void 0 ? void 0 : (_prevCol$componentPro2 = prevCol.componentProps) === null || _prevCol$componentPro2 === void 0 ? void 0 : _prevCol$componentPro2.options, nextCol === null || nextCol === void 0 ? void 0 : (_nextCol$componentPro2 = nextCol.componentProps) === null || _nextCol$componentPro2 === void 0 ? void 0 : _nextCol$componentPro2.options)) {
312339
+ // return isEqual(prevCol?.componentProps?.options, nextCol?.componentProps?.options)
312340
+ return false;
312341
+ }
312342
+
312343
+ if (((prevCol === null || prevCol === void 0 ? void 0 : prevCol.order) || (nextCol === null || nextCol === void 0 ? void 0 : nextCol.order)) && !lodash.isEqual(prevCol === null || prevCol === void 0 ? void 0 : prevCol.order, nextCol === null || nextCol === void 0 ? void 0 : nextCol.order)) {
312344
+ // return isEqual(prevCol?.order, nextCol?.fixed)
312345
+ return false;
312346
+ }
312347
+
312348
+ if (next.className.indexOf('ant-table-selection-column') > -1) {
312349
+ var _prev$children, _prev$children$, _next$children, _next$children$;
312350
+
312351
+ return lodash.isEqual((_prev$children = prev.children) === null || _prev$children === void 0 ? void 0 : (_prev$children$ = _prev$children[1]) === null || _prev$children$ === void 0 ? void 0 : _prev$children$.props, (_next$children = next.children) === null || _next$children === void 0 ? void 0 : (_next$children$ = _next$children[1]) === null || _next$children$ === void 0 ? void 0 : _next$children$.props);
312352
+ }
312353
+ /** 如果启用了快速复制功能,需要实时判断rowIndex与getLength */
312354
+
312355
+
312356
+ if ((prevCol === null || prevCol === void 0 ? void 0 : (_prevCol$componentPro3 = prevCol.componentProps) === null || _prevCol$componentPro3 === void 0 ? void 0 : _prevCol$componentPro3.quickcopy) || (nextCol === null || nextCol === void 0 ? void 0 : (_nextCol$componentPro3 = nextCol.componentProps) === null || _nextCol$componentPro3 === void 0 ? void 0 : _nextCol$componentPro3.quickcopy)) {
312357
+ var pickProps = ['record', 'colIndex', 'rowIndex', 'getLength'];
312358
+ var p = lodash.pick(prev, pickProps);
312359
+ var n = lodash.pick(next, pickProps);
312360
+ return lodash.isEqual(p, n);
312361
+ }
312362
+
312363
+ return true;
312364
+ }
312365
+
312366
+ var SortableBox$2 = function SortableBox(_ref) {
312367
+ var items = _ref.items,
312368
+ children = _ref.children;
312369
+ return /*#__PURE__*/React__default['default'].createElement(SortableContext$1, {
312370
+ items: items,
312371
+ strategy: verticalListSortingStrategy
312372
+ }, children);
312373
+ };
312112
312374
 
312113
- var _excluded$2S = ["index"],
312375
+ var _excluded$2U = ["keys", "onSortEnd", "virtual"];
312376
+
312377
+ var DraggableContainer = function DraggableContainer(_ref) {
312378
+ var keys = _ref.keys,
312379
+ onSortEnd = _ref.onSortEnd,
312380
+ virtual = _ref.virtual,
312381
+ props = _objectWithoutProperties$1(_ref, _excluded$2U);
312382
+
312383
+ return /*#__PURE__*/React__default['default'].createElement(DndContainer$2, {
312384
+ move: onSortEnd
312385
+ }, /*#__PURE__*/React__default['default'].createElement(SortableBox$2, {
312386
+ items: keys
312387
+ }, virtual ? /*#__PURE__*/React__default['default'].createElement(VirtualWrapper$1, _objectSpread({}, props)) : /*#__PURE__*/React__default['default'].createElement("tbody", _objectSpread({}, props))));
312388
+ };
312389
+
312390
+ var _excluded$2V = ["index", "virtual"],
312114
312391
  _excluded2$I = ["index"],
312115
312392
  _excluded3$b = ["value", "onChange", "record", "rowIndex", "colIndex", "validator"],
312116
312393
  _excluded4$1 = ["record", "rowKey", "isEdit", "col", "rowIndex", "colIndex", "handleTableRowDelete", "handleTableRowAdd", "quickOpetateClearAll", "getLength", "isHoverEdit", "editEnum", "valueType", "children", "handleSave", "handleAdd", "handleDelete", "handleCopy", "itemProps", "setValid", "reWriteOriginSource"],
312117
312394
  _excluded5 = ["onMouseEnter", "onMouseLeave"],
312118
- _excluded6 = ["value", "columns", "isEdit", "isAdd", "onChange", "rowKey", "rowHoverEdit", "isUseForm", "isHoverEdit", "useQuickOpetate", "quickOpetateClearAll", "rowSelection", "sortOpen", "colSortOpen", "filterChange", "size", "recordCreatorProps", "shouldUpdate"];
312395
+ _excluded6 = ["value", "columns", "isEdit", "isAdd", "onChange", "rowKey", "rowHoverEdit", "isUseForm", "isHoverEdit", "useQuickOpetate", "quickOpetateClearAll", "rowSelection", "virtual", "sortOpen", "colSortOpen", "filterChange", "size", "recordCreatorProps", "shouldUpdate"];
312119
312396
  var UploadBtn$1 = UploadOss.UploadBtn;
312120
312397
  var EditableContext$1 = /*#__PURE__*/React__default['default'].createContext(null); // 表格行
312121
312398
 
312122
312399
  var EditableRow$1 = function EditableRow(_ref) {
312123
312400
  var index = _ref.index,
312124
- props = _objectWithoutProperties$1(_ref, _excluded$2S);
312401
+ virtual = _ref.virtual,
312402
+ props = _objectWithoutProperties$1(_ref, _excluded$2V);
312125
312403
 
312126
312404
  var _Form$useForm = Form$4.useForm(),
312127
312405
  _Form$useForm2 = _slicedToArray$1(_Form$useForm, 1),
@@ -312132,7 +312410,7 @@
312132
312410
  component: false
312133
312411
  }, /*#__PURE__*/React__default['default'].createElement(EditableContext$1.Provider, {
312134
312412
  value: form
312135
- }, /*#__PURE__*/React__default['default'].createElement("tr", _objectSpread({}, props))));
312413
+ }, virtual ? /*#__PURE__*/React__default['default'].createElement(VirtualRow$1, _objectSpread({}, props)) : /*#__PURE__*/React__default['default'].createElement("tr", _objectSpread({}, props))));
312136
312414
  };
312137
312415
 
312138
312416
  var EditableSortRow = function EditableSortRow(_ref2) {
@@ -312148,7 +312426,7 @@
312148
312426
  component: false
312149
312427
  }, /*#__PURE__*/React__default['default'].createElement(EditableContext$1.Provider, {
312150
312428
  value: form
312151
- }, /*#__PURE__*/React__default['default'].createElement(SortableItem$1, _objectSpread({}, props))));
312429
+ }, /*#__PURE__*/React__default['default'].createElement(SortableItem$2, _objectSpread({}, props))));
312152
312430
  };
312153
312431
 
312154
312432
  var UploadSingle$1 = function UploadSingle(props) {
@@ -312318,7 +312596,7 @@
312318
312596
  }
312319
312597
  }), (options === null || options === void 0 ? void 0 : options.includes('add')) && (options === null || options === void 0 ? void 0 : options.includes('addInChildren')) ? /*#__PURE__*/React__default['default'].createElement(Popover$1, {
312320
312598
  placement: "bottom",
312321
- overlayClassName: 'lm_table_append_add_popover',
312599
+ overlayClassName: "lm_table_append_add_popover",
312322
312600
  open: open,
312323
312601
  title: null,
312324
312602
  content: /*#__PURE__*/React__default['default'].createElement("ul", null, /*#__PURE__*/React__default['default'].createElement("li", {
@@ -312349,14 +312627,7 @@
312349
312627
  return handleAdd(record, (options === null || options === void 0 ? void 0 : options.includes('addInChildren')) ? true : false);
312350
312628
  }
312351
312629
  }));
312352
- }; // const isValidValue = (verifyValue) => {
312353
- // const toStringValue = JSON.stringify(verifyValue);
312354
- // if (verifyValue === undefined || verifyValue === null || verifyValue === '' || toStringValue === '[]' || toStringValue === '{}') {
312355
- // return false;
312356
- // }
312357
- // return true;
312358
- // }
312359
-
312630
+ };
312360
312631
  /*
312361
312632
  表格单元格
312362
312633
  editEnum: 下拉框时的数据数组(非数组时是配置设置)
@@ -312408,6 +312679,12 @@
312408
312679
 
312409
312680
  var inputRef = React.useRef(null);
312410
312681
  var form = React.useContext(EditableContext$1);
312682
+
312683
+ var _useState5 = React.useState(false),
312684
+ _useState6 = _slicedToArray$1(_useState5, 2),
312685
+ hoverStatus = _useState6[0],
312686
+ setHoverStatus = _useState6[1];
312687
+
312411
312688
  React.useEffect(function () {
312412
312689
  if (editing) {
312413
312690
  var _inputRef$current;
@@ -312418,13 +312695,7 @@
312418
312695
 
312419
312696
  var toggleEdit = function toggleEdit() {
312420
312697
  setEditing(!editing); // form.setFieldsValue({ [dataIndex]: record[dataIndex] });
312421
- }; // const checkCellRef = useRef(null)
312422
- // const focusCapturedRef = useRef(false);
312423
- // const curValue = useMemo(() => {
312424
- // return record?.dataIndex
312425
- // }, [record])
312426
- // const curValueIsValid = isValidValue(curValue);
312427
- // 校验保存
312698
+ }; // 校验保存
312428
312699
 
312429
312700
 
312430
312701
  var save = /*#__PURE__*/function () {
@@ -312511,15 +312782,15 @@
312511
312782
  /** 快捷刷子,把当前的所有列的值,刷成当前的选中的列 */
312512
312783
 
312513
312784
 
312514
- var copyKey = function copyKey(e) {
312785
+ var copyKey = function copyKey(e, type) {
312515
312786
  e === null || e === void 0 ? void 0 : e.stopPropagation();
312516
312787
  var dataIndex = col.dataIndex;
312517
- handleCopy === null || handleCopy === void 0 ? void 0 : handleCopy(dataIndex, record[dataIndex]);
312788
+ handleCopy === null || handleCopy === void 0 ? void 0 : handleCopy(dataIndex, record[dataIndex], type, props.rowIndex);
312518
312789
  };
312519
312790
 
312520
312791
  var Control = function Control(con) {
312521
312792
  var resultComponentProps = lodash.isFunction(componentProps) ? componentProps === null || componentProps === void 0 ? void 0 : componentProps(record, col) : componentProps;
312522
- var clearAttrComponentProps = lodash.omit(resultComponentProps, ['optionOnly', 'isOnlyValue']);
312793
+ var clearAttrComponentProps = lodash.omit(resultComponentProps, ['optionOnly', 'isOnlyValue', 'quickcopy']);
312523
312794
 
312524
312795
  switch (con) {
312525
312796
  case 'input':
@@ -312540,12 +312811,6 @@
312540
312811
  noStyle: true
312541
312812
  }, /*#__PURE__*/React__default['default'].cloneElement(resultComponentProps.addonAfter, {
312542
312813
  onChange: handleFormItemChange
312543
- })) : null,
312544
- suffix: resultComponentProps.quickcopy ? /*#__PURE__*/React__default['default'].createElement("span", {
312545
- className: 'lm_table_quickcopy'
312546
- }, /*#__PURE__*/React__default['default'].createElement(IconFont, {
312547
- onClick: copyKey,
312548
- type: 'lmweb-icon_m_brush'
312549
312814
  })) : null
312550
312815
  }));
312551
312816
 
@@ -312628,7 +312893,7 @@
312628
312893
 
312629
312894
  case 'switch':
312630
312895
  return /*#__PURE__*/React__default['default'].createElement(Switch$2, _objectSpread(_objectSpread({
312631
- size: 'small'
312896
+ size: "small"
312632
312897
  }, clearAttrComponentProps), {}, {
312633
312898
  onChange: handleFormItemChange
312634
312899
  }));
@@ -312717,8 +312982,7 @@
312717
312982
  }
312718
312983
 
312719
312984
  return childNode;
312720
- }, [col, isEdit, editing, getLength]); // const [childNode, setChildNode] = useState(getMemoChildNode);
312721
- // 出现死循环找我
312985
+ }, [col, isEdit, editing, getLength]); // 出现死循环找我
312722
312986
 
312723
312987
  React.useEffect(function () {
312724
312988
  var editable = col.editable,
@@ -312726,22 +312990,54 @@
312726
312990
 
312727
312991
  if (isEdit && editable) {
312728
312992
  form.setFieldsValue(_defineProperty$1({}, dataIndex, editable === 'date' ? hooks(record[dataIndex]) : record[dataIndex]));
312729
- } // if (
312730
- // (isEdit && editable && record[dataIndex]) ||
312731
- // (isHoverEdit && editable && record[dataIndex])
312732
- // ) {
312733
- // form.setFieldsValue({
312734
- // [dataIndex]: editable === 'date' ? moment(record[dataIndex]) : record[dataIndex],
312735
- // })
312736
- // }
312737
-
312993
+ }
312738
312994
  }, [record]);
312995
+
312996
+ var handleTdHover = function handleTdHover() {
312997
+ setHoverStatus(true);
312998
+ };
312999
+
313000
+ var handleTdMouseOut = function handleTdMouseOut() {
313001
+ setHoverStatus(false);
313002
+ };
313003
+
312739
313004
  return /*#__PURE__*/React__default['default'].createElement("td", _objectSpread(_objectSpread({}, lodash.omit(clearProps, ['dataIndex'])), {}, {
312740
313005
  className: classnames(clearProps === null || clearProps === void 0 ? void 0 : clearProps.className, 'lm_custom_cell_td'),
313006
+ onMouseEnter: componentProps.quickcopy ? handleTdHover : undefined,
313007
+ onMouseLeave: componentProps.quickcopy ? handleTdMouseOut : undefined,
312741
313008
  key: "r".concat(rowIndex, "_c").concat(colIndex)
312742
- }), getMemoChildNode);
313009
+ }), hoverStatus && props.rowIndex > 0 && /*#__PURE__*/React__default['default'].createElement("span", {
313010
+ className: 'quick_copy_warp quick_copy_up',
313011
+ onClick: function onClick(e) {
313012
+ return copyKey(e, 'up');
313013
+ }
313014
+ }, /*#__PURE__*/React__default['default'].createElement(IconFont, {
313015
+ type: 'lmweb-icon_up'
313016
+ })), getMemoChildNode, hoverStatus && props.rowIndex < props.getLength - 1 && /*#__PURE__*/React__default['default'].createElement("span", {
313017
+ className: 'quick_copy_warp quick_copy_down',
313018
+ onClick: function onClick(e) {
313019
+ return copyKey(e, 'down');
313020
+ }
313021
+ }, /*#__PURE__*/React__default['default'].createElement(IconFont, {
313022
+ type: 'lmweb-icon_down'
313023
+ })));
312743
313024
  };
313025
+ /** true 不刷新, false 刷新 */
313026
+
313027
+
313028
+ var MemoEditableCell = /*#__PURE__*/React.memo(EditableCell$1, function (prev, next) {
313029
+ var pickProps = ['record', 'colIndex'];
313030
+ var p = lodash.pick(prev, pickProps);
313031
+ var n = lodash.pick(next, pickProps); // console.log(prev, next, '22', checkMemoShouldUploadSpecialFun(prev, next), isEqual(p, n))
312744
313032
 
313033
+ /** TODO: 在record中带有children,子列表数据修改之后,会导致父级的record对比不一样 */
313034
+
313035
+ if (!checkMemoShouldUploadSpecialFun(prev, next)) {
313036
+ return false;
313037
+ }
313038
+
313039
+ return lodash.isEqual(p, n);
313040
+ });
312745
313041
  var EditTable$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
312746
313042
  var defaultData = props.value,
312747
313043
  columns = props.columns,
@@ -312758,6 +313054,7 @@
312758
313054
  _props$quickOpetateCl = props.quickOpetateClearAll,
312759
313055
  quickOpetateClearAll = _props$quickOpetateCl === void 0 ? true : _props$quickOpetateCl,
312760
313056
  rowSelection = props.rowSelection,
313057
+ virtual = props.virtual,
312761
313058
  sortOpen = props.sortOpen,
312762
313059
  colSortOpen = props.colSortOpen,
312763
313060
  filterChange = props.filterChange,
@@ -312765,7 +313062,6 @@
312765
313062
  size = _props$size === void 0 ? 'small' : _props$size,
312766
313063
  recordCreatorProps = props.recordCreatorProps,
312767
313064
  _props$shouldUpdate = props.shouldUpdate,
312768
- shouldUpdate = _props$shouldUpdate === void 0 ? false : _props$shouldUpdate,
312769
313065
  resetProps = _objectWithoutProperties$1(props, _excluded6); // const [dataSource, setDataSource] = useState([]);
312770
313066
 
312771
313067
 
@@ -312778,20 +313074,15 @@
312778
313074
  setDataSource = _useControllableValue2[1]; // const [count, setCount] = useState(0);
312779
313075
 
312780
313076
 
312781
- var _useState5 = React.useState({}),
312782
- _useState6 = _slicedToArray$1(_useState5, 2),
312783
- _valid = _useState6[0],
312784
- setValid = _useState6[1];
312785
-
312786
- var _useState7 = React.useState([]),
313077
+ var _useState7 = React.useState({}),
312787
313078
  _useState8 = _slicedToArray$1(_useState7, 2),
312788
- localRowSelectList = _useState8[0],
312789
- setLocalRowSelectList = _useState8[1];
313079
+ _valid = _useState8[0],
313080
+ setValid = _useState8[1];
312790
313081
 
312791
313082
  var _useState9 = React.useState([]),
312792
313083
  _useState10 = _slicedToArray$1(_useState9, 2),
312793
- sortEditTable = _useState10[0],
312794
- setCallBackFalg = _useState10[1];
313084
+ localRowSelectList = _useState10[0],
313085
+ setLocalRowSelectList = _useState10[1];
312795
313086
  /** 当前展开的列 */
312796
313087
 
312797
313088
 
@@ -312800,21 +313091,10 @@
312800
313091
  expandedRowKeys = _useState12[0],
312801
313092
  setExpandedRowKeys = _useState12[1];
312802
313093
 
312803
- var dataSourceRef = React.useRef([]);
312804
- var sortDataSorceRef = React.useRef([]);
312805
- var deepDataSourceRef = React.useRef([]);
312806
-
312807
- var onSortEnd = function onSortEnd(active, over) {
312808
- var cloneArr = _toConsumableArray$1(dataSourceRef.current);
312809
-
312810
- var oldIndex = cloneArr.findIndex(function (v) {
312811
- return v[_rowKey] === active;
312812
- });
312813
- var newIndex = cloneArr.findIndex(function (v) {
312814
- return v[_rowKey] === over;
312815
- });
312816
- setDataSource(arrayMove(cloneArr, oldIndex, newIndex));
312817
- };
313094
+ var dataSourceRef = React.useRef(dataSource);
313095
+ var deepDataSourceRef = React.useRef(deepDataSourcePreKeys(dataSource, _rowKey));
313096
+ dataSourceRef.current = dataSource;
313097
+ deepDataSourceRef.current = deepDataSourcePreKeys(dataSource, _rowKey);
312818
313098
 
312819
313099
  var onColSortEnd = function onColSortEnd(active, over) {
312820
313100
  var _arrayMove;
@@ -312852,29 +313132,9 @@
312852
313132
  });
312853
313133
  setDataSource(res); // onChange?.(res)
312854
313134
  };
312855
-
312856
- React.useEffect(function () {
312857
- dataSourceRef.current = dataSource;
312858
- deepDataSourceRef.current = deepDataSourcePreKeys(dataSource, _rowKey);
312859
-
312860
- if (sortOpen) {
312861
- var _sortDataSorceRef$cur;
312862
-
312863
- var dataSourceKeys = dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (item) {
312864
- return item[_rowKey];
312865
- }).join(',');
312866
- var setCallBackFalgKeys = ((_sortDataSorceRef$cur = sortDataSorceRef.current) === null || _sortDataSorceRef$cur === void 0 ? void 0 : _sortDataSorceRef$cur.map(function (item) {
312867
- return item[_rowKey];
312868
- }).join(',')) || '';
312869
-
312870
- if (dataSourceKeys !== setCallBackFalgKeys) {
312871
- setCallBackFalg(dataSource);
312872
- sortDataSorceRef.current = dataSource;
312873
- }
312874
- }
312875
- }, [dataSource]);
312876
313135
  /** 本地缓存一个选择数据 */
312877
313136
 
313137
+
312878
313138
  React.useEffect(function () {
312879
313139
  if (rowSelection) {
312880
313140
  var selectedRowKeys = rowSelection.selectedRowKeys;
@@ -313085,10 +313345,12 @@
313085
313345
  setDataSource(res);
313086
313346
  };
313087
313347
 
313088
- var handleCopy = function handleCopy(key, value) {
313348
+ var handleCopy = function handleCopy(key, value, type, rowIndex) {
313089
313349
  var res = fn(dataSourceRef.current, function (draft) {
313090
- draft === null || draft === void 0 ? void 0 : draft.forEach(function (item) {
313091
- return item[key] = value;
313350
+ draft === null || draft === void 0 ? void 0 : draft.forEach(function (item, index) {
313351
+ if (type === 'up' && index < rowIndex || type === 'down' && index > rowIndex) {
313352
+ item[key] = value;
313353
+ }
313092
313354
  });
313093
313355
  });
313094
313356
  setDataSource(res);
@@ -313155,6 +313417,7 @@
313155
313417
  width: 48,
313156
313418
  maxWidth: 48,
313157
313419
  className: 'drag-visible',
313420
+ fixed: 'left',
313158
313421
  render: function render(_, record) {
313159
313422
  return /*#__PURE__*/React__default['default'].createElement(Dragger$1, {
313160
313423
  id: record[_rowKey] || record.id
@@ -313203,19 +313466,6 @@
313203
313466
  }
313204
313467
 
313205
313468
  var newCol = _objectSpread(_objectSpread({}, col), {}, {
313206
- shouldCellUpdate: function shouldCellUpdate(record, prevRecord) {
313207
- var _col$componentProps2;
313208
-
313209
- var dataIndex = col.dataIndex,
313210
- editable = col.editable,
313211
- relevanceCols = col.relevanceCols;
313212
-
313213
- if ((col === null || col === void 0 ? void 0 : col.fixed) || hasDisableOptions && hasDisableOptions.includes(dataIndex) || ((_col$componentProps2 = col.componentProps) === null || _col$componentProps2 === void 0 ? void 0 : _col$componentProps2.options) || editable === 'render' || !!relevanceCols || !!shouldUpdate || !!record.children) {
313214
- return true;
313215
- }
313216
-
313217
- return record[dataIndex] !== prevRecord[dataIndex];
313218
- },
313219
313469
  onCell: function onCell(record, rowIndex) {
313220
313470
  return {
313221
313471
  getLength: dataSource.length,
@@ -313257,24 +313507,24 @@
313257
313507
  return mapColumns(col, index);
313258
313508
  });
313259
313509
  return res;
313260
- }, [columns, isAdd, sortOpen, useQuickOpetate, sortEditTable, dataSource, _toConsumableArray$1(memoOptions)]);
313261
- var DraggableContainer = React.useCallback(function (_ref9) {
313262
- var _dataSourceRef$curren2;
313510
+ }, [columns, isAdd, sortOpen, useQuickOpetate, dataSource, _toConsumableArray$1(memoOptions)]);
313263
313511
 
313264
- var props = _extends$2({}, _ref9);
313512
+ var onSortEnd = function onSortEnd(active, over) {
313513
+ var cloneArr = _toConsumableArray$1(dataSourceRef.current);
313265
313514
 
313266
- return /*#__PURE__*/React__default['default'].createElement(DndContainer$1, {
313267
- move: onSortEnd
313268
- }, /*#__PURE__*/React__default['default'].createElement(SortableBox$1, {
313269
- items: (_dataSourceRef$curren2 = dataSourceRef.current) === null || _dataSourceRef$curren2 === void 0 ? void 0 : _dataSourceRef$curren2.map(function (item) {
313270
- return item[_rowKey];
313271
- })
313272
- }, /*#__PURE__*/React__default['default'].createElement("tbody", _objectSpread({}, props))));
313273
- }, [sortEditTable]);
313274
- var colDraggableContainer = React.useCallback(function (_ref10) {
313515
+ var oldIndex = cloneArr.findIndex(function (v) {
313516
+ return v[_rowKey] === active;
313517
+ });
313518
+ var newIndex = cloneArr.findIndex(function (v) {
313519
+ return v[_rowKey] === over;
313520
+ });
313521
+ setDataSource(arrayMove(cloneArr, oldIndex, newIndex));
313522
+ };
313523
+
313524
+ var colDraggableContainer = React.useCallback(function (_ref9) {
313275
313525
  var _React$Children;
313276
313526
 
313277
- var props = _extends$2({}, _ref10);
313527
+ var props = _extends$2({}, _ref9);
313278
313528
 
313279
313529
  return /*#__PURE__*/React__default['default'].createElement("tr", null, (_React$Children = React__default['default'].Children) === null || _React$Children === void 0 ? void 0 : _React$Children.map(props.children, function (child) {
313280
313530
  var _child$props, _child$props$column;
@@ -313283,39 +313533,11 @@
313283
313533
  return child;
313284
313534
  }
313285
313535
 
313286
- return /*#__PURE__*/React__default['default'].createElement(SortableItem$2, {
313536
+ return /*#__PURE__*/React__default['default'].createElement(SortableItem$3, {
313287
313537
  id: child.key
313288
313538
  }, child);
313289
313539
  }));
313290
313540
  }, [columns]);
313291
- var config = React.useMemo(function () {
313292
- var component = {
313293
- body: Object.assign({
313294
- row: sortOpen ? EditableSortRow : EditableRow$1,
313295
- cell: EditableCell$1
313296
- }, sortOpen ? {
313297
- wrapper: DraggableContainer
313298
- } : {})
313299
- };
313300
-
313301
- if (colSortOpen) {
313302
- component['header'] = {
313303
- row: colDraggableContainer
313304
- };
313305
- }
313306
-
313307
- return _objectSpread({
313308
- pagination: false,
313309
- tableLayout: 'fixed',
313310
- scroll: {
313311
- x: '100%'
313312
- },
313313
- rowKey: function rowKey(record) {
313314
- return record[_rowKey] || record.index || Math.random();
313315
- },
313316
- components: component
313317
- }, resetProps);
313318
- }, [resultColumns, dataSource, sortOpen, colSortOpen, size]);
313319
313541
  React.useImperativeHandle(ref, function () {
313320
313542
  return {
313321
313543
  setRow: handleSave,
@@ -313327,17 +313549,57 @@
313327
313549
  var isShowAddAction = React.useMemo(function () {
313328
313550
  return isEdit && isAdd || isHoverEdit && isAdd;
313329
313551
  }, [isEdit, isAdd, isHoverEdit]);
313552
+ var config = React.useRef(_objectSpread({
313553
+ pagination: false,
313554
+ tableLayout: 'fixed',
313555
+ scroll: {
313556
+ x: '100%'
313557
+ },
313558
+ rowKey: function rowKey(record) {
313559
+ return record[_rowKey] || record.index || Math.random();
313560
+ },
313561
+ components: {
313562
+ table: virtual ? VirtualTable$1 : null,
313563
+ body: Object.assign({
313564
+ row: function row(rowProps) {
313565
+ return sortOpen ? EditableSortRow(_objectSpread(_objectSpread({}, rowProps), {}, {
313566
+ virtual: virtual
313567
+ })) : EditableRow$1(_objectSpread(_objectSpread({}, rowProps), {}, {
313568
+ virtual: virtual
313569
+ }));
313570
+ },
313571
+ cell: MemoEditableCell
313572
+ }, sortOpen ? {
313573
+ wrapper: function wrapper(wrapperProps) {
313574
+ var _dataSourceRef$curren2;
313575
+
313576
+ return DraggableContainer(_objectSpread(_objectSpread({}, wrapperProps), {}, {
313577
+ virtual: virtual,
313578
+ keys: (_dataSourceRef$curren2 = dataSourceRef.current) === null || _dataSourceRef$curren2 === void 0 ? void 0 : _dataSourceRef$curren2.map(function (item) {
313579
+ return item[_rowKey];
313580
+ }),
313581
+ onSortEnd: onSortEnd
313582
+ }));
313583
+ }
313584
+ } : virtual ? {
313585
+ wrapper: VirtualWrapper$1
313586
+ } : {}),
313587
+ header: {
313588
+ row: colSortOpen ? colDraggableContainer : null
313589
+ }
313590
+ }
313591
+ }, resetProps));
313330
313592
 
313331
313593
  if (colSortOpen) {
313332
313594
  return /*#__PURE__*/React__default['default'].createElement("div", {
313333
313595
  className: "lm_editTable_warpper"
313334
- }, /*#__PURE__*/React__default['default'].createElement(DndContainer$1, {
313596
+ }, /*#__PURE__*/React__default['default'].createElement(DndContainer$2, {
313335
313597
  move: onColSortEnd
313336
- }, /*#__PURE__*/React__default['default'].createElement(SortableBox$2, {
313598
+ }, /*#__PURE__*/React__default['default'].createElement(SortableBox$1, {
313337
313599
  items: columns.reduce(function (acc, item) {
313338
313600
  return [].concat(_toConsumableArray$1(acc), [item.dataIndex]);
313339
313601
  }, [])
313340
- }, /*#__PURE__*/React__default['default'].createElement(Table$1, _objectSpread(_objectSpread({}, config), {}, {
313602
+ }, /*#__PURE__*/React__default['default'].createElement(Table$1, _objectSpread(_objectSpread({}, config.current), {}, {
313341
313603
  size: size || 'small',
313342
313604
  columns: resultColumns,
313343
313605
  rowClassName: "editable-row",
@@ -313371,7 +313633,7 @@
313371
313633
 
313372
313634
  return /*#__PURE__*/React__default['default'].createElement("div", {
313373
313635
  className: "lm_editTable_warpper"
313374
- }, /*#__PURE__*/React__default['default'].createElement(Table$1, _objectSpread(_objectSpread({}, config), {}, {
313636
+ }, /*#__PURE__*/React__default['default'].createElement(Table$1, _objectSpread(_objectSpread({}, config.current), {}, {
313375
313637
  size: size || 'small',
313376
313638
  columns: resultColumns,
313377
313639
  rowClassName: "editable-row",
@@ -314079,7 +314341,7 @@
314079
314341
  }
314080
314342
  }
314081
314343
 
314082
- var _excluded$2T = ["prefixCls", "getPopupContainer", "className", "placement", "size", "disabled", "bordered", "placeholder", "status"];
314344
+ var _excluded$2W = ["prefixCls", "getPopupContainer", "className", "placement", "size", "disabled", "bordered", "placeholder", "status"];
314083
314345
  function generateRangePicker$1(generateConfig) {
314084
314346
  var RangePicker$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
314085
314347
  var customizePrefixCls = props.prefixCls,
@@ -314092,7 +314354,7 @@
314092
314354
  bordered = _props$bordered === void 0 ? true : _props$bordered,
314093
314355
  placeholder = props.placeholder,
314094
314356
  customStatus = props.status,
314095
- restProps = _objectWithoutProperties$1(props, _excluded$2T);
314357
+ restProps = _objectWithoutProperties$1(props, _excluded$2W);
314096
314358
 
314097
314359
  var innerRef = React.useRef(null);
314098
314360
 
@@ -314192,7 +314454,7 @@
314192
314454
  return RangePicker$1;
314193
314455
  }
314194
314456
 
314195
- var _excluded$2U = ["prefixCls", "getPopupContainer", "className", "size", "bordered", "placement", "placeholder", "disabled", "status"];
314457
+ var _excluded$2X = ["prefixCls", "getPopupContainer", "className", "size", "bordered", "placement", "placeholder", "disabled", "status"];
314196
314458
  function generatePicker$2(generateConfig) {
314197
314459
  function getPicker(picker, displayName) {
314198
314460
  var Picker$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
@@ -314206,7 +314468,7 @@
314206
314468
  placeholder = props.placeholder,
314207
314469
  customDisabled = props.disabled,
314208
314470
  customStatus = props.status,
314209
- restProps = _objectWithoutProperties$1(props, _excluded$2U);
314471
+ restProps = _objectWithoutProperties$1(props, _excluded$2X);
314210
314472
 
314211
314473
  warning$6(picker !== 'quarter', displayName, "DatePicker.".concat(displayName, " is legacy usage. Please use DatePicker[picker='").concat(picker, "'] directly."));
314212
314474
 
@@ -314428,13 +314690,13 @@
314428
314690
  return propValue;
314429
314691
  };
314430
314692
 
314431
- var _excluded$2V = ["prefixCls", "title", "content", "_overlay"];
314693
+ var _excluded$2Y = ["prefixCls", "title", "content", "_overlay"];
314432
314694
  var Popover$1 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
314433
314695
  var customizePrefixCls = _ref.prefixCls,
314434
314696
  title = _ref.title,
314435
314697
  content = _ref.content,
314436
314698
  _overlay = _ref._overlay,
314437
- otherProps = _objectWithoutProperties$1(_ref, _excluded$2V);
314699
+ otherProps = _objectWithoutProperties$1(_ref, _excluded$2Y);
314438
314700
 
314439
314701
  var _React$useContext = React.useContext(ConfigContext),
314440
314702
  getPrefixCls = _React$useContext.getPrefixCls;
@@ -315283,7 +315545,7 @@
315283
315545
 
315284
315546
  var KeyCode$1 = /*@__PURE__*/getDefaultExportFromCjs(KeyCode_1);
315285
315547
 
315286
- var _excluded$2W = ["style", "noStyle", "disabled"];
315548
+ var _excluded$2Z = ["style", "noStyle", "disabled"];
315287
315549
  var inlineStyle$1 = {
315288
315550
  border: 0,
315289
315551
  background: 'transparent',
@@ -315312,7 +315574,7 @@
315312
315574
  var style = props.style,
315313
315575
  noStyle = props.noStyle,
315314
315576
  disabled = props.disabled,
315315
- restProps = _objectWithoutProperties$1(props, _excluded$2W);
315577
+ restProps = _objectWithoutProperties$1(props, _excluded$2Z);
315316
315578
 
315317
315579
  var mergedStyle = {};
315318
315580
 
@@ -315523,7 +315785,7 @@
315523
315785
  }, conditions);
315524
315786
  });
315525
315787
 
315526
- var _excluded$2X = ["prefixCls", "component", "className", "aria-label", "setContentRef", "children"];
315788
+ var _excluded$2_ = ["prefixCls", "component", "className", "aria-label", "setContentRef", "children"];
315527
315789
 
315528
315790
  var Typography$2 = function Typography(_ref, ref) {
315529
315791
  var customizePrefixCls = _ref.prefixCls,
@@ -315533,7 +315795,7 @@
315533
315795
  ariaLabel = _ref['aria-label'],
315534
315796
  setContentRef = _ref.setContentRef,
315535
315797
  children = _ref.children,
315536
- restProps = _objectWithoutProperties$1(_ref, _excluded$2X);
315798
+ restProps = _objectWithoutProperties$1(_ref, _excluded$2_);
315537
315799
 
315538
315800
  var _React$useContext = React.useContext(ConfigContext),
315539
315801
  getPrefixCls = _React$useContext.getPrefixCls,
@@ -315776,7 +316038,7 @@
315776
316038
  EllipsisTooltip$1.displayName = 'EllipsisTooltip';
315777
316039
  }
315778
316040
 
315779
- var _excluded$2Y = ["prefixCls", "className", "style", "type", "disabled", "children", "ellipsis", "editable", "copyable", "component", "title"];
316041
+ var _excluded$2$ = ["prefixCls", "className", "style", "type", "disabled", "children", "ellipsis", "editable", "copyable", "component", "title"];
315780
316042
 
315781
316043
  function wrapperDecorations$1(_ref, content) {
315782
316044
  var mark = _ref.mark,
@@ -315828,7 +316090,7 @@
315828
316090
  copyable = props.copyable,
315829
316091
  component = props.component,
315830
316092
  title = props.title,
315831
- restProps = _objectWithoutProperties$1(props, _excluded$2Y);
316093
+ restProps = _objectWithoutProperties$1(props, _excluded$2$);
315832
316094
 
315833
316095
  var _React$useContext = React.useContext(ConfigContext),
315834
316096
  getPrefixCls = _React$useContext.getPrefixCls,
@@ -316246,12 +316508,12 @@
316246
316508
  });
316247
316509
  });
316248
316510
 
316249
- var _excluded$2Z = ["ellipsis", "rel"];
316511
+ var _excluded$30 = ["ellipsis", "rel"];
316250
316512
 
316251
316513
  var Link$2 = function Link(_ref, ref) {
316252
316514
  var ellipsis = _ref.ellipsis,
316253
316515
  rel = _ref.rel,
316254
- restProps = _objectWithoutProperties$1(_ref, _excluded$2Z);
316516
+ restProps = _objectWithoutProperties$1(_ref, _excluded$30);
316255
316517
 
316256
316518
  warning$6(_typeof$1(ellipsis) !== 'object', 'Typography.Link', '`ellipsis` only supports boolean value.');
316257
316519
  var baseRef = React.useRef(null);
@@ -316285,11 +316547,11 @@
316285
316547
 
316286
316548
  var Paragraph$7 = /*#__PURE__*/React.forwardRef(Paragraph$6);
316287
316549
 
316288
- var _excluded$2_ = ["ellipsis"];
316550
+ var _excluded$31 = ["ellipsis"];
316289
316551
 
316290
316552
  var Text$2 = function Text(_ref, ref) {
316291
316553
  var ellipsis = _ref.ellipsis,
316292
- restProps = _objectWithoutProperties$1(_ref, _excluded$2_);
316554
+ restProps = _objectWithoutProperties$1(_ref, _excluded$31);
316293
316555
 
316294
316556
  var mergedEllipsis = React.useMemo(function () {
316295
316557
  if (ellipsis && _typeof$1(ellipsis) === 'object') {
@@ -316309,13 +316571,13 @@
316309
316571
 
316310
316572
  var Text$3 = /*#__PURE__*/React.forwardRef(Text$2);
316311
316573
 
316312
- var _excluded$2$ = ["level"];
316574
+ var _excluded$32 = ["level"];
316313
316575
  var TITLE_ELE_LIST$1 = tupleNum$1(1, 2, 3, 4, 5);
316314
316576
 
316315
316577
  var Title$3 = function Title(props, ref) {
316316
316578
  var _props$level = props.level,
316317
316579
  level = _props$level === void 0 ? 1 : _props$level,
316318
- restProps = _objectWithoutProperties$1(props, _excluded$2$);
316580
+ restProps = _objectWithoutProperties$1(props, _excluded$32);
316319
316581
 
316320
316582
  var component;
316321
316583
 
@@ -316420,13 +316682,13 @@
316420
316682
  RefAutoComplete$1.Option = Option;
316421
316683
  RefAutoComplete$1.AntdAutoComplete = RefAutoComplete;
316422
316684
 
316423
- var _excluded$30 = ["children", "treeData", "value", "defaultLabel"];
316685
+ var _excluded$33 = ["children", "treeData", "value", "defaultLabel"];
316424
316686
  var CLMTreeSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
316425
316687
  var children = props.children,
316426
316688
  treeData = props.treeData,
316427
316689
  value = props.value,
316428
316690
  defaultLabel = props.defaultLabel,
316429
- resetProps = _objectWithoutProperties$1(props, _excluded$30);
316691
+ resetProps = _objectWithoutProperties$1(props, _excluded$33);
316430
316692
 
316431
316693
  var deepChildren = React.useCallback(function (arr) {
316432
316694
  var flag = false;
@@ -316551,7 +316813,7 @@
316551
316813
  return ErrorBoundary;
316552
316814
  }(React.Component);
316553
316815
 
316554
- var _excluded$31 = ["description", "prefixCls", "message", "banner", "className", "style", "onMouseEnter", "onMouseLeave", "onClick", "afterClose", "showIcon", "closable", "closeText", "closeIcon", "action", "duration"];
316816
+ var _excluded$34 = ["description", "prefixCls", "message", "banner", "className", "style", "onMouseEnter", "onMouseLeave", "onClick", "afterClose", "showIcon", "closable", "closeText", "closeIcon", "action", "duration"];
316555
316817
  var iconMapFilled$1 = {
316556
316818
  success: CheckCircleFilled$2,
316557
316819
  info: InfoCircleFilled$2,
@@ -316624,7 +316886,7 @@
316624
316886
  closeIcon = _ref$closeIcon === void 0 ? /*#__PURE__*/React.createElement(CloseOutlined$2, null) : _ref$closeIcon,
316625
316887
  action = _ref.action,
316626
316888
  duration = _ref.duration,
316627
- props = _objectWithoutProperties$1(_ref, _excluded$31);
316889
+ props = _objectWithoutProperties$1(_ref, _excluded$34);
316628
316890
 
316629
316891
  var _React$useState = React.useState(false),
316630
316892
  _React$useState2 = _slicedToArray$1(_React$useState, 2),
@@ -317054,7 +317316,7 @@
317054
317316
  };
317055
317317
  };
317056
317318
 
317057
- var _excluded$32 = ["className", "onUrge", "onDeleteComment"];
317319
+ var _excluded$35 = ["className", "onUrge", "onDeleteComment"];
317058
317320
  var prefixCls$c = 'lm_approval';
317059
317321
  var colors = ['#36BCF1', '#AE86DC', '#8BD248', '#F5A173'];
317060
317322
  var cacheColorMap = new Map();
@@ -317462,7 +317724,7 @@
317462
317724
  onUrge = _props$onUrge === void 0 ? function () {} : _props$onUrge,
317463
317725
  _props$onDeleteCommen2 = props.onDeleteComment,
317464
317726
  onDeleteComment = _props$onDeleteCommen2 === void 0 ? function () {} : _props$onDeleteCommen2,
317465
- others = _objectWithoutProperties$1(props, _excluded$32);
317727
+ others = _objectWithoutProperties$1(props, _excluded$35);
317466
317728
 
317467
317729
  var _useState = React.useState(false),
317468
317730
  _useState2 = _slicedToArray$1(_useState, 2),
@@ -319253,7 +319515,7 @@
319253
319515
  return nodes;
319254
319516
  }
319255
319517
 
319256
- var _excluded$33 = ["defaultExpandAll", "defaultExpandParent", "defaultExpandedKeys"],
319518
+ var _excluded$36 = ["defaultExpandAll", "defaultExpandParent", "defaultExpandedKeys"],
319257
319519
  _excluded2$J = ["prefixCls", "className"];
319258
319520
  var ConfigContext$6 = ConfigProvider$1.ConfigContext;
319259
319521
 
@@ -319278,7 +319540,7 @@
319278
319540
  var defaultExpandAll = _ref2.defaultExpandAll,
319279
319541
  defaultExpandParent = _ref2.defaultExpandParent,
319280
319542
  defaultExpandedKeys = _ref2.defaultExpandedKeys,
319281
- props = _objectWithoutProperties$1(_ref2, _excluded$33);
319543
+ props = _objectWithoutProperties$1(_ref2, _excluded$36);
319282
319544
 
319283
319545
  // Shift click usage
319284
319546
  var lastSelectedKey = React.useRef();
@@ -319776,11 +320038,11 @@
319776
320038
  blockNode: false
319777
320039
  };
319778
320040
 
319779
- var _excluded$34 = ["className"];
320041
+ var _excluded$37 = ["className"];
319780
320042
  var prefixCls$d = 'lm_tree';
319781
320043
  var LmTree = /*#__PURE__*/React.forwardRef(function (props, ref) {
319782
320044
  var className = props.className,
319783
- rest = _objectWithoutProperties$1(props, _excluded$34);
320045
+ rest = _objectWithoutProperties$1(props, _excluded$37);
319784
320046
 
319785
320047
  return /*#__PURE__*/React__default['default'].createElement(Tree$2, _objectSpread(_objectSpread({
319786
320048
  ref: ref
@@ -320839,7 +321101,7 @@
320839
321101
  }, unitNodes);
320840
321102
  }
320841
321103
 
320842
- var _excluded$35 = ["prefixCls", "count", "className", "motionClassName", "style", "title", "show", "component", "children"];
321104
+ var _excluded$38 = ["prefixCls", "count", "className", "motionClassName", "style", "title", "show", "component", "children"];
320843
321105
 
320844
321106
  var ScrollNumber$1 = function ScrollNumber(_ref) {
320845
321107
  var customizePrefixCls = _ref.prefixCls,
@@ -320852,7 +321114,7 @@
320852
321114
  _ref$component = _ref.component,
320853
321115
  component = _ref$component === void 0 ? 'sup' : _ref$component,
320854
321116
  children = _ref.children,
320855
- restProps = _objectWithoutProperties$1(_ref, _excluded$35);
321117
+ restProps = _objectWithoutProperties$1(_ref, _excluded$38);
320856
321118
 
320857
321119
  var _React$useContext = React.useContext(ConfigContext$1),
320858
321120
  getPrefixCls = _React$useContext.getPrefixCls;
@@ -320902,7 +321164,7 @@
320902
321164
  return /*#__PURE__*/React.createElement(component, newProps, numberNodes);
320903
321165
  };
320904
321166
 
320905
- var _excluded$36 = ["prefixCls", "scrollNumberPrefixCls", "children", "status", "text", "color", "count", "overflowCount", "dot", "size", "title", "offset", "style", "className", "showZero"];
321167
+ var _excluded$39 = ["prefixCls", "scrollNumberPrefixCls", "children", "status", "text", "color", "count", "overflowCount", "dot", "size", "title", "offset", "style", "className", "showZero"];
320906
321168
 
320907
321169
  var Badge$1 = function Badge(_ref) {
320908
321170
  var _classNames, _classNames2;
@@ -320927,7 +321189,7 @@
320927
321189
  className = _ref.className,
320928
321190
  _ref$showZero = _ref.showZero,
320929
321191
  showZero = _ref$showZero === void 0 ? false : _ref$showZero,
320930
- restProps = _objectWithoutProperties$1(_ref, _excluded$36);
321192
+ restProps = _objectWithoutProperties$1(_ref, _excluded$39);
320931
321193
 
320932
321194
  var _React$useContext = React.useContext(ConfigContext$1),
320933
321195
  getPrefixCls = _React$useContext.getPrefixCls,
@@ -321062,7 +321324,7 @@
321062
321324
 
321063
321325
  Badge$1.Ribbon = Ribbon$1;
321064
321326
 
321065
- var _excluded$37 = ["prefixCls", "type", "orientation", "orientationMargin", "className", "children", "dashed", "plain"];
321327
+ var _excluded$3a = ["prefixCls", "type", "orientation", "orientationMargin", "className", "children", "dashed", "plain"];
321066
321328
 
321067
321329
  var Divider$5 = function Divider(props) {
321068
321330
  var _classNames;
@@ -321081,7 +321343,7 @@
321081
321343
  children = props.children,
321082
321344
  dashed = props.dashed,
321083
321345
  plain = props.plain,
321084
- restProps = _objectWithoutProperties$1(props, _excluded$37);
321346
+ restProps = _objectWithoutProperties$1(props, _excluded$3a);
321085
321347
 
321086
321348
  var prefixCls = getPrefixCls('divider', customizePrefixCls);
321087
321349
  var orientationPrefix = orientation.length > 0 ? "-".concat(orientation) : orientation;
@@ -321459,7 +321721,7 @@
321459
321721
  }
321460
321722
  }; // 状态管理操作
321461
321723
 
321462
- var reducer$5 = function reducer(state, action) {
321724
+ var reducer$6 = function reducer(state, action) {
321463
321725
  var resize = action.resize,
321464
321726
  transform = action.transform,
321465
321727
  current = action.current;
@@ -321487,7 +321749,7 @@
321487
321749
  }
321488
321750
  }; // 仅在初始化时触发一次
321489
321751
 
321490
- var initialState$3 = function initialState(props) {
321752
+ var initialState$4 = function initialState(props) {
321491
321753
  var initialIndex = props.initialIndex;
321492
321754
  return _objectSpread(_objectSpread({}, defaultState), {}, {
321493
321755
  currentIndex: initialIndex
@@ -321838,10 +322100,10 @@
321838
322100
  var Root = /*#__PURE__*/React.forwardRef(function (props, ref) {
321839
322101
  var bodyRef = React.useRef(null);
321840
322102
  var initialState = React.useMemo(function () {
321841
- return initialState$3(props);
322103
+ return initialState$4(props);
321842
322104
  }, []);
321843
322105
 
321844
- var _useReducer = React.useReducer(reducer$5, initialState),
322106
+ var _useReducer = React.useReducer(reducer$6, initialState),
321845
322107
  _useReducer2 = _slicedToArray$1(_useReducer, 2),
321846
322108
  state = _useReducer2[0],
321847
322109
  dispatch = _useReducer2[1]; // 获取核心Methods
@@ -321907,7 +322169,7 @@
321907
322169
 
321908
322170
  }; // 状态管理操作
321909
322171
 
321910
- var reducer$6 = function reducer(state, action) {
322172
+ var reducer$7 = function reducer(state, action) {
321911
322173
  var result = action.result,
321912
322174
  init = action.init;
321913
322175
 
@@ -321923,7 +322185,7 @@
321923
322185
  }
321924
322186
  }; // 仅在初始化时触发一次
321925
322187
 
321926
- var initialState$4 = function initialState() {
322188
+ var initialState$5 = function initialState() {
321927
322189
  return _objectSpread({}, defaultState$1);
321928
322190
  };
321929
322191
 
@@ -323597,14 +323859,14 @@
323597
323859
 
323598
323860
  var Body$1 = /*#__PURE__*/React__default['default'].memo(Index$b);
323599
323861
 
323600
- var _excluded$38 = ["value", "onChange", "leftIcon", "rightIcon"];
323862
+ var _excluded$3b = ["value", "onChange", "leftIcon", "rightIcon"];
323601
323863
 
323602
323864
  var ResetSlider = function ResetSlider(_ref) {
323603
323865
  var value = _ref.value,
323604
323866
  _onChange = _ref.onChange,
323605
323867
  leftIcon = _ref.leftIcon,
323606
323868
  rightIcon = _ref.rightIcon,
323607
- props = _objectWithoutProperties$1(_ref, _excluded$38);
323869
+ props = _objectWithoutProperties$1(_ref, _excluded$3b);
323608
323870
 
323609
323871
  // 减
323610
323872
  var decrement = function decrement() {
@@ -323758,10 +324020,10 @@
323758
324020
 
323759
324021
  var LmBox = /*#__PURE__*/React.forwardRef(function (props, ref) {
323760
324022
  var initialState = React.useMemo(function () {
323761
- return initialState$4();
324023
+ return initialState$5();
323762
324024
  }, []);
323763
324025
 
323764
- var _useReducer = React.useReducer(reducer$6, initialState),
324026
+ var _useReducer = React.useReducer(reducer$7, initialState),
323765
324027
  _useReducer2 = _slicedToArray$1(_useReducer, 2),
323766
324028
  state = _useReducer2[0],
323767
324029
  dispatch = _useReducer2[1]; // 获取核心Methods
@@ -323824,7 +324086,7 @@
323824
324086
 
323825
324087
  }; // 状态管理操作
323826
324088
 
323827
- var reducer$7 = function reducer(state, action) {
324089
+ var reducer$8 = function reducer(state, action) {
323828
324090
  var transform = action.transform,
323829
324091
  current = action.current,
323830
324092
  visible = action.visible;
@@ -323857,7 +324119,7 @@
323857
324119
  }
323858
324120
  }; // 仅在初始化时触发一次
323859
324121
 
323860
- var initialState$5 = function initialState(props) {
324122
+ var initialState$6 = function initialState(props) {
323861
324123
  var initialIndex = props.initialIndex;
323862
324124
  return _objectSpread(_objectSpread({}, defaultState$2), {}, {
323863
324125
  currentIndex: initialIndex
@@ -324249,10 +324511,10 @@
324249
324511
  var LmImageViewerRoot = function LmImageViewerRoot(props, ref) {
324250
324512
  var previewRef = React.useRef(null);
324251
324513
  var initialState = React.useMemo(function () {
324252
- return initialState$5(props);
324514
+ return initialState$6(props);
324253
324515
  }, []);
324254
324516
 
324255
- var _useReducer = React.useReducer(reducer$7, initialState),
324517
+ var _useReducer = React.useReducer(reducer$8, initialState),
324256
324518
  _useReducer2 = _slicedToArray$1(_useReducer, 2),
324257
324519
  state = _useReducer2[0],
324258
324520
  dispatch = _useReducer2[1]; // 获取核心Methods