linkmore-design 1.1.13-alpha.10 → 1.1.13-alpha.12

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 (50) hide show
  1. package/dist/LmEditTable/components/DraggableContainer.d.ts +4 -1
  2. package/dist/LmEditTable/components/index.d.ts +4 -1
  3. package/dist/LmEditTable/hooks/useForkRef.d.ts +2 -0
  4. package/dist/LmEditTable/rowSort/DndContainerRow.d.ts +10 -0
  5. package/dist/LmEditTable/util.d.ts +5 -0
  6. package/dist/LmEditTable/virtual/VirtualRow.d.ts +1 -0
  7. package/dist/index.umd.js +172 -33
  8. package/dist/index.umd.min.js +7 -7
  9. package/dist/variables.css +7 -0
  10. package/es/LmEditTable/DragHandle.js +1 -1
  11. package/es/LmEditTable/EditTable.js +22 -8
  12. package/es/LmEditTable/components/DraggableContainer.d.ts +4 -1
  13. package/es/LmEditTable/components/DraggableContainer.js +10 -3
  14. package/es/LmEditTable/components/index.d.ts +4 -1
  15. package/es/LmEditTable/hooks/useForkRef.d.ts +2 -0
  16. package/es/LmEditTable/hooks/useForkRef.js +22 -0
  17. package/es/LmEditTable/rowSort/DndContainerRow.d.ts +10 -0
  18. package/es/LmEditTable/rowSort/DndContainerRow.js +81 -0
  19. package/es/LmEditTable/sortableItem.js +1 -0
  20. package/es/LmEditTable/style/index.css +7 -0
  21. package/es/LmEditTable/style/variables.css +7 -0
  22. package/es/LmEditTable/util.d.ts +5 -0
  23. package/es/LmEditTable/util.js +13 -0
  24. package/es/LmEditTable/virtual/VirtualRow.d.ts +1 -0
  25. package/es/LmEditTable/virtual/VirtualRow.js +5 -3
  26. package/es/LmEditTable/virtual/VirtualRowBack.js +12 -14
  27. package/es/LmFilter/filterFns/index.js +1 -1
  28. package/es/LmTable/virTual/VirtualRow.js +12 -14
  29. package/es/styles/variables.css +7 -0
  30. package/lib/LmEditTable/DragHandle.js +1 -1
  31. package/lib/LmEditTable/EditTable.js +21 -7
  32. package/lib/LmEditTable/components/DraggableContainer.d.ts +4 -1
  33. package/lib/LmEditTable/components/DraggableContainer.js +12 -5
  34. package/lib/LmEditTable/components/index.d.ts +4 -1
  35. package/lib/LmEditTable/hooks/useForkRef.d.ts +2 -0
  36. package/lib/LmEditTable/hooks/useForkRef.js +29 -0
  37. package/lib/LmEditTable/rowSort/DndContainerRow.d.ts +10 -0
  38. package/lib/LmEditTable/rowSort/DndContainerRow.js +99 -0
  39. package/lib/LmEditTable/sortableItem.js +1 -0
  40. package/lib/LmEditTable/style/index.css +7 -0
  41. package/lib/LmEditTable/style/variables.css +7 -0
  42. package/lib/LmEditTable/util.d.ts +5 -0
  43. package/lib/LmEditTable/util.js +15 -0
  44. package/lib/LmEditTable/virtual/VirtualRow.d.ts +1 -0
  45. package/lib/LmEditTable/virtual/VirtualRow.js +8 -3
  46. package/lib/LmEditTable/virtual/VirtualRowBack.js +12 -14
  47. package/lib/LmFilter/filterFns/index.js +1 -1
  48. package/lib/LmTable/virTual/VirtualRow.js +12 -14
  49. package/lib/styles/variables.css +7 -0
  50. package/package.json +1 -1
@@ -9760,6 +9760,10 @@ p {
9760
9760
  flex-direction: row;
9761
9761
  flex-wrap: nowrap;
9762
9762
  }
9763
+ .lm_editTable_warpper .lm_custom_cell_td.ant-table-cell-with-append .ant-table-row-expand-icon {
9764
+ margin-right: 8px;
9765
+ flex: none;
9766
+ }
9763
9767
  .lm_editTable_warpper .lm_custom_cell_td > .ant-form-item {
9764
9768
  flex: 1 1 auto;
9765
9769
  }
