linkmore-design 1.1.13-alpha.1 → 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 (285) hide show
  1. package/CHANGELOG.md +118 -0
  2. package/dist/Button/demos/ghost.d.ts +2 -0
  3. package/dist/ConfigProvider/context.d.ts +1 -0
  4. package/dist/Descriptions/Cell.d.ts +1 -0
  5. package/dist/Descriptions/Item.d.ts +1 -0
  6. package/dist/Descriptions/index.d.ts +1 -1
  7. package/dist/Form/FormWrapper.d.ts +3 -0
  8. package/dist/Form/WrapperItem.d.ts +4 -0
  9. package/dist/Form/demos/disabled.d.ts +2 -0
  10. package/dist/Form/demos/responsive.d.ts +0 -1
  11. package/dist/Form/index.d.ts +2 -0
  12. package/dist/Form/interface.d.ts +12 -0
  13. package/dist/IconFont/demos/ConfigProvider.d.ts +2 -0
  14. package/dist/IconFont/index.d.ts +1 -2
  15. package/dist/LmDrag/LmDrag.d.ts +4 -0
  16. package/dist/LmDrag/components/DndContainer.d.ts +3 -0
  17. package/dist/LmDrag/components/sortableBox.d.ts +5 -0
  18. package/dist/LmDrag/components/sortableItem.d.ts +7 -0
  19. package/dist/LmDrag/demos/basic.d.ts +2 -0
  20. package/dist/LmDrag/index.d.ts +10 -0
  21. package/dist/LmDrag/style/index.d.ts +1 -0
  22. package/dist/LmDrag/style/variables.d.ts +1 -0
  23. package/dist/LmDrag/wrapper/Root.d.ts +3 -0
  24. package/dist/LmEditTable/EditTable.d.ts +16 -3
  25. package/dist/LmEditTable/components/DraggableContainer.d.ts +4 -1
  26. package/dist/LmEditTable/components/QuickOpetate.d.ts +12 -0
  27. package/dist/LmEditTable/components/bottomOpetateComponent.d.ts +13 -0
  28. package/dist/LmEditTable/components/index.d.ts +7 -2
  29. package/dist/LmEditTable/hooks/useForkRef.d.ts +2 -0
  30. package/dist/LmEditTable/rowSort/DndContainerRow.d.ts +10 -0
  31. package/dist/LmEditTable/util.d.ts +5 -0
  32. package/dist/LmEditTable/virtual/VirtualRow.d.ts +1 -0
  33. package/dist/LmFilter/LmFilter.d.ts +2 -6
  34. package/dist/LmTable/demos/summuy.d.ts +2 -0
  35. package/dist/LmTable/expression.d.ts +1 -0
  36. package/dist/LmTable/hooks/useGroupDataSource.d.ts +7 -0
  37. package/dist/LmUpload/UploadList/ItemPictureCard.d.ts +2 -1
  38. package/dist/LmUpload/fns/index.d.ts +1 -0
  39. package/dist/QuickMenu/demos/useInDraw.d.ts +2 -0
  40. package/dist/QuickMenu/index.d.ts +3 -1
  41. package/dist/Select/index.d.ts +3 -0
  42. package/dist/TreeSelect/demos/treedata.d.ts +3 -0
  43. package/dist/index.d.ts +2 -0
  44. package/dist/index.umd.js +2811 -1527
  45. package/dist/index.umd.min.js +17 -17
  46. package/dist/variables.css +270 -120
  47. package/es/Button/index.js +4 -3
  48. package/es/Button/style/index.css +28 -25
  49. package/es/Button/style/variables.css +28 -25
  50. package/es/Cascader/index.js +31 -3
  51. package/es/Cascader/style/index.css +1 -0
  52. package/es/Cascader/style/variables.css +1 -0
  53. package/es/ConfigProvider/context.d.ts +1 -0
  54. package/es/ConfigProvider/index.js +5 -3
  55. package/es/Descriptions/Cell.d.ts +1 -0
  56. package/es/Descriptions/Cell.js +5 -2
  57. package/es/Descriptions/Item.d.ts +1 -0
  58. package/es/Descriptions/Row.js +6 -1
  59. package/es/Descriptions/index.d.ts +1 -1
  60. package/es/Descriptions/index.js +3 -3
  61. package/es/Descriptions/style/index.css +3 -0
  62. package/es/Descriptions/style/variables.css +3 -0
  63. package/es/Form/Form.js +13 -4
  64. package/es/Form/FormItem/ItemHolder.js +1 -10
  65. package/es/Form/FormWrapper.d.ts +3 -0
  66. package/es/Form/FormWrapper.js +22 -0
  67. package/es/Form/WrapperItem.d.ts +4 -0
  68. package/es/Form/WrapperItem.js +217 -0
  69. package/es/Form/container.js +1 -13
  70. package/es/Form/images/icon_collapse.svg +1 -0
  71. package/es/Form/index.d.ts +2 -0
  72. package/es/Form/index.js +2 -0
  73. package/es/Form/interface.d.ts +12 -0
  74. package/es/Form/style/index.css +34 -41
  75. package/es/Form/style/variables.css +34 -41
  76. package/es/IconFont/index.d.ts +1 -2
  77. package/es/IconFont/index.js +18 -4
  78. package/es/ImageViewer/components/Operate.js +4 -7
  79. package/es/Input/index.js +47 -10
  80. package/es/InputNumber/index.js +23 -11
  81. package/es/InputNumber/style/index.css +7 -0
  82. package/es/InputNumber/style/variables.css +7 -0
  83. package/es/LmDrag/LmDrag.d.ts +4 -0
  84. package/es/LmDrag/LmDrag.js +30 -0
  85. package/es/LmDrag/components/DndContainer.d.ts +3 -0
  86. package/es/LmDrag/components/DndContainer.js +121 -0
  87. package/es/LmDrag/components/sortableBox.d.ts +5 -0
  88. package/es/LmDrag/components/sortableBox.js +23 -0
  89. package/es/LmDrag/components/sortableItem.d.ts +7 -0
  90. package/es/LmDrag/components/sortableItem.js +41 -0
  91. package/es/LmDrag/index.d.ts +10 -0
  92. package/es/LmDrag/index.js +3 -0
  93. package/es/LmDrag/style/index.css +0 -0
  94. package/es/LmDrag/style/index.d.ts +1 -0
  95. package/es/LmDrag/style/index.js +1 -0
  96. package/es/LmDrag/style/variables.css +0 -0
  97. package/es/LmDrag/style/variables.d.ts +1 -0
  98. package/es/LmDrag/style/variables.js +1 -0
  99. package/es/LmDrag/wrapper/Root.d.ts +3 -0
  100. package/es/LmDrag/wrapper/Root.js +12 -0
  101. package/es/LmEditTable/DragHandle.js +1 -1
  102. package/es/LmEditTable/EditTable.d.ts +16 -3
  103. package/es/LmEditTable/EditTable.js +295 -240
  104. package/es/LmEditTable/components/DraggableContainer.d.ts +4 -1
  105. package/es/LmEditTable/components/DraggableContainer.js +10 -3
  106. package/es/LmEditTable/components/QuickOpetate.d.ts +12 -0
  107. package/es/LmEditTable/components/QuickOpetate.js +82 -0
  108. package/es/LmEditTable/components/bottomOpetateComponent.d.ts +13 -0
  109. package/es/LmEditTable/components/bottomOpetateComponent.js +23 -0
  110. package/es/LmEditTable/components/index.d.ts +7 -2
  111. package/es/LmEditTable/components/index.js +3 -1
  112. package/es/LmEditTable/hooks/useForkRef.d.ts +2 -0
  113. package/es/LmEditTable/hooks/useForkRef.js +22 -0
  114. package/es/LmEditTable/rowSort/DndContainerRow.d.ts +10 -0
  115. package/es/LmEditTable/rowSort/DndContainerRow.js +81 -0
  116. package/es/LmEditTable/sortableItem.js +1 -0
  117. package/es/LmEditTable/sortableItemCol.js +40 -10
  118. package/es/LmEditTable/style/index.css +27 -0
  119. package/es/LmEditTable/style/variables.css +27 -0
  120. package/es/LmEditTable/util.d.ts +5 -0
  121. package/es/LmEditTable/util.js +51 -12
  122. package/es/LmEditTable/virtual/VirtualRow.d.ts +1 -0
  123. package/es/LmEditTable/virtual/VirtualRow.js +5 -3
  124. package/es/LmEditTable/virtual/VirtualRowBack.js +12 -14
  125. package/es/LmFilter/LmFilter.js +6 -6
  126. package/es/LmFilter/components/CheckboxFilter.js +9 -4
  127. package/es/LmFilter/components/DropdownFIlter.js +186 -111
  128. package/es/LmFilter/components/SelectFilter.js +4 -3
  129. package/es/LmFilter/filterFns/index.js +5 -7
  130. package/es/LmFilter/index.js +0 -3
  131. package/es/LmFilter/style/index.css +82 -54
  132. package/es/LmFilter/style/variables.css +82 -54
  133. package/es/LmFilter/utils.js +6 -6
  134. package/es/LmSelect/style/index.css +1 -0
  135. package/es/LmSelect/style/variables.css +1 -0
  136. package/es/LmTable/Table.js +24 -15
  137. package/es/LmTable/expression.d.ts +1 -0
  138. package/es/LmTable/expression.js +31 -0
  139. package/es/LmTable/hooks/useGroupDataSource.js +50 -0
  140. package/es/LmTable/style/index.css +39 -0
  141. package/es/LmTable/style/variables.css +39 -0
  142. package/es/LmTable/virTual/VirtualRow.js +12 -14
  143. package/es/LmUpload/LmUpload.js +6 -3
  144. package/es/LmUpload/UploadList/ItemPicture.js +2 -1
  145. package/es/LmUpload/UploadList/ItemPictureCard.d.ts +2 -1
  146. package/es/LmUpload/UploadList/ItemPictureCard.js +15 -5
  147. package/es/LmUpload/UploadList/ItemText.js +7 -2
  148. package/es/LmUpload/UploadList/index.js +53 -2
  149. package/es/LmUpload/body/UploadCore.js +4 -1
  150. package/es/LmUpload/fns/index.d.ts +1 -0
  151. package/es/LmUpload/fns/index.js +27 -6
  152. package/es/LmUpload/style/index.css +17 -0
  153. package/es/LmUpload/style/variables.css +17 -0
  154. package/es/QuickMenu/index.d.ts +3 -1
  155. package/es/QuickMenu/index.js +22 -19
  156. package/es/Select/index.d.ts +3 -0
  157. package/es/Select/index.js +44 -7
  158. package/es/Select/style/index.css +28 -0
  159. package/es/Select/style/variables.css +28 -0
  160. package/es/TreeSelect/index.js +17 -2
  161. package/es/TreeSelect/style/index.css +3 -0
  162. package/es/TreeSelect/style/variables.css +3 -0
  163. package/es/index.d.ts +2 -0
  164. package/es/index.js +2 -1
  165. package/es/styles/variables.css +270 -120
  166. package/lib/Button/index.js +4 -3
  167. package/lib/Button/style/index.css +28 -25
  168. package/lib/Button/style/variables.css +28 -25
  169. package/lib/Cascader/index.js +35 -3
  170. package/lib/Cascader/style/index.css +1 -0
  171. package/lib/Cascader/style/variables.css +1 -0
  172. package/lib/ConfigProvider/context.d.ts +1 -0
  173. package/lib/ConfigProvider/index.js +5 -3
  174. package/lib/Descriptions/Cell.d.ts +1 -0
  175. package/lib/Descriptions/Cell.js +5 -2
  176. package/lib/Descriptions/Item.d.ts +1 -0
  177. package/lib/Descriptions/Row.js +6 -1
  178. package/lib/Descriptions/index.d.ts +1 -1
  179. package/lib/Descriptions/index.js +3 -3
  180. package/lib/Descriptions/style/index.css +3 -0
  181. package/lib/Descriptions/style/variables.css +3 -0
  182. package/lib/Form/Form.js +13 -4
  183. package/lib/Form/FormItem/ItemHolder.js +1 -10
  184. package/lib/Form/FormWrapper.d.ts +3 -0
  185. package/lib/Form/FormWrapper.js +34 -0
  186. package/lib/Form/WrapperItem.d.ts +4 -0
  187. package/lib/Form/WrapperItem.js +235 -0
  188. package/lib/Form/container.js +1 -13
  189. package/lib/Form/images/icon_collapse.svg +1 -0
  190. package/lib/Form/index.d.ts +2 -0
  191. package/lib/Form/index.js +3 -0
  192. package/lib/Form/interface.d.ts +12 -0
  193. package/lib/Form/style/index.css +34 -41
  194. package/lib/Form/style/variables.css +34 -41
  195. package/lib/IconFont/index.d.ts +1 -2
  196. package/lib/IconFont/index.js +25 -4
  197. package/lib/ImageViewer/components/Operate.js +4 -8
  198. package/lib/Input/index.js +52 -10
  199. package/lib/InputNumber/index.js +29 -11
  200. package/lib/InputNumber/style/index.css +7 -0
  201. package/lib/InputNumber/style/variables.css +7 -0
  202. package/lib/LmDrag/LmDrag.d.ts +4 -0
  203. package/lib/LmDrag/LmDrag.js +44 -0
  204. package/lib/LmDrag/components/DndContainer.d.ts +3 -0
  205. package/lib/LmDrag/components/DndContainer.js +138 -0
  206. package/lib/LmDrag/components/sortableBox.d.ts +5 -0
  207. package/lib/LmDrag/components/sortableBox.js +37 -0
  208. package/lib/LmDrag/components/sortableItem.d.ts +7 -0
  209. package/lib/LmDrag/components/sortableItem.js +54 -0
  210. package/lib/LmDrag/index.d.ts +10 -0
  211. package/lib/LmDrag/index.js +19 -0
  212. package/lib/LmDrag/style/index.css +0 -0
  213. package/lib/LmDrag/style/index.d.ts +1 -0
  214. package/lib/LmDrag/style/index.js +3 -0
  215. package/lib/LmDrag/style/variables.css +0 -0
  216. package/lib/LmDrag/style/variables.d.ts +1 -0
  217. package/lib/LmDrag/style/variables.js +3 -0
  218. package/lib/LmDrag/wrapper/Root.d.ts +3 -0
  219. package/lib/LmDrag/wrapper/Root.js +26 -0
  220. package/lib/LmEditTable/DragHandle.js +1 -1
  221. package/lib/LmEditTable/EditTable.d.ts +16 -3
  222. package/lib/LmEditTable/EditTable.js +290 -235
  223. package/lib/LmEditTable/components/DraggableContainer.d.ts +4 -1
  224. package/lib/LmEditTable/components/DraggableContainer.js +12 -5
  225. package/lib/LmEditTable/components/QuickOpetate.d.ts +12 -0
  226. package/lib/LmEditTable/components/QuickOpetate.js +96 -0
  227. package/lib/LmEditTable/components/bottomOpetateComponent.d.ts +13 -0
  228. package/lib/LmEditTable/components/bottomOpetateComponent.js +34 -0
  229. package/lib/LmEditTable/components/index.d.ts +7 -2
  230. package/lib/LmEditTable/components/index.js +16 -0
  231. package/lib/LmEditTable/hooks/useForkRef.d.ts +2 -0
  232. package/lib/LmEditTable/hooks/useForkRef.js +29 -0
  233. package/lib/LmEditTable/rowSort/DndContainerRow.d.ts +10 -0
  234. package/lib/LmEditTable/rowSort/DndContainerRow.js +99 -0
  235. package/lib/LmEditTable/sortableItem.js +1 -0
  236. package/lib/LmEditTable/sortableItemCol.js +37 -8
  237. package/lib/LmEditTable/style/index.css +27 -0
  238. package/lib/LmEditTable/style/variables.css +27 -0
  239. package/lib/LmEditTable/util.d.ts +5 -0
  240. package/lib/LmEditTable/util.js +52 -11
  241. package/lib/LmEditTable/virtual/VirtualRow.d.ts +1 -0
  242. package/lib/LmEditTable/virtual/VirtualRow.js +8 -3
  243. package/lib/LmEditTable/virtual/VirtualRowBack.js +12 -14
  244. package/lib/LmFilter/LmFilter.js +6 -6
  245. package/lib/LmFilter/components/CheckboxFilter.js +9 -4
  246. package/lib/LmFilter/components/DropdownFIlter.js +186 -111
  247. package/lib/LmFilter/components/SelectFilter.js +4 -3
  248. package/lib/LmFilter/filterFns/index.js +5 -7
  249. package/lib/LmFilter/index.js +0 -3
  250. package/lib/LmFilter/style/index.css +82 -54
  251. package/lib/LmFilter/style/variables.css +82 -54
  252. package/lib/LmFilter/utils.js +6 -6
  253. package/lib/LmSelect/style/index.css +1 -0
  254. package/lib/LmSelect/style/variables.css +1 -0
  255. package/lib/LmTable/Table.js +24 -15
  256. package/lib/LmTable/expression.d.ts +1 -0
  257. package/lib/LmTable/expression.js +41 -0
  258. package/lib/LmTable/hooks/useGroupDataSource.js +50 -0
  259. package/lib/LmTable/style/index.css +39 -0
  260. package/lib/LmTable/style/variables.css +39 -0
  261. package/lib/LmTable/virTual/VirtualRow.js +12 -14
  262. package/lib/LmUpload/LmUpload.js +9 -3
  263. package/lib/LmUpload/UploadList/ItemPicture.js +2 -1
  264. package/lib/LmUpload/UploadList/ItemPictureCard.d.ts +2 -1
  265. package/lib/LmUpload/UploadList/ItemPictureCard.js +15 -5
  266. package/lib/LmUpload/UploadList/ItemText.js +7 -2
  267. package/lib/LmUpload/UploadList/index.js +54 -2
  268. package/lib/LmUpload/body/UploadCore.js +5 -1
  269. package/lib/LmUpload/fns/index.d.ts +1 -0
  270. package/lib/LmUpload/fns/index.js +27 -6
  271. package/lib/LmUpload/style/index.css +17 -0
  272. package/lib/LmUpload/style/variables.css +17 -0
  273. package/lib/QuickMenu/index.d.ts +3 -1
  274. package/lib/QuickMenu/index.js +21 -18
  275. package/lib/Select/index.d.ts +3 -0
  276. package/lib/Select/index.js +47 -7
  277. package/lib/Select/style/index.css +28 -0
  278. package/lib/Select/style/variables.css +28 -0
  279. package/lib/TreeSelect/index.js +21 -2
  280. package/lib/TreeSelect/style/index.css +3 -0
  281. package/lib/TreeSelect/style/variables.css +3 -0
  282. package/lib/index.d.ts +2 -0
  283. package/lib/index.js +15 -1
  284. package/lib/styles/variables.css +270 -120
  285. package/package.json +5 -1
