linkmore-design 1.1.9 → 1.1.11

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 (233) hide show
  1. package/CHANGELOG.md +673 -647
  2. package/dist/Button/demos/type.d.ts +2 -0
  3. package/dist/CustomTableOption/index.d.ts +1 -0
  4. package/dist/CustomTableOption/locale/en_US.d.ts +19 -0
  5. package/dist/CustomTableOption/locale/zh_CN.d.ts +19 -0
  6. package/dist/LmEditTable/demos/priceTable.d.ts +2 -0
  7. package/dist/LmEditTable/util.d.ts +1 -0
  8. package/dist/LmFilter/demos/filterControl.d.ts +2 -0
  9. package/dist/Locale/default.d.ts +4 -1
  10. package/dist/Locale/zh_CN.d.ts +4 -1
  11. package/dist/Modal/demos/locale.d.ts +2 -0
  12. package/dist/Modal/locale.d.ts +7 -0
  13. package/dist/base.css +1 -0
  14. package/dist/index.umd.js +260 -212
  15. package/dist/index.umd.min.js +8 -8
  16. package/dist/variables.css +148 -12
  17. package/es/Affix/style/index.css +1 -0
  18. package/es/Alert/style/index.css +1 -0
  19. package/es/Approval/style/index.css +1 -0
  20. package/es/AutoComplete/style/index.css +1 -0
  21. package/es/Avatar/style/index.css +1 -0
  22. package/es/Badge/style/index.css +1 -0
  23. package/es/Breadcrumb/style/index.css +1 -0
  24. package/es/Button/style/index.css +4 -1
  25. package/es/Button/style/variables.css +4 -1
  26. package/es/ButtonTags/style/index.css +1 -0
  27. package/es/Calendar/style/index.css +1 -0
  28. package/es/Card/style/index.css +1 -0
  29. package/es/CardTable/style/index.css +7 -9
  30. package/es/CardTable/style/variables.css +7 -9
  31. package/es/Carousel/style/index.css +1 -0
  32. package/es/Cascader/style/index.css +1 -0
  33. package/es/Col/style/index.css +1 -0
  34. package/es/Collapse/style/index.css +1 -0
  35. package/es/Comment/style/index.css +1 -0
  36. package/es/CustomTableOption/cardSort.js +21 -16
  37. package/es/CustomTableOption/columnsSort.js +16 -16
  38. package/es/CustomTableOption/filterSort.js +11 -11
  39. package/es/CustomTableOption/index.d.ts +1 -0
  40. package/es/CustomTableOption/index.js +45 -17
  41. package/es/CustomTableOption/locale/en_US.d.ts +19 -0
  42. package/es/CustomTableOption/locale/en_US.js +19 -0
  43. package/es/CustomTableOption/locale/zh_CN.d.ts +19 -0
  44. package/es/CustomTableOption/locale/zh_CN.js +19 -0
  45. package/es/CustomTableOption/style/index.css +5 -0
  46. package/es/CustomTableOption/style/variables.css +4 -0
  47. package/es/CustomerService/style/index.css +1 -0
  48. package/es/DatePicker/style/index.css +1 -0
  49. package/es/Descriptions/style/index.css +1 -0
  50. package/es/Divider/style/index.css +1 -0
  51. package/es/Drawer/style/index.css +1 -0
  52. package/es/Dropdown/style/index.css +3 -2
  53. package/es/Dropdown/style/variables.css +2 -2
  54. package/es/EditTable/style/index.css +1 -0
  55. package/es/Empty/style/index.css +1 -0
  56. package/es/Filter/style/index.css +1 -0
  57. package/es/Form/style/index.css +1 -0
  58. package/es/FullScreen/style/index.css +1 -0
  59. package/es/Grid/style/index.css +1 -0
  60. package/es/Icon/style/index.css +1 -0
  61. package/es/Image/style/index.css +1 -0
  62. package/es/ImageViewer/components/Operate.js +5 -2
  63. package/es/Input/style/index.css +1 -0
  64. package/es/InputNumber/style/index.css +1 -0
  65. package/es/Layout/style/index.css +1 -0
  66. package/es/LeftTable/index.js +3 -1
  67. package/es/LeftTable/style/index.css +1 -0
  68. package/es/List/style/index.css +1 -0
  69. package/es/LmEditTable/EditTable.js +39 -88
  70. package/es/LmEditTable/style/index.css +5 -0
  71. package/es/LmEditTable/style/variables.css +4 -0
  72. package/es/LmEditTable/util.d.ts +1 -0
  73. package/es/LmEditTable/util.js +27 -0
  74. package/es/LmSelect/style/index.css +1 -0
  75. package/es/LmTable/Table.js +9 -5
  76. package/es/LmTable/style/index.css +4 -0
  77. package/es/LmTable/style/variables.css +3 -0
  78. package/es/LmUpload/style/index.css +118 -0
  79. package/es/LmUpload/style/variables.css +118 -0
  80. package/es/Locale/default.d.ts +4 -1
  81. package/es/Locale/default.js +3 -1
  82. package/es/Locale/zh_CN.d.ts +4 -1
  83. package/es/Locale/zh_CN.js +3 -1
  84. package/es/Mentions/style/index.css +1 -0
  85. package/es/Menu/style/index.css +1 -0
  86. package/es/Modal/index.js +18 -14
  87. package/es/Modal/locale.d.ts +7 -0
  88. package/es/Modal/locale.js +12 -0
  89. package/es/Modal/style/index.css +1 -0
  90. package/es/PageHeader/style/index.css +1 -0
  91. package/es/Pagination/style/index.css +1 -0
  92. package/es/Popconfirm/style/index.css +1 -0
  93. package/es/Popover/style/index.css +1 -0
  94. package/es/Progress/style/index.css +1 -0
  95. package/es/QuickMenu/style/index.css +6 -0
  96. package/es/QuickMenu/style/variables.css +5 -0
  97. package/es/Rate/style/index.css +1 -0
  98. package/es/Result/style/index.css +1 -0
  99. package/es/Row/style/index.css +1 -0
  100. package/es/Segmented/style/index.css +1 -0
  101. package/es/Select/style/index.css +1 -0
  102. package/es/Skeleton/style/index.css +1 -0
  103. package/es/Slider/style/index.css +1 -0
  104. package/es/Space/style/index.css +1 -0
  105. package/es/Spin/style/index.css +1 -0
  106. package/es/Statistic/style/index.css +1 -0
  107. package/es/Steps/style/index.css +1 -0
  108. package/es/Switch/style/index.css +1 -0
  109. package/es/Table/style/index.css +1 -0
  110. package/es/Tabs/style/index.css +1 -0
  111. package/es/Tag/style/index.css +1 -0
  112. package/es/TimePicker/style/index.css +1 -0
  113. package/es/Timeline/style/index.css +1 -0
  114. package/es/Tooltip/style/index.css +1 -0
  115. package/es/Transfer/style/index.css +1 -0
  116. package/es/Tree/style/index.css +1 -0
  117. package/es/TreeSelect/style/index.css +1 -0
  118. package/es/Typography/style/index.css +1 -0
  119. package/es/Upload/style/index.css +1 -0
  120. package/es/locale-provider/style/index.css +1 -0
  121. package/es/message/style/index.css +1 -0
  122. package/es/notification/style/index.css +1 -0
  123. package/es/styles/main.css +1 -0
  124. package/es/styles/variables.css +148 -12
  125. package/lib/Affix/style/index.css +1 -0
  126. package/lib/Alert/style/index.css +1 -0
  127. package/lib/Approval/style/index.css +1 -0
  128. package/lib/AutoComplete/style/index.css +1 -0
  129. package/lib/Avatar/style/index.css +1 -0
  130. package/lib/Badge/style/index.css +1 -0
  131. package/lib/Breadcrumb/style/index.css +1 -0
  132. package/lib/Button/style/index.css +4 -1
  133. package/lib/Button/style/variables.css +4 -1
  134. package/lib/ButtonTags/style/index.css +1 -0
  135. package/lib/Calendar/style/index.css +1 -0
  136. package/lib/Card/style/index.css +1 -0
  137. package/lib/CardTable/style/index.css +7 -9
  138. package/lib/CardTable/style/variables.css +7 -9
  139. package/lib/Carousel/style/index.css +1 -0
  140. package/lib/Cascader/style/index.css +1 -0
  141. package/lib/Col/style/index.css +1 -0
  142. package/lib/Collapse/style/index.css +1 -0
  143. package/lib/Comment/style/index.css +1 -0
  144. package/lib/CustomTableOption/cardSort.js +20 -15
  145. package/lib/CustomTableOption/columnsSort.js +16 -16
  146. package/lib/CustomTableOption/filterSort.js +11 -11
  147. package/lib/CustomTableOption/index.d.ts +1 -0
  148. package/lib/CustomTableOption/index.js +45 -16
  149. package/lib/CustomTableOption/locale/en_US.d.ts +19 -0
  150. package/lib/CustomTableOption/locale/en_US.js +26 -0
  151. package/lib/CustomTableOption/locale/zh_CN.d.ts +19 -0
  152. package/lib/CustomTableOption/locale/zh_CN.js +26 -0
  153. package/lib/CustomTableOption/style/index.css +5 -0
  154. package/lib/CustomTableOption/style/variables.css +4 -0
  155. package/lib/CustomerService/style/index.css +1 -0
  156. package/lib/DatePicker/style/index.css +1 -0
  157. package/lib/Descriptions/style/index.css +1 -0
  158. package/lib/Divider/style/index.css +1 -0
  159. package/lib/Drawer/style/index.css +1 -0
  160. package/lib/Dropdown/style/index.css +3 -2
  161. package/lib/Dropdown/style/variables.css +2 -2
  162. package/lib/EditTable/style/index.css +1 -0
  163. package/lib/Empty/style/index.css +1 -0
  164. package/lib/Filter/style/index.css +1 -0
  165. package/lib/Form/style/index.css +1 -0
  166. package/lib/FullScreen/style/index.css +1 -0
  167. package/lib/Grid/style/index.css +1 -0
  168. package/lib/Icon/style/index.css +1 -0
  169. package/lib/Image/style/index.css +1 -0
  170. package/lib/ImageViewer/components/Operate.js +6 -2
  171. package/lib/Input/style/index.css +1 -0
  172. package/lib/InputNumber/style/index.css +1 -0
  173. package/lib/Layout/style/index.css +1 -0
  174. package/lib/LeftTable/index.js +3 -1
  175. package/lib/LeftTable/style/index.css +1 -0
  176. package/lib/List/style/index.css +1 -0
  177. package/lib/LmEditTable/EditTable.js +39 -87
  178. package/lib/LmEditTable/style/index.css +5 -0
  179. package/lib/LmEditTable/style/variables.css +4 -0
  180. package/lib/LmEditTable/util.d.ts +1 -0
  181. package/lib/LmEditTable/util.js +30 -0
  182. package/lib/LmSelect/style/index.css +1 -0
  183. package/lib/LmTable/Table.js +9 -5
  184. package/lib/LmTable/style/index.css +4 -0
  185. package/lib/LmTable/style/variables.css +3 -0
  186. package/lib/LmUpload/style/index.css +118 -0
  187. package/lib/LmUpload/style/variables.css +118 -0
  188. package/lib/Locale/default.d.ts +4 -1
  189. package/lib/Locale/default.js +4 -1
  190. package/lib/Locale/zh_CN.d.ts +4 -1
  191. package/lib/Locale/zh_CN.js +4 -1
  192. package/lib/Mentions/style/index.css +1 -0
  193. package/lib/Menu/style/index.css +1 -0
  194. package/lib/Modal/index.js +22 -14
  195. package/lib/Modal/locale.d.ts +7 -0
  196. package/lib/Modal/locale.js +25 -0
  197. package/lib/Modal/style/index.css +1 -0
  198. package/lib/PageHeader/style/index.css +1 -0
  199. package/lib/Pagination/style/index.css +1 -0
  200. package/lib/Popconfirm/style/index.css +1 -0
  201. package/lib/Popover/style/index.css +1 -0
  202. package/lib/Progress/style/index.css +1 -0
  203. package/lib/QuickMenu/style/index.css +6 -0
  204. package/lib/QuickMenu/style/variables.css +5 -0
  205. package/lib/Rate/style/index.css +1 -0
  206. package/lib/Result/style/index.css +1 -0
  207. package/lib/Row/style/index.css +1 -0
  208. package/lib/Segmented/style/index.css +1 -0
  209. package/lib/Select/style/index.css +1 -0
  210. package/lib/Skeleton/style/index.css +1 -0
  211. package/lib/Slider/style/index.css +1 -0
  212. package/lib/Space/style/index.css +1 -0
  213. package/lib/Spin/style/index.css +1 -0
  214. package/lib/Statistic/style/index.css +1 -0
  215. package/lib/Steps/style/index.css +1 -0
  216. package/lib/Switch/style/index.css +1 -0
  217. package/lib/Table/style/index.css +1 -0
  218. package/lib/Tabs/style/index.css +1 -0
  219. package/lib/Tag/style/index.css +1 -0
  220. package/lib/TimePicker/style/index.css +1 -0
  221. package/lib/Timeline/style/index.css +1 -0
  222. package/lib/Tooltip/style/index.css +1 -0
  223. package/lib/Transfer/style/index.css +1 -0
  224. package/lib/Tree/style/index.css +1 -0
  225. package/lib/TreeSelect/style/index.css +1 -0
  226. package/lib/Typography/style/index.css +1 -0
  227. package/lib/Upload/style/index.css +1 -0
  228. package/lib/locale-provider/style/index.css +1 -0
  229. package/lib/message/style/index.css +1 -0
  230. package/lib/notification/style/index.css +1 -0
  231. package/lib/styles/main.css +1 -0
  232. package/lib/styles/variables.css +148 -12
  233. package/package.json +1 -6