@@ -9876,6 +9880,9 @@ p {
9876
9880
  .lm_table_append_add_popover .ant-popover-inner-content ul li:hover {
9877
9881
  background-color: var(--color-15);
9878
9882
  }
9883
+ .lm_edittable_col_sort_item {
9884
+ overflow: hidden;
9885
+ }
9879
9886
  .lm_filter_wrapper .lm_filter_container .lm_filter {
9880
9887
  display: flex;
9881
9888
  flex-wrap: wrap;
@@ -17,7 +17,7 @@ export var Dragger = function Dragger(_ref) {
17
17
  touchAction: 'none',
18
18
  cursor: 'move'
19
19
  },
20
- className: 'icon_drag' + (isDragging ? 'bing' : '')
20
+ className: "icon_drag".concat(isDragging ? 'bing' : '')
21
21
  }));
22
22
  };
23
23
  export default Dragger;
@@ -61,7 +61,7 @@ import SortableItem from './sortableItem';
61
61
  import ColSortableItem from './sortableItemCol';
62
62
  import DragHandle from './DragHandle';
63
63
  import UploadOss from '../UploadOss';
64
- import { isObjEmpty, deepDataSourcePreKeys, isExpandRow, checkRowKeyByDataSource, checkMemoShouldUploadSpecialFun } from './util';
64
+ import { isObjEmpty, deepDataSourcePreKeys, isExpandRow, checkRowKeyByDataSource, checkMemoShouldUploadSpecialFun, checkExpandIconColumnIndex } from './util';
65
65
  import { DraggableContainer, BottomOpetateComponent, QuickOpetate } from './components';
66
66
  import cls from 'classnames';
67
67
  import { VirtualTable, VirtualWrapper, VirtualRow } from './virtual';
@@ -672,7 +672,9 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
672
672
  recordCreatorProps = props.recordCreatorProps,
673
673
  _props$shouldUpdate = props.shouldUpdate,
674
674
  shouldUpdate = _props$shouldUpdate === void 0 ? false : _props$shouldUpdate,
675
- resetProps = __rest(props, ["value", "columns", "isEdit", "isAdd", "onChange", "rowKey", "rowHoverEdit", "isUseForm", "isHoverEdit", "useQuickOpetate", "quickOpetateClearAll", "rowSelection", "virtual", "sortOpen", "disabled", "colSortOpen", "indexCol", "filterChange", "size", "recordCreatorProps", "shouldUpdate"]);
675
+ _props$loading = props.loading,
676
+ loading = _props$loading === void 0 ? false : _props$loading,
677
+ resetProps = __rest(props, ["value", "columns", "isEdit", "isAdd", "onChange", "rowKey", "rowHoverEdit", "isUseForm", "isHoverEdit", "useQuickOpetate", "quickOpetateClearAll", "rowSelection", "virtual", "sortOpen", "disabled", "colSortOpen", "indexCol", "filterChange", "size", "recordCreatorProps", "shouldUpdate", "loading"]);
676
678
 