@@ -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))));
@@ -0,0 +1,12 @@
1
+ import { FC } from 'react';
2
+ interface IOpetateProps {
3
+ record: Record<string, any>;
4
+ rowKey?: string;
5
+ handleAdd?: (row?: any, addInChildren?: boolean) => void;
6
+ handleDelete?: (rowKey?: string) => void;
7
+ options?: string[];
8
+ getLength?: number;
9
+ quickOpetateClearAll?: boolean;
10
+ }
11
+ declare const QuickOpetate: FC<IOpetateProps>;
12
+ export default QuickOpetate;
@@ -0,0 +1,82 @@
1
+ import React from 'react';
2
+ import Button from '../../Button';
3
+ import IconFont from '../../IconFont';
4
+ import Popover from '../../Popover';
5
+ import DisabledContext from '../../ConfigProvider/DisabledContext';
6
+
7
+ var QuickOpetate = function QuickOpetate(_ref) {
8
+ var record = _ref.record,
9
+ rowKey = _ref.rowKey,
10
+ handleAdd = _ref.handleAdd,
11
+ handleDelete = _ref.handleDelete,
12
+ _ref$options = _ref.options,
13
+ options = _ref$options === void 0 ? ['add', 'delete'] : _ref$options,
14
+ getLength = _ref.getLength,
15
+ quickOpetateClearAll = _ref.quickOpetateClearAll;
16
+ var disabled = React.useContext(DisabledContext) || false;
17
+
18
+ var appendChildren = function appendChildren() {
19
+ handleAdd === null || handleAdd === void 0 ? void 0 : handleAdd(record, true);
20
+ };
21
+
22
+ var appendAdd = function appendAdd() {
23
+ handleAdd === null || handleAdd === void 0 ? void 0 : handleAdd(record);
24
+ };
25
+
26
+ return /*#__PURE__*/React.createElement("div", {
27
+ style: {
28
+ display: 'flex',
29
+ alignItems: 'center',
30
+ justifyContent: 'flex-start',
31
+ marginLeft: '-4px'
32
+ }
33
+ }, options.includes('delete') && /*#__PURE__*/React.createElement(Button, {
34
+ type: "link",
35
+ size: "small",
36
+ disabled: !quickOpetateClearAll && getLength < 2 || disabled,
37
+ icon: /*#__PURE__*/React.createElement(IconFont, {
38
+ type: "lmweb-minus-circle",
39
+ style: {
40
+ fontSize: 16
41
+ }
42
+ }),
43
+ onClick: function onClick() {
44
+ return handleDelete(record[rowKey]);
45
+ }
46
+ }), (options === null || options === void 0 ? void 0 : options.includes('add')) && (options === null || options === void 0 ? void 0 : options.includes('addInChildren')) ? /*#__PURE__*/React.createElement(Popover, {
47
+ placement: "bottom",
48
+ overlayClassName: "lm_table_append_add_popover",
49
+ open: open,
50
+ title: null,
51
+ content: /*#__PURE__*/React.createElement("ul", null, /*#__PURE__*/React.createElement("li", {
52
+ onClick: appendAdd
53
+ }, "\u6DFB\u52A0\u5E73\u7EA7"), /*#__PURE__*/React.createElement("li", {
54
+ onClick: appendChildren
55
+ }, "\u6DFB\u52A0\u5B50\u7EA7")),
56
+ trigger: "hover"
57
+ }, /*#__PURE__*/React.createElement(Button, {
58
+ type: "link",
59
+ size: "small",
60
+ icon: /*#__PURE__*/React.createElement(IconFont, {
61
+ type: "lmweb-plus-circle-fill",
62
+ style: {
63
+ fontSize: 16
64
+ }
65
+ })
66
+ })) : (options === null || options === void 0 ? void 0 : options.includes('add')) || (options === null || options === void 0 ? void 0 : options.includes('addInChildren')) ? /*#__PURE__*/React.createElement(Button, {
67
+ type: "link",
68
+ size: "small",
69
+ disabled: disabled,
70
+ icon: /*#__PURE__*/React.createElement(IconFont, {
71
+ type: "lmweb-plus-circle-fill",
72
+ style: {
73
+ fontSize: 16
74
+ }
75
+ }),
76
+ onClick: function onClick() {
77
+ return handleAdd(record, !!(options === null || options === void 0 ? void 0 : options.includes('addInChildren')));
78
+ }
79
+ }) : null);
80
+ };
81
+
82
+ export default QuickOpetate;
@@ -0,0 +1,13 @@
1
+ interface IBottomOpetateCompoentProps {
2
+ isShowAddAction?: boolean;
3
+ handleAdd?: () => void;
4
+ recordCreatorProps?: {
5
+ creatorButtonText?: string;
6
+ style?: Record<string, any>;
7
+ initData?: Record<string, any> | (() => Record<string, any>);
8
+ customAddClick?: () => void;
9
+ };
10
+ disabled?: boolean;
11
+ }
12
+ declare const BottomOpetateComponent: (props: IBottomOpetateCompoentProps) => JSX.Element;
13
+ export default BottomOpetateComponent;
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ import { Button, IconFont } from '../../index';
3
+
4
+ var BottomOpetateComponent = function BottomOpetateComponent(props) {
5
+ var isShowAddAction = props.isShowAddAction,
6
+ recordCreatorProps = props.recordCreatorProps,
7
+ handleAdd = props.handleAdd,
8
+ _props$disabled = props.disabled,
9
+ disabled = _props$disabled === void 0 ? false : _props$disabled;
10
+ return isShowAddAction ? /*#__PURE__*/React.createElement(Button, {
11
+ className: "lm_editTable_add_bar",
12
+ type: "dashed",
13
+ disabled: disabled,
14
+ onClick: (recordCreatorProps === null || recordCreatorProps === void 0 ? void 0 : recordCreatorProps.customAddClick) || handleAdd,
15
+ style: Object.assign({
16
+ marginTop: 8
17
+ }, (recordCreatorProps === null || recordCreatorProps === void 0 ? void 0 : recordCreatorProps.style) || {})
18
+ }, /*#__PURE__*/React.createElement(IconFont, {
19
+ type: "lmweb-plus"
20
+ }), (recordCreatorProps === null || recordCreatorProps === void 0 ? void 0 : recordCreatorProps.creatorButtonText) || '新增') : null;
21
+ };
22
+
23
+ export default BottomOpetateComponent;
@@ -1,11 +1,16 @@
1
1
  import DraggableContainer from './DraggableContainer';