@@ -198,6 +198,7 @@
198
198
  --font-size-base: 14px;
199
199
  --font-size-lg: calc(var(--font-size-base) + 2px);
200
200
  --font-size-sm: 12px;
201
+ --border-radius: 2px;
201
202
  --color-contrast: #fff;
202
203
  --color-100: #000;
203
204
  --color-85: #262626;
@@ -198,6 +198,7 @@
198
198
  --font-size-base: 14px;
199
199
  --font-size-lg: calc(var(--font-size-base) + 2px);
200
200
  --font-size-sm: 12px;
201
+ --border-radius: 2px;
201
202
  --color-contrast: #fff;
202
203
  --color-100: #000;
203
204
  --color-85: #262626;
@@ -198,6 +198,7 @@
198
198
  --font-size-base: 14px;
199
199
  --font-size-lg: calc(var(--font-size-base) + 2px);
200
200
  --font-size-sm: 12px;
201
+ --border-radius: 2px;
201
202
  --color-contrast: #fff;
202
203
  --color-100: #000;
203
204
  --color-85: #262626;
@@ -198,6 +198,7 @@
198
198
  --font-size-base: 14px;
199
199
  --font-size-lg: calc(var(--font-size-base) + 2px);
200
200
  --font-size-sm: 12px;
201
+ --border-radius: 2px;
201
202
  --color-contrast: #fff;