677
679
  var _useControllableValue = useControllableValue({
678
680
  value: checkRowKeyByDataSource(props.value, _rowKey),
@@ -709,6 +711,7 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
709
711
  var deepDataSourceRef = useRef(deepDataSourcePreKeys(dataSource, _rowKey));
710
712
  dataSourceRef.current = dataSource;
711
713
  deepDataSourceRef.current = deepDataSourcePreKeys(dataSource, _rowKey);
714
+ var tableWarpRef = useRef(null);
712
715
 
713
716
  var onColSortEnd = function onColSortEnd(active, over) {
714
717
  var _a;
@@ -857,7 +860,7 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
857
860
  return newData;
858
861
  };
859
862
 
860
- var res = filter(dataSource, key);
863
+ var res = filter(dataSourceRef.current, key);
861
864
  setDataSource(res);
862
865
  } else {
863
866
  if (((_c = dataSourceRef.current) === null || _c === void 0 ? void 0 : _c.length) === 1 && !quickOpetateClearAll) {
@@ -1279,14 +1282,17 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
1279
1282
  cell: MemoEditableCell
1280
1283
  }, sortOpen ? {
1281
1284
  wrapper: function wrapper(wrapperProps) {
1282
- var _a;
1285
+ var _a, _b, _c;
1283
1286
 
1284
1287
  return DraggableContainer(Object.assign(Object.assign({}, wrapperProps), {
1285
1288
  virtual: virtual,
1286
1289
  keys: (_a = dataSourceRef.current) === null || _a === void 0 ? void 0 : _a.map(function (item) {
1287
1290
  return item[_rowKey];
1288
1291
  }),
1289
- onSortEnd: onSortEnd
1292
+ options: dataSourceRef.current,
1293
+ rowKey: _rowKey,
1294
+ onSortEnd: onSortEnd,
1295
+ tableWidth: (_c = (_b = tableWarpRef === null || tableWarpRef === void 0 ? void 0 : tableWarpRef.current) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect()) === null || _c === void 0 ? void 0 : _c.width
1290
1296
  }));
1291
1297
  }
1292
1298
  } : virtual ? {
@@ -1305,7 +1311,8 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
1305
1311
 
1306
1312
  if (colSortOpen) {
1307
1313
  return /*#__PURE__*/React.createElement("div", {
1308
- className: "lm_editTable_warpper"
1314
+ className: "lm_editTable_warpper",
1315
+ ref: tableWarpRef
1309
1316
  }, /*#__PURE__*/React.createElement(DndContainer, {
1310
1317
  move: onColSortEnd
1311
1318
  }, /*#__PURE__*/React.createElement(SortableBoxCol, {
@@ -1313,6 +1320,7 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
1313
1320
  return [].concat(_toConsumableArray(acc), [item.dataIndex]);
1314
1321
  }, [])
1315
1322
  }, /*#__PURE__*/React.createElement(Table, Object.assign({}, config.current, {
1323
+ loading: loading,
1316
1324
  size: size || 'small',
1317
1325
  columns: resultColumns,
1318
1326
  rowClassName: "editable-row",
@@ -1341,19 +1349,25 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
1341
1349
 
1342
1350
 
1343
1351
  return /*#__PURE__*/React.createElement("div", {
1344
- className: "lm_editTable_warpper"
1352
+ className: "lm_editTable_warpper",
1353
+ ref: tableWarpRef
1345
1354
  }, /*#__PURE__*/React.createElement(Table, Object.assign({}, config.current, {
1346
1355
  size: size || 'small',
1347
1356
  columns: resultColumns,
1348
1357
  rowClassName: "editable-row",
1349
1358
  bordered: true,
1359
+ loading: loading,
1350
1360
  pagination: false,
1351
1361
  // components={tableComponents}
1352
1362
  expandable: (resetProps === null || resetProps === void 0 ? void 0 : resetProps.expandable) || {
1353
1363
  expandedRowKeys: expandedRowKeys,
1354
1364
  fixed: true,
1355
1365
  // indentSize: 0,
1356
- expandIconColumnIndex: rowSelection && sortOpen ? 3 : rowSelection || sortOpen ? 2 : 0,
1366
+ expandIconColumnIndex: checkExpandIconColumnIndex({
1367
+ rowSelection: rowSelection,
1368
+ sortOpen: sortOpen,
1369
+ indexCol: indexCol
1370
+ }) || 0,
1357
1371
  onExpandedRowsChange: function onExpandedRowsChange(expandedRows) {
1358
1372
  return setExpandedRowKeys(expandedRows);
1359
1373
  }
@@ -1,7 +1,10 @@
1
- declare const DraggableContainer: ({ keys, onSortEnd, virtual, ...props }: {
1
+ declare const DraggableContainer: ({ keys, onSortEnd, virtual, rowKey, options, tableWidth, ...props }: {
2
2
  [x: string]: any;
3
3
  keys: any;
4
4
  onSortEnd: any;
5
5
  virtual: any;
6
+ rowKey: any;
7
+ options: any;
8
+ tableWidth: any;
6
9
  }) => JSX.Element;
7
10
  export default DraggableContainer;
@@ -12,7 +12,7 @@ var __rest = this && this.__rest || function (s, e) {
12
12
  };
13
13
 
14
14
  import React from 'react';
15
- import DndContainer from '../DndContainer';
15
+ import DndContainer from '../rowSort/DndContainerRow';
16
16
  import SortableBox from '../sortableBox';
17
17
  import { VirtualWrapper } from '../virtual';
18
18
 
@@ -20,10 +20,17 @@ var DraggableContainer = function DraggableContainer(_a) {
20
20
  var keys = _a.keys,
21
21
  onSortEnd = _a.onSortEnd,
22
22
  virtual = _a.virtual,
23
- props = __rest(_a, ["keys", "onSortEnd", "virtual"]);
23
+ rowKey = _a.rowKey,
24
+ options = _a.options,
25
+ tableWidth = _a.tableWidth,
26
+ props = __rest(_a, ["keys", "onSortEnd", "virtual", "rowKey", "options", "tableWidth"]);
24
27
 
25
28
  return /*#__PURE__*/React.createElement(DndContainer, {
26
- move: onSortEnd
29
+ move: onSortEnd,
30
+ items: keys,
31
+ rowKey: rowKey,
32
+ options: options,
33
+ tableWidth: tableWidth
27
34
  }, /*#__PURE__*/React.createElement(SortableBox, {
28
35
  items: keys
29
36
  }, virtual ? /*#__PURE__*/React.createElement(VirtualWrapper, Object.assign({}, props)) : /*#__PURE__*/React.createElement("tbody", Object.assign({}, props))));
@@ -3,11 +3,14 @@ import BottomOpetateComponent from './bottomOpetateComponent';
3
3
  import QuickOpetate from './QuickOpetate';
4
4
  export { DraggableContainer, BottomOpetateComponent, QuickOpetate };
5
5
  declare const _default: {
6
- DraggableContainer: ({ keys, onSortEnd, virtual, ...props }: {
6
+ DraggableContainer: ({ keys, onSortEnd, virtual, rowKey, options, tableWidth, ...props }: {
7
7
  [x: string]: any;
8
8
  keys: any;
9
9
  onSortEnd: any;
10
10
  virtual: any;
11
+ rowKey: any;
12
+ options: any;
13
+ tableWidth: any;
11
14
  }) => JSX.Element;
12
15
  };
13
16
  export default _default;
@@ -0,0 +1,2 @@
1
+ import { Ref } from 'react';
2
+ export default function useForkRef<InstanceA, InstanceB>(refA: Ref<InstanceA> | null | undefined, refB: Ref<InstanceB> | null | undefined): Ref<InstanceA & InstanceB> | null;
@@ -0,0 +1,22 @@
1
+ import { useMemo } from 'react';
2
+
3
+ function setRef(ref, value) {
4
+ if (typeof ref === 'function') {
5
+ ref(value);
6
+ } else if (ref) {
7
+ ref.current = value;
8
+ }
9
+ }
10
+
11
+ export default function useForkRef(refA, refB) {
12
+ return useMemo(function () {
13
+ if (refA == null && refB == null) {
14
+ return null;
15
+ }
16
+
17
+ return function (refValue) {
18
+ setRef(refA, refValue);
19
+ setRef(refB, refValue);
20
+ };
21
+ }, [refA, refB]);
22
+ }
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ declare const _default: React.MemoExoticComponent<({ children, options, move, rowKey, items, tableWidth }: {
3
+ children: any;
4
+ options: any;
5
+ move: any;
6
+ rowKey: any;
7
+ items: any;
8
+ tableWidth: any;
9
+ }) => JSX.Element>;
10
+ export default _default;
@@ -0,0 +1,81 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
+ import React, { memo } from 'react';
3
+ import { DndContext, closestCenter, KeyboardSensor, PointerSensor, useSensor, useSensors } from '@dnd-kit/core';
4
+ import { restrictToParentElement, restrictToVerticalAxis } from '@dnd-kit/modifiers';
5
+ import { sortableKeyboardCoordinates } from '@dnd-kit/sortable'; // 可拖拽容器
6
+
7
+ var DndContainer = function DndContainer(_ref) {
8
+ var children = _ref.children,
9
+ options = _ref.options,
10
+ move = _ref.move,
11
+ rowKey = _ref.rowKey,
12
+ items = _ref.items,
13
+ tableWidth = _ref.tableWidth;
14
+
15
+ var _React$useState = React.useState(false),
16
+ _React$useState2 = _slicedToArray(_React$useState, 2),
17
+ isDragging = _React$useState2[0],
18
+ setIsDragging = _React$useState2[1]; // 是否拖拽中
19
+
20
+
21
+ var _React$useState3 = React.useState(null),
22
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
23
+ activeId = _React$useState4[0],
24
+ setActiveId = _React$useState4[1]; // 是否拖拽中
25
+
26
+
27
+ var sensors = useSensors(useSensor(PointerSensor), useSensor(KeyboardSensor, {
28
+ coordinateGetter: sortableKeyboardCoordinates
29
+ })); // 开始拖拽
30
+
31
+ var handleDragStart = function handleDragStart(_ref2) {
32
+ var active = _ref2.active;
33
+ setIsDragging(true);
34
+
35
+ if (!active) {
36
+ return;
37
+ }
38
+
39
+ setActiveId(active.id);
40
+ }; // 拖拽结束
41
+
42
+
43
+ var handleDragEnd = function handleDragEnd(event) {
44
+ var active = event.active,
45
+ over = event.over;
46
+ setActiveId(null); // 未移入时触发
47
+
48
+ if (!(over === null || over === void 0 ? void 0 : over.id)) {
49
+ return;
50
+ } // 移入时触发更新数据
51
+
52
+
53
+ if (active.id !== over.id) {
54
+ move(active.id, over.id);
55
+ }
56
+ };
57
+
58
+ var instance = {
59
+ isDragging: isDragging,
60
+ activeId: activeId,
61
+ options: options,
62
+ rowKey: rowKey,
63
+ children: children,
64
+ move: move,
65
+ items: items,
66
+ tableWidth: tableWidth
67
+ };
68
+ console.log('instance', instance);
69
+ return /*#__PURE__*/React.createElement(DndContext, {
70
+ sensors: sensors,
71
+ onDragStart: handleDragStart,
72
+ onDragCancel: function onDragCancel() {
73
+ return setActiveId(null);
74
+ },
75
+ collisionDetection: closestCenter,
76
+ onDragEnd: handleDragEnd,
77
+ modifiers: [restrictToParentElement, restrictToVerticalAxis]
78
+ }, children);
79
+ };
80
+
81
+ export default /*#__PURE__*/memo(DndContainer);
@@ -46,6 +46,7 @@ var SortableItem = function SortableItem(props) {
46
46
 
47
47
  return /*#__PURE__*/React.createElement(VirtualRow, Object.assign({}, resetField, {
48
48
  ref: setNodeRef,
49
+ pref: setNodeRef,
49
50
  key: key,
50
51
  style: style
51
52
  }, attributes), children);
@@ -560,6 +560,10 @@ p {
560
560
  flex-direction: row;
561
561
  flex-wrap: nowrap;
562
562
  }
563
+ .lm_editTable_warpper .lm_custom_cell_td.ant-table-cell-with-append .ant-table-row-expand-icon {
564
+ margin-right: 8px;
565
+ flex: none;
566
+ }
563
567
  .lm_editTable_warpper .lm_custom_cell_td > .ant-form-item {
564
568
  flex: 1 1 auto;
565
569
  }
@@ -676,3 +680,6 @@ p {
676
680
  .lm_table_append_add_popover .ant-popover-inner-content ul li:hover {
677
681
  background-color: var(--color-15);
678
682
  }
683
+ .lm_edittable_col_sort_item {
684
+ overflow: hidden;
685
+ }
@@ -48,6 +48,10 @@
48
48
  flex-direction: row;
49
49
  flex-wrap: nowrap;
50
50
  }
51
+ .lm_editTable_warpper .lm_custom_cell_td.ant-table-cell-with-append .ant-table-row-expand-icon {
52
+ margin-right: 8px;
53
+ flex: none;
54
+ }
51
55
  .lm_editTable_warpper .lm_custom_cell_td > .ant-form-item {
52
56
  flex: 1 1 auto;
53
57
  }
@@ -164,3 +168,6 @@
164
168
  .lm_table_append_add_popover .ant-popover-inner-content ul li:hover {
165
169
  background-color: var(--color-15);
166
170
  }
171
+ .lm_edittable_col_sort_item {
172
+ overflow: hidden;
173
+ }
@@ -4,6 +4,11 @@ export declare function isExpandRow(children: any): boolean;
4
4
  export declare function checkRowKeyByDataSource(dataSource: any, rowKey: any): any;
5
5
  export declare function getExpandStatus(children: any): any;
6
6
  export declare function checkMemoShouldUploadSpecialFun(prev: any, next: any): any;
7
+ export declare function checkExpandIconColumnIndex({ rowSelection, sortOpen, indexCol }: {
8
+ rowSelection: any;
9
+ sortOpen: any;
10
+ indexCol: any;
11
+ }): number;
7
12
  declare const _default: {
8
13
  isObjEmpty: typeof isObjEmpty;
9
14
  };
@@ -78,6 +78,10 @@ export function checkMemoShouldUploadSpecialFun(prev, next) {
78
78
  return false;
79
79
  }
80
80
 
81
+ if (!(next === null || next === void 0 ? void 0 : next.quickOpetateClearAll) && ((next === null || next === void 0 ? void 0 : next.getLength) < 2 || (prev === null || prev === void 0 ? void 0 : prev.getLength) === 1) && (next === null || next === void 0 ? void 0 : next.dataIndex) === 'lm_edit_opetate') {
82
+ return false;
83
+ }
84
+
81
85
  if (prev.isEdit !== next.isEdit) {
82
86
  return false;
83
87
  } // console.log(22, prevCol?.editable === 'render', nextCol?.editable === 'render', prevCol?.componentProps, prevCol?.componentProps)
@@ -127,6 +131,15 @@ export function checkMemoShouldUploadSpecialFun(prev, next) {
127
131
 
128
132
  return true;
129
133
  }
134
+ export function checkExpandIconColumnIndex(_ref) {
135
+ var rowSelection = _ref.rowSelection,
136
+ sortOpen = _ref.sortOpen,
137
+ indexCol = _ref.indexCol;
138
+ var arr = [rowSelection, sortOpen, indexCol].filter(function (item) {
139
+ return !!item;
140
+ });
141
+ return arr.length;
142
+ }
130
143
  export default {
131
144
  isObjEmpty: isObjEmpty
132
145
  };
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  interface rowProps {
3
3
  children?: any;
4
+ pref?: any;
4
5
  }
5
6
  declare const VirtualRow: React.NamedExoticComponent<rowProps>;
6
7
  export default VirtualRow;
@@ -13,9 +13,11 @@ var __rest = this && this.__rest || function (s, e) {
13
13
 
14
14
  import React, { useRef, useMemo, useEffect } from 'react';
15
15
  import { useStore } from './context';
16
+ import useForkRef from '../hooks/useForkRef';
16
17
  var VirtualRow = /*#__PURE__*/React.memo(function (_a, ref) {
17
18
  var children = _a.children,
18
- resetProps = __rest(_a, ["children"]);
19
+ pref = _a.pref,
20
+ resetProps = __rest(_a, ["children", "pref"]);
19
21
 
20
22
  var _useStore = useStore(),
21
23
  state = _useStore.state,
@@ -51,10 +53,10 @@ var VirtualRow = /*#__PURE__*/React.memo(function (_a, ref) {
51
53
  }
52
54
  };
53
55
 
54
- initHeight(Object.prototype.hasOwnProperty.call(ref, 'current') ? ref : trRef);
56
+ initHeight(trRef);
55
57
  }, [trRef, dispatch, rowHeight, totalLen, ref]);
56
58
  return /*#__PURE__*/React.createElement("tr", Object.assign({}, resetProps, {
57
- ref: Object.prototype.hasOwnProperty.call(ref, 'current') ? ref : trRef
59
+ ref: useForkRef(pref, trRef)
58
60
  }), children);
59
61
  });
60
62
  export default VirtualRow;
@@ -25,12 +25,16 @@ var VirtualRow = /*#__PURE__*/React.memo(function (_a, ref) {
25
25
  var rowHeight = state.rowHeight,
26
26
  totalLen = state.totalLen;
27
27
  var virtualItems = instance.columnVirtual.virtualItems;
28
- var trRef = useRef(null); // 列长度
28
+ var trRef = useRef(null); // 非固定列长度
29
29
 
30
30
  var columnsLen = useMemo(function () {
31
31
  var _a;
32
32
 
33
- return (_a = children === null || children === void 0 ? void 0 : children.length) !== null && _a !== void 0 ? _a : 0;
33
+ return (_a = children === null || children === void 0 ? void 0 : children.filter(function (v) {
34
+ var _a, _b;
35
+
36
+ return typeof ((_a = v.props) === null || _a === void 0 ? void 0 : _a.fixLeft) !== 'number' && typeof ((_b = v.props) === null || _b === void 0 ? void 0 : _b.fixRight) !== 'number';
37
+ }).length) !== null && _a !== void 0 ? _a : 0;
34
38
  }, [children]);
35
39
  useEffect(function () {
36
40
  if (state.columnsLen !== columnsLen) {
@@ -77,26 +81,20 @@ var VirtualRow = /*#__PURE__*/React.memo(function (_a, ref) {
77
81
  fixedRight: [],
78
82
  columns: []
79
83
  });
80
- }, [children]); // 截取非固定列
81
-
82
- var resetVirtualItems = useMemo(function () {
83
- var fixedLeft = fixedColumns.fixedLeft,
84
- columns = fixedColumns.columns;
85
- return virtualItems.slice(fixedLeft.length, fixedLeft.length + columns.length);
86
- }, [fixedColumns, virtualItems]); // 横向单元格合并
84
+ }, [children]); // 横向单元格合并
87
85
 
88
86
  var colSpan = useMemo(function () {
89
87
  var _a;
90
88
 
91
- var startIndex = ((_a = resetVirtualItems === null || resetVirtualItems === void 0 ? void 0 : resetVirtualItems[0]) === null || _a === void 0 ? void 0 : _a.index) || 0;
92
- return startIndex ? startIndex - fixedColumns.fixedLeft.length : startIndex;
93
- }, [fixedColumns, resetVirtualItems]);
89
+ return (_a = virtualItems[0]) === null || _a === void 0 ? void 0 : _a.index;
90
+ }, [virtualItems]);
91
+ console.log('virtualItems', virtualItems);
94
92
  return /*#__PURE__*/React.createElement("tr", Object.assign({}, resetProps, {
95
93
  ref: Object.prototype.hasOwnProperty.call(ref, 'current') ? ref : trRef
96
94
  }), fixedColumns.fixedLeft, !!colSpan && /*#__PURE__*/React.createElement("td", {
97
95
  colSpan: colSpan
98
- }), resetVirtualItems.map(function (virtualCol) {
99
- return children[virtualCol.index];
96
+ }), virtualItems.map(function (virtualCol) {
97
+ return fixedColumns.columns[virtualCol.index];
100
98
  }), fixedColumns.fixedRight);
101
99
  });
102
100
  export default VirtualRow;
@@ -172,7 +172,7 @@ var useCoreOptions = function useCoreOptions(_ref) {
172
172
  fieldType: (item === null || item === void 0 ? void 0 : item.valueType) || 'string',
173
173
  type: item.type,
174
174
  value: Array.isArray(itemValue) ? itemValue : [itemValue],
175
- operator: obj[cur].mode === 'and' ? 'equal' : 'contains'
175
+ operator: (item === null || item === void 0 ? void 0 : item.operator) || obj[cur].mode === 'and' ? 'equal' : 'contains'
176
176
  }]);
177
177
  }
178
178
 
@@ -25,12 +25,16 @@ var VirtualRow = /*#__PURE__*/React.memo(function (_a, ref) {
25
25
  var rowHeight = state.rowHeight,
26
26
  totalLen = state.totalLen;
27
27
  var virtualItems = instance.columnVirtual.virtualItems;
28
- var trRef = useRef(null); // 列长度
28
+ var trRef = useRef(null); // 非固定列长度
29
29
 
30
30
  var columnsLen = useMemo(function () {
31
31
  var _a;
32
32
 
33
- return (_a = children === null || children === void 0 ? void 0 : children.length) !== null && _a !== void 0 ? _a : 0;
33
+ return (_a = children === null || children === void 0 ? void 0 : children.filter(function (v) {
34
+ var _a, _b;
35
+
36
+ return typeof ((_a = v.props) === null || _a === void 0 ? void 0 : _a.fixLeft) !== 'number' && typeof ((_b = v.props) === null || _b === void 0 ? void 0 : _b.fixRight) !== 'number';
37
+ }).length) !== null && _a !== void 0 ? _a : 0; // return children?.length ?? 0
34
38
  }, [children]);
35
39
  useEffect(function () {
36
40
  if (state.columnsLen !== columnsLen) {
@@ -77,26 +81,20 @@ var VirtualRow = /*#__PURE__*/React.memo(function (_a, ref) {
77
81
  fixedRight: [],
78
82
  columns: []
79
83
  });
80
- }, [children]); // 截取非固定列
81
-
82
- var resetVirtualItems = useMemo(function () {
83
- var fixedLeft = fixedColumns.fixedLeft,
84
- columns = fixedColumns.columns;
85
- return virtualItems.slice(fixedLeft.length, fixedLeft.length + columns.length);
86
- }, [fixedColumns, virtualItems]); // 横线单元格合并
84
+ }, [children]); // 横线单元格合并
87
85
 
88
86
  var colSpan = useMemo(function () {
89
87
  var _a;
90
88
 
91
- var startIndex = ((_a = resetVirtualItems === null || resetVirtualItems === void 0 ? void 0 : resetVirtualItems[0]) === null || _a === void 0 ? void 0 : _a.index) || 0;
92
- return startIndex ? startIndex - fixedColumns.fixedLeft.length : startIndex;
93
- }, [fixedColumns, resetVirtualItems]);
89
+ return (_a = virtualItems[0]) === null || _a === void 0 ? void 0 : _a.index;
90
+ }, [virtualItems]);
91
+ console.log('virtualItems', virtualItems);
94
92
  return /*#__PURE__*/React.createElement("tr", Object.assign({}, resetProps, {
95
93
  ref: Object.prototype.hasOwnProperty.call(ref, 'current') ? ref : trRef
96
94
  }), fixedColumns.fixedLeft, !!colSpan && /*#__PURE__*/React.createElement("td", {
97
95
  colSpan: colSpan
98
- }), resetVirtualItems.map(function (virtualCol) {
99
- return children[virtualCol.index];
96
+ }), virtualItems.map(function (virtualCol) {
97
+ return fixedColumns.columns[virtualCol.index];
100
98
  }), fixedColumns.fixedRight);
101
99
  });
102
100
  export default VirtualRow;
@@ -9760,6 +9760,10 @@ p {
9760
9760
  flex-direction: row;
9761
9761
  flex-wrap: nowrap;
9762
9762
  }
9763
+ .lm_editTable_warpper .lm_custom_cell_td.ant-table-cell-with-append .ant-table-row-expand-icon {
9764
+ margin-right: 8px;
9765
+ flex: none;
9766
+ }
9763
9767
  .lm_editTable_warpper .lm_custom_cell_td > .ant-form-item {
9764
9768
  flex: 1 1 auto;
9765
9769
  }
@@ -9876,6 +9880,9 @@ p {
9876
9880
  .lm_table_append_add_popover .ant-popover-inner-content ul li:hover {
9877
9881
  background-color: var(--color-15);
9878
9882
  }
9883
+ .lm_edittable_col_sort_item {
9884
+ overflow: hidden;
9885
+ }
9879
9886
  .lm_filter_wrapper .lm_filter_container .lm_filter {
9880
9887
  display: flex;
9881
9888
  flex-wrap: wrap;
@@ -29,7 +29,7 @@ var Dragger = function Dragger(_ref) {
29
29
  touchAction: 'none',
30
30
  cursor: 'move'
31
31
  },
32
- className: 'icon_drag' + (isDragging ? 'bing' : '')
32
+ className: "icon_drag".concat(isDragging ? 'bing' : '')
33
33
  }));
34
34
  };
35
35