2
- export { DraggableContainer };
2
+ import BottomOpetateComponent from './bottomOpetateComponent';
3
+ import QuickOpetate from './QuickOpetate';
4
+ export { DraggableContainer, BottomOpetateComponent, QuickOpetate };
3
5
  declare const _default: {
4
- DraggableContainer: ({ keys, onSortEnd, virtual, ...props }: {
6
+ DraggableContainer: ({ keys, onSortEnd, virtual, rowKey, options, tableWidth, ...props }: {
5
7
  [x: string]: any;
6
8
  keys: any;
7
9
  onSortEnd: any;
8
10
  virtual: any;
11
+ rowKey: any;
12
+ options: any;
13
+ tableWidth: any;
9
14
  }) => JSX.Element;
10
15
  };
11
16
  export default _default;
@@ -1,5 +1,7 @@
1
1
  import DraggableContainer from './DraggableContainer';
2
- export { DraggableContainer };
2
+ import BottomOpetateComponent from './bottomOpetateComponent';
3
+ import QuickOpetate from './QuickOpetate';
4
+ export { DraggableContainer, BottomOpetateComponent, QuickOpetate };
3
5
  export default {
4
6
  DraggableContainer: DraggableContainer
5
7
  };
@@ -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);
@@ -12,21 +12,49 @@ var __rest = this && this.__rest || function (s, e) {
12
12
  };
13
13
 
14
14
  import React, { forwardRef } from 'react';
15
- import { useSortable } from '@dnd-kit/sortable';
16
- import { CSS } from '@dnd-kit/utilities';
17
- var Item = /*#__PURE__*/forwardRef(function (_a, ref) {
18
- var _b;
15
+ import { useSortable } from '@dnd-kit/sortable'; // import { omit } from 'lodash'
16
+
17
+ import { CSS } from '@dnd-kit/utilities'; // interface ItemType {
18
+ // children: React.ReactNode
19
+ // }
20
+ // interface ItemInstance {}
21
+ // @ts-ignore
19
22
 
23
+ var Item = /*#__PURE__*/forwardRef(function (_a, ref) {
20
24
  var children = _a.children,
21
- props = __rest(_a, ["children"]);
25
+ props = __rest(_a, ["children"]); // const rProps = omit({ ...props, ...children.props }, [
26
+ // 'isSticky',
27
+ // 'colStart',
28
+ // 'colEnd',
29
+ // 'prefixCls',
30
+ // 'fixLeft',
31
+ // 'fixRight',
32
+ // 'lastFixLeft',
33
+ // 'firstFixRight',
34
+ // 'lastFixRight',
35
+ // 'firstFixLeft',
36
+ // 'isSticky',
37
+ // 'additionalProps',
38
+ // 'rowType',
39
+ // ])
22
40
 
23
- return /*#__PURE__*/React.createElement("th", Object.assign({}, props, {
24
- ref: ref
25
- }), ((_b = children === null || children === void 0 ? void 0 : children.props) === null || _b === void 0 ? void 0 : _b.children) || children);
41
+
42
+ return (
43
+ /*#__PURE__*/
44
+ // <th {...rProps} ref={ref as any} />
45
+ React.createElement("th", Object.assign({}, props, children.props, {
46
+ ref: ref
47
+ })) // <th {...props} ref={ref as any}>
48
+ // {(children as any)?.props?.children || children}
49
+ // </th>
50
+
51
+ );
26
52
  });
27
53
  export default function SortableItem(props) {
54
+ var id = props.id;
55
+
28
56
  var _useSortable = useSortable({
29
- id: props.id
57
+ id: id
30
58
  }),
31
59
  attributes = _useSortable.attributes,
32
60
  listeners = _useSortable.listeners,
@@ -36,7 +64,9 @@ export default function SortableItem(props) {
36
64
 
37
65
  var style = {
38
66
  position: 'relative',
39
- transform: CSS.Translate.toString(transform),
67
+ transform: CSS.Translate.toString(transform ? Object.assign(Object.assign({}, transform), {
68
+ y: 0
69
+ }) : transform),
40
70
  transition: transition,
41
71
  touchAction: 'none',
42
72
  height: '40px',
@@ -538,6 +538,9 @@ p {
538
538
  width: 32px;
539
539
  padding: 0 8px;
540
540
  }
541
+ .lm_editTable_warpper .ant-table-thead > tr > th:not(:last-child):not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan])::before {
542
+ height: 100%;
543
+ }
541
544
  .lm_editTable_warpper .lm_editTable_cell {
542
545
  cursor: pointer;
543
546
  height: 40px;
@@ -552,6 +555,18 @@ p {
552
555
  .lm_editTable_warpper .lm_custom_cell_td {
553
556
  position: relative;
554
557
  }
558
+ .lm_editTable_warpper .lm_custom_cell_td.ant-table-cell-with-append {
559
+ display: flex;
560
+ flex-direction: row;
561
+ flex-wrap: nowrap;
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
+ }
567
+ .lm_editTable_warpper .lm_custom_cell_td > .ant-form-item {
568
+ flex: 1 1 auto;
569
+ }
555
570
  .lm_editTable_warpper .lm_custom_cell_td .ant-form-item-control-input-content {
556
571
  display: flex;
557
572
  flex-direction: row;
@@ -600,6 +615,9 @@ p {
600
615
  .lm_editTable_warpper .lm_table_quickcopy .anticon {
601
616
  color: var(--text-color);
602
617
  }
618
+ .lm_editTable_warpper .ant-table-body {
619
+ scroll-behavior: smooth;
620
+ }
603
621
  .lm_editTable_warpper .icon_drag {
604
622
  color: var(--tip-text-color);
605
623
  }
@@ -613,6 +631,12 @@ p {
613
631
  padding-left: 8px;
614
632
  padding-right: 8px;
615
633
  }
634
+ .lm_editTable_warpper .ant-table-thead > tr > th:not(:last-child):not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan])::before {
635
+ background-color: rgba(0, 0, 0, 0.06) !important;
636
+ }
637
+ .lm_editTable_warpper .ant-table-thead > tr > th:not(:last-child):not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan])::before {
638
+ background-color: rgba(0, 0, 0, 0.06) !important;
639
+ }
616
640
  .lm_editTable_warpper .ant-picker {
617
641
  height: 24px !important;
618
642
  padding: 2px 8px;
@@ -656,3 +680,6 @@ p {
656
680
  .lm_table_append_add_popover .ant-popover-inner-content ul li:hover {
657
681
  background-color: var(--color-15);
658
682
  }
683
+ .lm_edittable_col_sort_item {
684
+ overflow: hidden;
685
+ }
@@ -26,6 +26,9 @@
26
26
  width: 32px;
27
27
  padding: 0 8px;
28
28
  }
29
+ .lm_editTable_warpper .ant-table-thead > tr > th:not(:last-child):not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan])::before {
30
+ height: 100%;
31
+ }
29
32
  .lm_editTable_warpper .lm_editTable_cell {
30
33
  cursor: pointer;
31
34
  height: 40px;
@@ -40,6 +43,18 @@
40
43
  .lm_editTable_warpper .lm_custom_cell_td {
41
44
  position: relative;
42
45
  }
46
+ .lm_editTable_warpper .lm_custom_cell_td.ant-table-cell-with-append {
47
+ display: flex;
48
+ flex-direction: row;
49
+ flex-wrap: nowrap;
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
+ }
55
+ .lm_editTable_warpper .lm_custom_cell_td > .ant-form-item {
56
+ flex: 1 1 auto;
57
+ }
43
58
  .lm_editTable_warpper .lm_custom_cell_td .ant-form-item-control-input-content {
44
59
  display: flex;
45
60
  flex-direction: row;
@@ -88,6 +103,9 @@
88
103
  .lm_editTable_warpper .lm_table_quickcopy .anticon {
89
104
  color: var(--text-color);
90
105
  }
106
+ .lm_editTable_warpper .ant-table-body {
107
+ scroll-behavior: smooth;
108
+ }
91
109
  .lm_editTable_warpper .icon_drag {
92
110
  color: var(--tip-text-color);
93
111
  }
@@ -101,6 +119,12 @@
101
119
  padding-left: 8px;
102
120
  padding-right: 8px;
103
121
  }
122
+ .lm_editTable_warpper .ant-table-thead > tr > th:not(:last-child):not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan])::before {
123
+ background-color: rgba(0, 0, 0, 0.06) !important;
124
+ }
125
+ .lm_editTable_warpper .ant-table-thead > tr > th:not(:last-child):not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan])::before {
126
+ background-color: rgba(0, 0, 0, 0.06) !important;
127
+ }
104
128
  .lm_editTable_warpper .ant-picker {
105
129
  height: 24px !important;
106
130
  padding: 2px 8px;
@@ -144,3 +168,6 @@
144
168
  .lm_table_append_add_popover .ant-popover-inner-content ul li:hover {
145
169
  background-color: var(--color-15);
146
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
  };
@@ -1,6 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
2
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
3
- import { keyBy, isEqual, pick } from 'lodash';
3
+ import { keyBy, isEqual, pick, isFunction, omit } from 'lodash';
4
4
  export function isObjEmpty(obj) {
5
5
  var _a;
6
6
 
@@ -9,19 +9,20 @@ export function isObjEmpty(obj) {
9
9
  export function deepDataSourcePreKeys(dataSource, rowKey) {
10
10
  var deepDataSource = [];
11
11
 
12
- var eachChildren = function eachChildren(children, preKeys) {
13
- children === null || children === void 0 ? void 0 : children.forEach(function (item) {
12
+ var eachChildren = function eachChildren(children, preKeys, deepIds) {
13
+ children === null || children === void 0 ? void 0 : children.forEach(function (item, index) {
14
14
  deepDataSource.push(Object.assign(Object.assign({}, item), {
15
- preKeys: [].concat(_toConsumableArray(preKeys), [item === null || item === void 0 ? void 0 : item[rowKey]])
15
+ preKeys: [].concat(_toConsumableArray(preKeys), [item === null || item === void 0 ? void 0 : item[rowKey]]),
16
+ _deepIds: [].concat(_toConsumableArray(deepIds), [index + 1])
16
17
  }));
17
18
 
18
19
  if (item === null || item === void 0 ? void 0 : item.children) {
19
- eachChildren(item === null || item === void 0 ? void 0 : item.children, [].concat(_toConsumableArray(preKeys), [item === null || item === void 0 ? void 0 : item[rowKey]])); // deepDataSource.push({ ...item, preKeys: [...preKeys, item[rowKey]] })
20
+ eachChildren(item === null || item === void 0 ? void 0 : item.children, [].concat(_toConsumableArray(preKeys), [item === null || item === void 0 ? void 0 : item[rowKey]]), [].concat(_toConsumableArray(deepIds), [index + 1])); // deepDataSource.push({ ...item, preKeys: [...preKeys, item[rowKey]] })
20
21
  }
21
22
  });
22
23
  };
23
24
 
24
- eachChildren(dataSource, []);
25
+ eachChildren(dataSource, [], []);
25
26
  return keyBy(deepDataSource, rowKey);
26
27
  }
27
28
  export function isExpandRow(children) {
@@ -53,7 +54,7 @@ export function checkRowKeyByDataSource(dataSource, rowKey) {
53
54
 
54
55
  return Object.assign(Object.assign({}, v), _defineProperty({}, rowKey, v[rowKey] || "v".concat(idx + 1)));
55
56
  });
56
- return res;
57
+ return res || [];
57
58
  }
58
59
  export function getExpandStatus(children) {
59
60
  var _a, _b, _c, _d, _e;
@@ -61,7 +62,7 @@ export function getExpandStatus(children) {
61
62
  return isExpandRow(children) ? (_e = (_d = (_c = (_b = (_a = children === null || children === void 0 ? void 0 : children[0]) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.children) === null || _c === void 0 ? void 0 : _c[1]) === null || _d === void 0 ? void 0 : _d.props) === null || _e === void 0 ? void 0 : _e['aria-label'] : '';
62
63
  }
63
64
  export function checkMemoShouldUploadSpecialFun(prev, next) {
64
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
65
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
65
66
 
66
67
  var checkExpandStatus = getExpandStatus(prev.children) === getExpandStatus(next.children);
67
68
 
@@ -71,13 +72,38 @@ export function checkMemoShouldUploadSpecialFun(prev, next) {
71
72
 
72
73
  var prevCol = prev === null || prev === void 0 ? void 0 : prev.col;
73
74
  var nextCol = next === null || next === void 0 ? void 0 : next.col;
75
+ /** TODO: 使用了自定义render, 是否要判断rowIndex? 这样排序之后,渲染的性能就会变差 */
76
+
77
+ if (((prevCol === null || prevCol === void 0 ? void 0 : prevCol.render) || (nextCol === null || nextCol === void 0 ? void 0 : nextCol.render)) && !isEqual(pick(prev, ['colIndex', 'record', 'children']), pick(next, ['colIndex', 'record', 'children']))) {
78
+ return false;
79
+ }
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
+
85
+ if (prev.isEdit !== next.isEdit) {
86
+ return false;
87
+ } // console.log(22, prevCol?.editable === 'render', nextCol?.editable === 'render', prevCol?.componentProps, prevCol?.componentProps)
88
+
89
+
90
+ if (((prevCol === null || prevCol === void 0 ? void 0 : prevCol.editable) === 'render' || (nextCol === null || nextCol === void 0 ? void 0 : nextCol.editable) === 'render') && (((_a = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _a === void 0 ? void 0 : _a.render) || ((_b = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _b === void 0 ? void 0 : _b.render)) && (!isEqual(omit(prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps, ['render']), omit(nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps, ['render'])) || !isEqual(pick(prev, ['colIndex', 'record', 'rowIndex']), pick(next, ['colIndex', 'record', 'rowIndex'])))) {
91
+ return false;
92
+ }
74
93
 
75
94
  if (((prevCol === null || prevCol === void 0 ? void 0 : prevCol.fixed) || (nextCol === null || nextCol === void 0 ? void 0 : nextCol.fixed)) && !isEqual(prev === null || prev === void 0 ? void 0 : prev.style, next === null || next === void 0 ? void 0 : next.style)) {
76
95
  return false;
77
96
  }
78
97
 
79
- if ((((_a = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _a === void 0 ? void 0 : _a.optionOnly) || ((_b = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _b === void 0 ? void 0 : _b.optionOnly)) && !isEqual((_c = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _c === void 0 ? void 0 : _c.options, (_d = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _d === void 0 ? void 0 : _d.options)) {
80
- // return isEqual(prevCol?.componentProps?.options, nextCol?.componentProps?.options)
98
+ if ((((_c = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _c === void 0 ? void 0 : _c.optionOnly) || ((_d = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _d === void 0 ? void 0 : _d.optionOnly)) && !isEqual((_e = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _e === void 0 ? void 0 : _e.options, (_f = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _f === void 0 ? void 0 : _f.options)) {
99
+ return false;
100
+ }
101
+
102
+ if ((((_g = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _g === void 0 ? void 0 : _g.options) || ((_h = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _h === void 0 ? void 0 : _h.options)) && !isEqual((_j = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _j === void 0 ? void 0 : _j.options, (_k = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _k === void 0 ? void 0 : _k.options)) {
103
+ return false;
104
+ }
105
+
106
+ if ((isFunction(prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) || isFunction(nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps)) && !isEqual(prevCol.newOptions, nextCol.newOptions) && !isEqual(prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps, nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps)) {
81
107
  return false;
82
108
  }
83
109
 
@@ -86,13 +112,17 @@ export function checkMemoShouldUploadSpecialFun(prev, next) {
86
112
  return false;
87
113
  }
88
114
 
115
+ if (next.className.indexOf('drag-visible') > -1) {
116
+ return isEqual(prev.style, next.style);
117
+ }
118
+
89
119
  if (next.className.indexOf('ant-table-selection-column') > -1) {
90
- return isEqual((_f = (_e = prev.children) === null || _e === void 0 ? void 0 : _e[1]) === null || _f === void 0 ? void 0 : _f.props, (_h = (_g = next.children) === null || _g === void 0 ? void 0 : _g[1]) === null || _h === void 0 ? void 0 : _h.props);
120
+ return isEqual((_m = (_l = prev.children) === null || _l === void 0 ? void 0 : _l[1]) === null || _m === void 0 ? void 0 : _m.props, (_p = (_o = next.children) === null || _o === void 0 ? void 0 : _o[1]) === null || _p === void 0 ? void 0 : _p.props);
91
121
  }
92
122
  /** 如果启用了快速复制功能,需要实时判断rowIndex与getLength */
93
123
 
94
124
 
95
- if (((_j = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _j === void 0 ? void 0 : _j.quickcopy) || ((_k = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _k === void 0 ? void 0 : _k.quickcopy)) {
125
+ if (((_q = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _q === void 0 ? void 0 : _q.quickcopy) || ((_r = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _r === void 0 ? void 0 : _r.quickcopy)) {
96
126
  var pickProps = ['record', 'colIndex', 'rowIndex', 'getLength'];
97
127
  var p = pick(prev, pickProps);
98
128
  var n = pick(next, pickProps);
@@ -101,6 +131,15 @@ export function checkMemoShouldUploadSpecialFun(prev, next) {
101
131
 
102
132
  return true;
103
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
+ }
104
143
  export default {
105
144
  isObjEmpty: isObjEmpty
106
145
  };