202
203
  --color-100: #000;
203
204
  --color-85: #262626;
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { IconFont } from 'linkmore-design';
3
+ import { ZoomOutOutlined } from '@ant-design/icons';
3
4
 
4
5
  var Operate = function Operate(_ref) {
5
6
  var instance = _ref.instance;
@@ -19,10 +20,12 @@ var Operate = function Operate(_ref) {
19
20
  onClick: function onClick(e) {
20
21
  return handleTranform(e, 'zoomIn');
21
22
  }
22
- }), /*#__PURE__*/React.createElement(IconFont, {
23
- type: "lmweb-a-icon_m_search1",
23
+ }), /*#__PURE__*/React.createElement(ZoomOutOutlined, {
24
24
  onClick: function onClick(e) {
25
25
  return handleTranform(e, 'zoomOut');
26
+ },
27
+ style: {
28
+ fontSize: 22
26
29
  }
27
30
  }), /*#__PURE__*/React.createElement(IconFont, {
28
31
  type: "lmweb-undo",
@@ -198,6 +198,7 @@
198
198
  --font-size-base: 14px;
199
199
  --font-size-lg: calc(var(--font-size-base) + 2px);
200
200
  --font-size-sm: 12px;
201
+ --border-radius: 2px;
201
202
  --color-contrast: #fff;
202
203
  --color-100: #000;
203
204
  --color-85: #262626;
@@ -198,6 +198,7 @@
198
198
  --font-size-base: 14px;
199
199
  --font-size-lg: calc(var(--font-size-base) + 2px);
200
200
  --font-size-sm: 12px;
201
+ --border-radius: 2px;
201
202
  --color-contrast: #fff;
202
203
  --color-100: #000;
203
204
  --color-85: #262626;
@@ -198,6 +198,7 @@
198
198
  --font-size-base: 14px;
199
199
  --font-size-lg: calc(var(--font-size-base) + 2px);
200
200
  --font-size-sm: 12px;
201
+ --border-radius: 2px;
201
202
  --color-contrast: #fff;
202
203
  --color-100: #000;
203
204
  --color-85: #262626;
@@ -160,7 +160,9 @@ var LeftSide = function LeftSide(props) {
160
160
  className: useToggle ? "lm_grid_tree ".concat(modeTypeCls) : "lm_grid_tree grid_toggle ".concat(modeTypeCls)
161
161
  }, /*#__PURE__*/_react.default.createElement("div", {
162
162
  className: "grid_tree_title",
163
- onClick: onHeaderClick
163
+ onClick: function onClick(e) {
164
+ onHeaderClick && onHeaderClick(e);
165
+ }
164
166
  }, /*#__PURE__*/_react.default.createElement("div", {
165
167
  className: "grid_tree_title_left"
166
168
  }, /*#__PURE__*/_react.default.createElement("span", null, useTree.title)), treeType && /*#__PURE__*/_react.default.createElement(_Popover.default, {
@@ -198,6 +198,7 @@
198
198
  --font-size-base: 14px;
199
199
  --font-size-lg: calc(var(--font-size-base) + 2px);
200
200
  --font-size-sm: 12px;
201
+ --border-radius: 2px;
201
202
  --color-contrast: #fff;
202
203
  --color-100: #000;
203
204
  --color-85: #262626;
@@ -198,6 +198,7 @@
198
198
  --font-size-base: 14px;
199
199
  --font-size-lg: calc(var(--font-size-base) + 2px);
200
200
  --font-size-sm: 12px;
201
+ --border-radius: 2px;
201
202
  --color-contrast: #fff;
202
203
  --color-100: #000;
203
204
  --color-85: #262626;
@@ -56,6 +56,7 @@ import { arrayMove } from '@dnd-kit/sortable';
56
56
  import { Button, Checkbox, IconFont, Input, InputNumber, Radio, Select, Table, Switch, DatePicker, Form } from 'linkmore-design';
57
57
  import { get, set, isFunction, omit } from 'lodash';
58
58
  import React, { forwardRef, useContext, useEffect, useImperativeHandle, useMemo, useRef, useState, memo, useCallback } from 'react';
59
+ import { useControllableValue } from 'ahooks';
59
60
  import { produce } from 'immer';
60
61
  import DndContainer from './DndContainer';
61
62
  import SortableBox from './sortableBox';
@@ -64,7 +65,7 @@ import SortableItem from './sortableItem';
64
65
  import ColSortableItem from './sortableItemCol';
65
66
  import DragHandle from './DragHandle';
66
67
  import UploadOss from '../UploadOss';
67
- import { isObjEmpty, deepDataSourcePreKeys, isExpandRow } from './util';
68
+ import { isObjEmpty, deepDataSourcePreKeys, isExpandRow, checkRowKeyByDataSource } from './util';
68
69
  import cls from "classnames";
69
70
  var UploadBtn = UploadOss.UploadBtn;
70
71
  var EditableContext = /*#__PURE__*/React.createContext(null); // 表格行
@@ -241,7 +242,8 @@ var Opetate = function Opetate(_ref) {
241
242
  style: {
242
243
  display: 'flex',
243
244
  alignItems: 'center',
244
- justifyContent: 'center'
245
+ justifyContent: 'flex-start',
246
+ marginLeft: '-4px'
245
247
  }
246
248
  }, options.includes('delete') && /*#__PURE__*/React.createElement(Button, {
247
249
  type: "link",
@@ -683,35 +685,39 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
683
685
  recordCreatorProps = props.recordCreatorProps,
684
686
  _props$shouldUpdate = props.shouldUpdate,
685
687
  shouldUpdate = _props$shouldUpdate === void 0 ? false : _props$shouldUpdate,
686
- resetProps = __rest(props, ["value", "columns", "isEdit", "isAdd", "onChange", "rowKey", "rowHoverEdit", "isUseForm", "isHoverEdit", "useQuickOpetate", "quickOpetateClearAll", "rowSelection", "sortOpen", "colSortOpen", "filterChange", "size", "recordCreatorProps", "shouldUpdate"]);
688
+ resetProps = __rest(props, ["value", "columns", "isEdit", "isAdd", "onChange", "rowKey", "rowHoverEdit", "isUseForm", "isHoverEdit", "useQuickOpetate", "quickOpetateClearAll", "rowSelection", "sortOpen", "colSortOpen", "filterChange", "size", "recordCreatorProps", "shouldUpdate"]); // const [dataSource, setDataSource] = useState([]);
689
+
690
+
691
+ var _useControllableValue = useControllableValue({
692
+ value: checkRowKeyByDataSource(props.value, _rowKey),
693
+ onChange: props.onChange
694
+ }),
695
+ _useControllableValue2 = _slicedToArray(_useControllableValue, 2),
696
+ dataSource = _useControllableValue2[0],
697
+ setDataSource = _useControllableValue2[1]; // const [count, setCount] = useState(0);
687
698
 
688
- var _useState5 = useState([]),
689
- _useState6 = _slicedToArray(_useState5, 2),
690
- dataSource = _useState6[0],
691
- setDataSource = _useState6[1]; // const [count, setCount] = useState(0);
692
699
 
700
+ var _useState5 = useState({}),
701
+ _useState6 = _slicedToArray(_useState5, 2),
702
+ _valid = _useState6[0],
703
+ setValid = _useState6[1];
693
704
 
694
- var _useState7 = useState({}),
705
+ var _useState7 = useState([]),
695
706
  _useState8 = _slicedToArray(_useState7, 2),
696
- _valid = _useState8[0],
697
- setValid = _useState8[1];
707
+ localRowSelectList = _useState8[0],
708
+ setLocalRowSelectList = _useState8[1];
698
709
 
699
710
  var _useState9 = useState([]),
700
711
  _useState10 = _slicedToArray(_useState9, 2),
701
- localRowSelectList = _useState10[0],
702
- setLocalRowSelectList = _useState10[1];
703
-
704
- var _useState11 = useState([]),
705
- _useState12 = _slicedToArray(_useState11, 2),
706
- sortEditTable = _useState12[0],
707
- setCallBackFalg = _useState12[1];
712
+ sortEditTable = _useState10[0],
713
+ setCallBackFalg = _useState10[1];
708
714
  /** 当前展开的列 */
709
715
 
710
716
 
711
- var _useState13 = useState([]),
712
- _useState14 = _slicedToArray(_useState13, 2),
713
- expandedRowKeys = _useState14[0],
714
- setExpandedRowKeys = _useState14[1];
717
+ var _useState11 = useState([]),
718
+ _useState12 = _slicedToArray(_useState11, 2),
719
+ expandedRowKeys = _useState12[0],
720
+ setExpandedRowKeys = _useState12[1];
715
721
 
716
722
  var dataSourceRef = useRef([]);
717
723
  var sortDataSorceRef = useRef([]);
@@ -726,12 +732,7 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
726
732
  var newIndex = cloneArr.findIndex(function (v) {
727
733
  return v[_rowKey] === over;
728
734
  });
729
-
730
- if (onChange) {
731
- onChange === null || onChange === void 0 ? void 0 : onChange(arrayMove(cloneArr, oldIndex, newIndex));
732
- } else {
733
- setDataSource(arrayMove(cloneArr, oldIndex, newIndex));
734
- }
735
+ setDataSource(arrayMove(cloneArr, oldIndex, newIndex));
735
736
  };
736
737
 
737
738
  var onColSortEnd = function onColSortEnd(active, over) {
@@ -754,8 +755,9 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
754
755
  var handleDelete = function handleDelete(key) {
755
756
  var nValue = dataSource.filter(function (item) {
756
757
  return item[_rowKey] !== key;
757
- });
758
- onChange === null || onChange === void 0 ? void 0 : onChange(nValue);
758
+ }); // onChange?.(nValue)
759
+
760
+ setDataSource(nValue);
759
761
  };
760
762
  /** 点击添加按钮添加 */
761
763
 
@@ -767,14 +769,14 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
767
769
  var res = produce(dataSourceRef.current, function (draft) {
768
770
  draft.push(Object.assign(_defineProperty({}, _rowKey, "".concat(Date.now())), addDataInfo || {}));
769
771
  });
770
- setDataSource(res);
771
- onChange === null || onChange === void 0 ? void 0 : onChange(res);
772
+ setDataSource(res); // onChange?.(res)
772
773
  };
773
774
 
774
775
  useEffect(function () {
775
776
  var _a;
776
777
 
777
778
  dataSourceRef.current = dataSource;
779
+ deepDataSourceRef.current = deepDataSourcePreKeys(dataSource, _rowKey);
778
780
 
779
781
  if (sortOpen) {
780
782
  var dataSourceKeys = dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (item) {
@@ -879,12 +881,7 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
879
881
  }
880
882
  }
881
883
  });
882
-
883
- if (onChange) {
884
- onChange === null || onChange === void 0 ? void 0 : onChange(res);
885
- } else {
886
- setDataSource(res);
887
- }
884
+ setDataSource(res);
888
885
  };
889
886
 
890
887
  var reWriteOriginSource = function reWriteOriginSource(rowKey, rowValue, dataIndex, nextValue) {
@@ -925,12 +922,7 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
925
922
  };
926
923
 
927
924
  var res = filter(dataSource, key);
928
-
929
- if (onChange) {
930
- onChange === null || onChange === void 0 ? void 0 : onChange(res);
931
- } else {
932
- setDataSource(res);
933
- }
925
+ setDataSource(res);
934
926
  } else {
935
927
  if (((_c = dataSourceRef.current) === null || _c === void 0 ? void 0 : _c.length) === 1 && !quickOpetateClearAll) {
936
928
  return false;
@@ -946,11 +938,7 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
946
938
  }
947
939
  });
948
940
 
949
- if (onChange) {
950
- onChange === null || onChange === void 0 ? void 0 : onChange(_res);
951
- } else {
952
- setDataSource(_res);
953
- }
941
+ setDataSource(_res);
954
942
  }
955
943
  };
956
944
  /** 快捷添加 */
@@ -985,12 +973,7 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
985
973
  }
986
974
  }
987
975
  });
988
-
989
- if (onChange) {
990
- onChange === null || onChange === void 0 ? void 0 : onChange(res);
991
- } else {
992
- setDataSource(res);
993
- }
976
+ setDataSource(res);
994
977
  };
995
978
 
996
979
  var handleCopy = function handleCopy(key, value) {
@@ -999,12 +982,7 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
999
982
  return item[key] = value;
1000
983
  });
1001
984
  });
1002
-
1003
- if (onChange) {
1004
- onChange === null || onChange === void 0 ? void 0 : onChange(res);
1005
- } else {
1006
- setDataSource(res);
1007
- }
985
+ setDataSource(res);
1008
986
  };
1009
987
  /** 判断columne中有没有带optionOnly参数 */
1010
988
 
@@ -1077,6 +1055,7 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
1077
1055
  width: 68,
1078
1056
  fixed: 'right',
1079
1057
  editable: 'lm_edit_opetate',
1058
+ className: 'lm_edit_opetate',
1080
1059
  componentProps: {
1081
1060
  options: Array.isArray(useQuickOpetate) ? useQuickOpetate : ['add', 'delete']
1082
1061
  }
@@ -1224,34 +1203,6 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
1224
1203
  components: component
1225
1204
  }, resetProps);
1226
1205
  }, [resultColumns, dataSource, sortOpen, colSortOpen, size]);
1227
- useEffect(function () {
1228
- // setDataSource(defaultData?.map((v, idx) => ({ ...v, [rowKey]: v[rowKey] || `v${idx + 1}` })))
1229
- var addRowKey = function addRowKey(children, pkey) {
1230
- return children === null || children === void 0 ? void 0 : children.map(function (item, index) {
1231
- if (item.children) {
1232
- var _Object$assign5;
1233
-
1234
- var rchildren = addRowKey(item.children, "".concat(pkey, "_").concat(index + 1));
1235
- return Object.assign(Object.assign({}, item), (_Object$assign5 = {}, _defineProperty(_Object$assign5, _rowKey, item[_rowKey] || "".concat(pkey, "_").concat(index + 1)), _defineProperty(_Object$assign5, "children", rchildren), _Object$assign5));
1236
- }
1237
-
1238
- return Object.assign(Object.assign({}, item), _defineProperty({}, _rowKey, item[_rowKey] || "".concat(pkey, "_").concat(index + 1)));
1239
- });
1240
- };
1241
-
1242
- var res = defaultData === null || defaultData === void 0 ? void 0 : defaultData.map(function (v, idx) {
1243
- if (v.children) {
1244
- var _Object$assign7;
1245
-
1246
- var rchildren = addRowKey(v.children, v[_rowKey] || "v".concat(idx + 1));
1247
- return Object.assign(Object.assign({}, v), (_Object$assign7 = {}, _defineProperty(_Object$assign7, _rowKey, v[_rowKey] || "v".concat(idx + 1)), _defineProperty(_Object$assign7, "children", rchildren), _Object$assign7));
1248
- }
1249
-
1250
- return Object.assign(Object.assign({}, v), _defineProperty({}, _rowKey, v[_rowKey] || "v".concat(idx + 1)));
1251
- });
1252
- deepDataSourceRef.current = deepDataSourcePreKeys(res, _rowKey);
1253
- setDataSource(res);
1254
- }, [defaultData]);
1255
1206
  useImperativeHandle(ref, function () {
1256
1207
  return {
1257
1208
  setRow: handleSave,
@@ -198,6 +198,7 @@
198
198
  --font-size-base: 14px;
199
199
  --font-size-lg: calc(var(--font-size-base) + 2px);
200
200
  --font-size-sm: 12px;
201
+ --border-radius: 2px;
201
202
  --color-contrast: #fff;
202
203
  --color-100: #000;
203
204
  --color-85: #262626;
@@ -579,6 +580,10 @@ p {
579
580
  .lm_editTable_warpper .ant-table .ant-table-tbody > .ant-table-measure-row > td {
580
581
  padding: 0 !important;
581
582
  }
583
+ .lm_editTable_warpper .lm_edit_opetate {
584
+ padding-left: 8px;
585
+ padding-right: 8px;
586
+ }
582
587
  .lm_editTable_warpper .ant-picker {
583
588
  height: 24px !important;
584
589
  padding: 2px 8px;
@@ -68,6 +68,10 @@
68
68
  .lm_editTable_warpper .ant-table .ant-table-tbody > .ant-table-measure-row > td {
69
69
  padding: 0 !important;
70
70
  }
71
+ .lm_editTable_warpper .lm_edit_opetate {
72
+ padding-left: 8px;
73
+ padding-right: 8px;
74
+ }
71
75
  .lm_editTable_warpper .ant-picker {
72
76
  height: 24px !important;
73
77
  padding: 2px 8px;
@@ -1,6 +1,7 @@
1
1
  export declare function isObjEmpty(obj: Record<string, any>): boolean;
2
2
  export declare function deepDataSourcePreKeys(dataSource: any[], rowKey: string): any;
3
3
  export declare function isExpandRow(children: any): boolean;
4
+ export declare function checkRowKeyByDataSource(dataSource: any, rowKey: any): any;
4
5
  declare const _default: {
5
6
  isObjEmpty: typeof isObjEmpty;
6
7
  };
@@ -1,3 +1,4 @@
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
1
2
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
3
  import { keyBy } from 'lodash';
3
4
  export function isObjEmpty(obj) {
@@ -28,6 +29,32 @@ export function isExpandRow(children) {
28
29
 
29
30
  return ['Collapse row', 'Expand row'].includes((_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']);
30
31
  }
32
+ export function checkRowKeyByDataSource(dataSource, rowKey) {
33
+ var addRowKey = function addRowKey(children, pkey) {
34
+ return children === null || children === void 0 ? void 0 : children.map(function (item, index) {
35
+ if (item.children) {
36
+ var _Object$assign;
37
+
38
+ var rchildren = addRowKey(item.children, "".concat(pkey, "_").concat(index + 1));
39
+ return Object.assign(Object.assign({}, item), (_Object$assign = {}, _defineProperty(_Object$assign, rowKey, item[rowKey] || "".concat(pkey, "_").concat(index + 1)), _defineProperty(_Object$assign, "children", rchildren), _Object$assign));
40
+ }
41
+
42
+ return Object.assign(Object.assign({}, item), _defineProperty({}, rowKey, item[rowKey] || "".concat(pkey, "_").concat(index + 1)));
43
+ });
44
+ };
45
+
46
+ var res = dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (v, idx) {
47
+ if (v.children) {
48
+ var _Object$assign3;
49
+
50
+ var rchildren = addRowKey(v.children, v[rowKey] || "v".concat(idx + 1));
51
+ return Object.assign(Object.assign({}, v), (_Object$assign3 = {}, _defineProperty(_Object$assign3, rowKey, v[rowKey] || "v".concat(idx + 1)), _defineProperty(_Object$assign3, "children", rchildren), _Object$assign3));
52
+ }
53
+
54
+ return Object.assign(Object.assign({}, v), _defineProperty({}, rowKey, v[rowKey] || "v".concat(idx + 1)));
55
+ });
56
+ return res;
57
+ }
31
58
  export default {
32
59
  isObjEmpty: isObjEmpty
33
60
  };
@@ -198,6 +198,7 @@
198
198
  --font-size-base: 14px;
199
199
  --font-size-lg: calc(var(--font-size-base) + 2px);
200
200
  --font-size-sm: 12px;
201
+ --border-radius: 2px;
201
202
  --color-contrast: #fff;
202
203
  --color-100: #000;
203
204
  --color-85: #262626;
@@ -31,8 +31,6 @@ var _react = _interopRequireWildcard(require("react"));
31
31
 
32
32
  var _reactResizable = require("react-resizable");
33
33
 
34
- var _ahooks = require("ahooks");
35
-
36
34
  var _immer = require("immer");
37
35
 
38
36
  var _reactSortableHoc = require("react-sortable-hoc");
@@ -391,8 +389,14 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
391
389
  var handleResize = function handleResize(index) {
392
390
  return function (e, _ref2) {
393
391
  var size = _ref2.size;
392
+ var i = index;
394
393
  var nextColumns = (0, _toConsumableArray2.default)(useColumns);
395
- nextColumns[index] = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, nextColumns[index]), {}, {
394
+ nextColumns.forEach(function (item, index) {
395
+ if (index <= i && item.show === false) {
396
+ i += 1;
397
+ }
398
+ });
399
+ nextColumns[i] = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, nextColumns[i]), {}, {
396
400
  width: size.width
397
401
  });
398
402
  setColumns(nextColumns);
@@ -996,7 +1000,7 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
996
1000
  var colIndex = 0;
997
1001
 
998
1002
  var traverseColumns = function traverseColumns(columns) {
999
- columns === null || columns === void 0 ? void 0 : columns.forEach(function (col) {
1003
+ columns === null || columns === void 0 ? void 0 : columns.forEach(function (col, index) {
1000
1004
  if (col.show === false) {
1001
1005
  return;
1002
1006
  }
@@ -1011,7 +1015,7 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
1011
1015
  col.onHeaderCell = function (column) {
1012
1016
  return resizeable ? {
1013
1017
  width: column.width,
1014
- onResize: handleResize(col.$_colIndex),
1018
+ onResize: handleResize(index),
1015
1019
  onResizeStop: endResize
1016
1020
  } : {
1017
1021
  width: column.width
@@ -198,6 +198,7 @@
198
198
  --font-size-base: 14px;
199
199
  --font-size-lg: calc(var(--font-size-base) + 2px);
200
200
  --font-size-sm: 12px;
201
+ --border-radius: 2px;
201
202
  --color-contrast: #fff;
202
203
  --color-100: #000;
203
204
  --color-85: #262626;
@@ -1237,6 +1238,9 @@ p {
1237
1238
  height: 48px;
1238
1239
  font-size: 12px;
1239
1240
  }
1241
+ #lm_protable_warp .ant-table-tbody > tr > .ant-table-selection-column {
1242
+ text-align: left;
1243
+ }
1240
1244
  #lm_protable_warp .ant-table-tbody > tr.ant-table-measure-row > td {
1241
1245
  padding: 0 !important;
1242
1246
  }
@@ -726,6 +726,9 @@
726
726
  height: 48px;
727
727
  font-size: 12px;
728
728
  }
729
+ #lm_protable_warp .ant-table-tbody > tr > .ant-table-selection-column {
730
+ text-align: left;
731
+ }
729
732
  #lm_protable_warp .ant-table-tbody > tr.ant-table-measure-row > td {
730
733
  padding: 0 !important;
731
734
  }
@@ -1,3 +1,121 @@
1
+ .lm_image_viewer_wrapper {
2
+ position: fixed;
3
+ z-index: 1001;
4
+ inset: 0;
5
+ }
6
+ .lm_image_viewer_wrapper .lm_image_viewer_mask {
7
+ position: absolute;
8
+ background-color: rgba(0, 0, 0, 0.5);
9
+ inset: 0;
10
+ }
11
+ .lm_image_viewer_wrapper .lm_image_viewer_container {
12
+ position: relative;
13
+ z-index: 2;
14
+ display: flex;
15
+ flex-flow: column;
16
+ gap: var(--gap);
17
+ align-items: center;
18
+ height: 100vh;
19
+ padding: 50px 0;
20
+ }
21
+ .lm_image_viewer_wrapper .lm_image_viewer_container .preview_list {
22
+ flex: 1;
23
+ width: 51%;
24
+ max-height: 100%;
25
+ overflow: hidden;
26
+ touch-action: none;
27
+ }
28
+ .lm_image_viewer_wrapper .lm_image_viewer_container .preview_list div {
29
+ height: 100%;
30
+ }
31
+ .lm_image_viewer_wrapper .lm_image_viewer_container .preview_list .preview_item {
32
+ overflow: hidden;
33
+ text-align: center;
34
+ border-radius: 2px;
35
+ }
36
+ .lm_image_viewer_wrapper .lm_image_viewer_container .preview_list .preview_item img {
37
+ display: inline-block;
38
+ width: 100%;
39
+ height: 100%;
40
+ object-fit: contain;
41
+ transition: 0.3s;
42
+ }
43
+ .lm_image_viewer_wrapper .lm_image_viewer_container .thumb_list {
44
+ display: flex;
45
+ gap: var(--gap);
46
+ width: 51%;
47
+ overflow-x: auto;
48
+ overflow-y: hidden;
49
+ }
50
+ .lm_image_viewer_wrapper .lm_image_viewer_container .thumb_list .thumb_item {
51
+ display: inline-flex;
52
+ align-items: center;
53
+ justify-content: center;
54
+ width: 98px;
55
+ height: 98px;
56
+ text-align: center;
57
+ background-color: var(--color-contrast);
58
+ border: 2px solid transparent;
59
+ border-radius: 2px;
60
+ transition: 0.3s;
61
+ }
62
+ .lm_image_viewer_wrapper .lm_image_viewer_container .thumb_list .thumb_item .thumb_item_icon {
63
+ color: var(--color-45);
64
+ font-size: 34px;
65
+ }
66
+ .lm_image_viewer_wrapper .lm_image_viewer_container .thumb_list .thumb_item img {
67
+ display: inline-block;
68
+ width: 94px;
69
+ height: 94px;
70
+ object-fit: cover;
71
+ }
72
+ .lm_image_viewer_wrapper .lm_image_viewer_container .thumb_list .thumb_item.active {
73
+ border-color: var(--primary-color);
74
+ }
75
+ .lm_image_viewer_wrapper .lm_image_viewer_container .image_viewer_action {
76
+ position: absolute;
77
+ bottom: 50px;
78
+ left: 50%;
79
+ display: flex;
80
+ gap: 24px;
81
+ align-items: center;
82
+ justify-content: space-between;
83
+ padding: 8px 12px;
84
+ font-size: 24px;
85
+ background-color: #fff;
86
+ border-radius: 100px;
87
+ transform: translateX(-50%);
88
+ }
89
+ .lm_image_viewer_wrapper .lm_image_viewer_container .image_viewer_action .anticon {
90
+ cursor: pointer;
91
+ transition: 0.3s;
92
+ }
93
+ .lm_image_viewer_wrapper .lm_image_viewer_container .image_viewer_action .anticon:hover {
94
+ color: var(--primary-color);
95
+ }
96
+ .lm_image_viewer_wrapper .lm_image_viewer_container .arrow {
97
+ position: absolute;
98
+ top: 50%;
99
+ display: flex;
100
+ align-items: center;
101
+ justify-content: center;
102
+ height: 48px;
103
+ color: var(--color-contrast);
104
+ font-size: 32px;
105
+ background-color: var(--text-color);
106
+ transform: translateY(-50%);
107
+ cursor: pointer;
108
+ transition: 0.3s;
109
+ }
110
+ .lm_image_viewer_wrapper .lm_image_viewer_container .arrow.arrow_left {
111
+ left: 40px;
112
+ }
113
+ .lm_image_viewer_wrapper .lm_image_viewer_container .arrow.arrow_right {
114
+ right: 40px;
115
+ }
116
+ .lm_image_viewer_wrapper .lm_image_viewer_container .arrow:hover {
117
+ color: var(--primary-color);
118
+ }
1
119
  .lm_upload_wrapper {
2
120
  display: flex;
3
121
  flex-wrap: wrap;