@para-ui/core 4.0.0-rc → 4.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (250) hide show
  1. package/AutoBox/index.d.ts +1 -1
  2. package/AutoBox/index.js +12 -12
  3. package/AutoTips/autoTipsMultiline/index.d.ts +1 -1
  4. package/AutoTips/index.d.ts +2 -2
  5. package/AutoTips/index.js +12 -12
  6. package/Badge/index.d.ts +23 -0
  7. package/Badge/index.js +54 -0
  8. package/Breadcrumbs/index.js +8 -8
  9. package/Button/SplitButton.d.ts +1 -1
  10. package/Button/index.d.ts +1 -1
  11. package/Button/index.js +3 -3
  12. package/Carousel/index.d.ts +6 -6
  13. package/Carousel/index.js +5 -5
  14. package/Cascader/Cascader.d.ts +10 -10
  15. package/Cascader/OptionList/Column.d.ts +3 -3
  16. package/Cascader/OptionList/index.d.ts +2 -2
  17. package/Cascader/index.d.ts +1 -1
  18. package/Cascader/index.js +4 -2
  19. package/Cascader/lang/en_US.d.ts +5 -0
  20. package/Cascader/lang/index.d.ts +11 -0
  21. package/Cascader/lang/zh_CN.d.ts +5 -0
  22. package/Cascader/utils/treeUtil.d.ts +1 -1
  23. package/Checkbox/index.d.ts +1 -1
  24. package/Checkbox/index.js +4 -4
  25. package/CheckboxGroup/index.d.ts +2 -2
  26. package/CheckboxGroup/index.js +3 -3
  27. package/Collapse/index.js +4 -4
  28. package/CollapseBox/index.js +12 -20
  29. package/CollapseLayout/index.js +20 -20
  30. package/ColorPicker/index.js +2 -2
  31. package/ComboSelect/index.js +43 -52
  32. package/ComboSelect/interface.d.ts +3 -3
  33. package/Container/index.d.ts +3 -3
  34. package/Container/index.js +56 -56
  35. package/CopyText/index.d.ts +2 -2
  36. package/DatePicker/generatePicker/index.d.ts +22 -22
  37. package/DatePicker/index.js +8 -7
  38. package/DatePicker/util.d.ts +1 -1
  39. package/Desktop/index.d.ts +1 -1
  40. package/Desktop/index.js +18 -13
  41. package/DragVerify/index.d.ts +1 -1
  42. package/DragVerify/index.js +13 -13
  43. package/Drawer/index.js +29 -33
  44. package/Drawer/interface.d.ts +2 -2
  45. package/Dropdown/index.d.ts +1 -1
  46. package/DynamicMultiBox/formItem.d.ts +1 -1
  47. package/DynamicMultiBox/index.d.ts +1 -1
  48. package/DynamicMultiBox/index.js +38 -35
  49. package/DynamicMultiBox/interface.d.ts +8 -8
  50. package/DynamicMultiBox/rowForm.d.ts +3 -1
  51. package/Empty/index.d.ts +1 -1
  52. package/Empty/index.js +2 -2
  53. package/Form/index.d.ts +12 -13
  54. package/Form/index.js +10 -8
  55. package/FormItem/compoments/defaultCompoments/index.d.ts +4 -4
  56. package/FormItem/compoments/formCheckboxGroup/index.d.ts +1 -1
  57. package/FormItem/compoments/formFile/index.d.ts +2 -2
  58. package/FormItem/compoments/formRadioGroup/index.d.ts +1 -1
  59. package/FormItem/compoments/formSelect/index.d.ts +7 -7
  60. package/FormItem/errorTips.d.ts +3 -3
  61. package/FormItem/index.d.ts +5 -5
  62. package/FormItem/index.js +3 -2
  63. package/FormItem/lang/en_US.d.ts +10 -0
  64. package/FormItem/lang/index.d.ts +21 -0
  65. package/FormItem/lang/zh_CN.d.ts +10 -0
  66. package/FormItem/validateFunction.d.ts +1 -1
  67. package/FunctionModal/dialog.d.ts +26 -26
  68. package/FunctionModal/index.d.ts +6 -6
  69. package/FunctionModal/index.js +6 -6
  70. package/FunctionModal/modalContext.d.ts +3 -3
  71. package/GlobalContext/componentsProps.d.ts +7 -7
  72. package/GlobalContext/index.d.ts +2 -2
  73. package/GlobalContext/useFormatMessage.d.ts +1 -1
  74. package/Help/index.js +1 -1
  75. package/HelperText/index.js +1 -1
  76. package/InputLang/index.d.ts +2 -2
  77. package/InputLang/index.js +8 -8
  78. package/InputNumber/index.d.ts +2 -2
  79. package/InputNumber/index.js +3 -3
  80. package/Label/index.js +2 -2
  81. package/Loading/index.js +1 -1
  82. package/Menu/index.js +14 -14
  83. package/Menu/interface.d.ts +1 -1
  84. package/Message/index.js +12 -12
  85. package/Modal/Confirm/index.d.ts +3 -3
  86. package/Modal/index.d.ts +1 -1
  87. package/Modal/index.js +5 -5
  88. package/MultiBox/index.d.ts +2 -2
  89. package/MultiBox/index.js +3 -3
  90. package/Notification/index.js +1 -1
  91. package/OperateBtn/index.d.ts +2 -2
  92. package/OperateBtn/index.js +40 -36
  93. package/PageHeader/index.js +30 -30
  94. package/PageHeader/interface.d.ts +1 -1
  95. package/Pagination/index.d.ts +1 -1
  96. package/Pagination/index.js +17 -17
  97. package/PasswordRules/index.js +7 -7
  98. package/PopConfirm/index.js +3 -3
  99. package/Progress/Line.d.ts +10 -10
  100. package/Progress/Steps.d.ts +2 -2
  101. package/Progress/index.d.ts +12 -12
  102. package/Progress/index.js +40 -40
  103. package/Progress/utils.d.ts +4 -4
  104. package/Querying/index.d.ts +1 -1
  105. package/Querying/index.js +2 -2
  106. package/README.md +3 -0
  107. package/Radio/index.d.ts +1 -1
  108. package/Radio/index.js +4 -4
  109. package/RadioGroup/index.d.ts +2 -2
  110. package/RadioGroup/index.js +3 -3
  111. package/Search/index.js +1 -1
  112. package/Select/index.d.ts +3 -3
  113. package/Select/index.js +42 -42
  114. package/SelectInput/index.js +2 -2
  115. package/Selector/index.js +15 -15
  116. package/Selector/interface.d.ts +6 -6
  117. package/SelectorPicker/index.d.ts +4 -4
  118. package/SelectorPicker/index.js +9 -9
  119. package/SingleBox/index.d.ts +2 -2
  120. package/SingleBox/index.js +3 -3
  121. package/Slider/interface.d.ts +1 -1
  122. package/Status/index.d.ts +4 -4
  123. package/Status/index.js +4 -4
  124. package/Stepper/index.d.ts +5 -5
  125. package/Stepper/index.js +23 -23
  126. package/Switch/index.d.ts +7 -7
  127. package/Switch/index.js +23 -5
  128. package/Switch/lang/en_US.d.ts +4 -0
  129. package/Switch/lang/index.d.ts +9 -0
  130. package/Switch/lang/zh_CN.d.ts +4 -0
  131. package/Table/index.js +34 -34
  132. package/Table/interface.d.ts +4 -4
  133. package/Table/tableBodyElement/index.d.ts +1 -1
  134. package/Table/tableBodyInterface.d.ts +2 -2
  135. package/Table/tableContainer/index.d.ts +1 -1
  136. package/Table/tableElement/index.d.ts +1 -1
  137. package/Table/tableHeadElement/index.d.ts +1 -1
  138. package/Table/tableHeadInterface.d.ts +1 -1
  139. package/Table/tablePaginationInterface.d.ts +6 -6
  140. package/Table/tdElement/index.d.ts +1 -1
  141. package/Table/thElement/index.d.ts +2 -2
  142. package/Table/trElement/index.d.ts +1 -1
  143. package/Table/util.d.ts +1 -1
  144. package/Tabs/index.d.ts +1 -1
  145. package/Tabs/index.js +25 -17
  146. package/Tag/TagGroup.d.ts +5 -5
  147. package/Tag/index.d.ts +7 -7
  148. package/Tag/index.js +25 -25
  149. package/TextEditor/index.d.ts +2 -2
  150. package/TextEditor/index.js +45 -27
  151. package/TextEditor/lang/en_US.d.ts +4 -0
  152. package/TextEditor/lang/index.d.ts +9 -0
  153. package/TextEditor/lang/zh_CN.d.ts +4 -0
  154. package/TextField/index.d.ts +1 -1
  155. package/TextField/index.js +13 -13
  156. package/TimePicker/index.d.ts +1 -1
  157. package/TimePicker/index.js +1 -1
  158. package/Timeline/TimelineItem.d.ts +1 -1
  159. package/Timeline/index.d.ts +5 -5
  160. package/Timeline/index.js +14 -14
  161. package/Title/index.d.ts +4 -4
  162. package/Title/index.js +3 -3
  163. package/ToggleButton/ToggleButtonGroup.d.ts +1 -1
  164. package/ToggleButton/index.d.ts +5 -1
  165. package/ToggleButton/index.js +17 -10
  166. package/Transfer/box.d.ts +6 -6
  167. package/Transfer/index.js +21 -21
  168. package/Tree/OperateBar/index.d.ts +4 -4
  169. package/Tree/Tree.d.ts +2 -2
  170. package/Tree/index.js +2 -2
  171. package/Tree/interface.d.ts +4 -4
  172. package/Tree/utils/tools.d.ts +1 -1
  173. package/Upload/Dragger/index.d.ts +2 -2
  174. package/Upload/ErroTip/index.d.ts +1 -1
  175. package/Upload/index.d.ts +2 -2
  176. package/Upload/index.js +7 -7
  177. package/Upload/interface.d.ts +1 -1
  178. package/_verture/{index-8469865e.js → index-0f315bca.js} +2 -2
  179. package/_verture/{index-e1b800aa.js → index-92e406f4.js} +48 -24
  180. package/_verture/{index-47297a40.js → index-bc461491.js} +45 -45
  181. package/_verture/{index-1c8d3e94.js → index-d251967e.js} +101 -47
  182. package/_verture/{modalContext-670eab09.js → modalContext-9299acc9.js} +25 -25
  183. package/index.d.ts +2 -0
  184. package/index.js +8 -7
  185. package/locale/en-US.d.ts +19 -0
  186. package/locale/index.d.ts +38 -0
  187. package/locale/index.js +39 -1
  188. package/locale/zh-CN.d.ts +19 -0
  189. package/package.json +3 -1
  190. package/umd/AutoBox.js +1 -1
  191. package/umd/AutoTips.js +1 -1
  192. package/umd/Badge.js +1 -0
  193. package/umd/Breadcrumbs.js +1 -1
  194. package/umd/Button.js +2 -2
  195. package/umd/ButtonGroup.js +2 -2
  196. package/umd/Cascader.js +5 -5
  197. package/umd/Checkbox.js +1 -1
  198. package/umd/CheckboxGroup.js +1 -1
  199. package/umd/Collapse.js +1 -1
  200. package/umd/CollapseBox.js +1 -1
  201. package/umd/CollapseLayout.js +4 -4
  202. package/umd/ComboSelect.js +4 -4
  203. package/umd/CopyText.js +1 -1
  204. package/umd/DatePicker.js +2 -2
  205. package/umd/Desktop.js +2 -2
  206. package/umd/DragVerify.js +4 -4
  207. package/umd/Drawer.js +2 -2
  208. package/umd/DynamicMultiBox.js +4 -4
  209. package/umd/Form.js +4 -4
  210. package/umd/FormItem.js +4 -4
  211. package/umd/FunctionModal.js +2 -2
  212. package/umd/Help.js +1 -1
  213. package/umd/HelperText.js +1 -1
  214. package/umd/InputLang.js +1 -1
  215. package/umd/InputNumber.js +1 -1
  216. package/umd/Label.js +1 -1
  217. package/umd/Loading.js +1 -1
  218. package/umd/Menu.js +2 -2
  219. package/umd/Message.js +1 -1
  220. package/umd/Modal.js +2 -2
  221. package/umd/MultiBox.js +7 -7
  222. package/umd/Notification.js +1 -1
  223. package/umd/OperateBtn.js +2 -2
  224. package/umd/PageHeader.js +2 -2
  225. package/umd/Pagination.js +4 -4
  226. package/umd/PasswordRules.js +4 -4
  227. package/umd/PopConfirm.js +2 -2
  228. package/umd/Progress.js +1 -1
  229. package/umd/Radio.js +1 -1
  230. package/umd/RadioGroup.js +1 -1
  231. package/umd/Search.js +7 -7
  232. package/umd/Select.js +1 -1
  233. package/umd/SelectInput.js +1 -1
  234. package/umd/Selector.js +1 -1
  235. package/umd/SelectorPicker.js +1 -1
  236. package/umd/SingleBox.js +1 -1
  237. package/umd/Stepper.js +1 -1
  238. package/umd/Switch.js +4 -4
  239. package/umd/Table.js +2 -2
  240. package/umd/Tabs.js +4 -4
  241. package/umd/Tag.js +1 -1
  242. package/umd/TextEditor.js +2 -2
  243. package/umd/TextField.js +7 -7
  244. package/umd/TimePicker.js +2 -2
  245. package/umd/Title.js +1 -1
  246. package/umd/ToggleButton.js +4 -4
  247. package/umd/Transfer.js +2 -2
  248. package/umd/Tree.js +1 -1
  249. package/umd/Upload.js +2 -2
  250. package/umd/locale.js +1 -1
package/Drawer/index.js CHANGED
@@ -103,7 +103,8 @@ var Drawer = function Drawer(props) {
103
103
  var timerRef = useRef();
104
104
  var isHorizontal = ['left', 'right'].includes((_a = props.placement) !== null && _a !== void 0 ? _a : 'right');
105
105
  var startRef = useRef(0);
106
- var drawerRootEle = useRef(document.body);
106
+ var rootEleSize = useRef(0);
107
+ var contentEleSize = useRef(0);
107
108
  useEffect(function () {
108
109
  return function () {
109
110
  // 销毁时销毁timer
@@ -123,28 +124,20 @@ var Drawer = function Drawer(props) {
123
124
  return {};
124
125
  }
125
126
  var sizeMap = {
126
- large: 1000,
127
- medium: 630,
128
- small: 400
127
+ large: '1000px',
128
+ medium: '630px',
129
+ small: '400px'
129
130
  };
130
131
  var offsetStyle = {};
131
132
  if (props.placement === 'left' || props.placement === 'right') {
132
133
  var defaultWidth = sizeMap[size];
133
134
  if (size !== 'auto') {
134
- if (props.width) {
135
- offsetStyle.width = typeof props.width === 'string' ? parseInt(props.width) : props.width;
136
- } else {
137
- offsetStyle.width = defaultWidth;
138
- }
135
+ offsetStyle.width = props.width === undefined ? defaultWidth : props.width;
139
136
  }
140
137
  } else {
141
138
  var defaultHeight = size === 'large' ? 736 : 378;
142
139
  if (size !== 'auto') {
143
- if (props.height !== undefined) {
144
- offsetStyle.height = typeof props.height === 'string' ? parseInt(props.height) : props.height;
145
- } else {
146
- offsetStyle.height = defaultHeight;
147
- }
140
+ offsetStyle.height = props.height === undefined ? defaultHeight : props.height;
148
141
  }
149
142
  }
150
143
  return offsetStyle;
@@ -162,10 +155,14 @@ var Drawer = function Drawer(props) {
162
155
  onCancel === null || onCancel === void 0 ? void 0 : onCancel();
163
156
  };
164
157
  var onHandlerMouseDown = function onHandlerMouseDown(e) {
165
- var _a;
158
+ var _a, _b;
166
159
  setIsResizing(true);
167
- drawerRootEle.current = (_a = closest(e.target, ".".concat($prefixCls, "-drawer-open"))) !== null && _a !== void 0 ? _a : document.body;
168
160
  startRef.current = isHorizontal ? e.clientX : e.clientY;
161
+ var rootEle = (_a = closest(e.target, ".".concat($prefixCls, "-drawer-open"))) !== null && _a !== void 0 ? _a : document.body;
162
+ var contentCls = ".".concat($prefixCls, "-drawer-content-wrapper");
163
+ var contentEle = (_b = closest(e.target, contentCls)) !== null && _b !== void 0 ? _b : rootEle.querySelector(contentCls);
164
+ rootEleSize.current = isHorizontal ? rootEle.offsetWidth : rootEle.offsetHeight;
165
+ contentEleSize.current = isHorizontal ? contentEle.offsetWidth : contentEle.offsetHeight;
169
166
  document.addEventListener('mousemove', onHandlerMouseMove);
170
167
  document.addEventListener('mouseup', onHandlerMouseUp);
171
168
  };
@@ -175,12 +172,11 @@ var Drawer = function Drawer(props) {
175
172
  document.removeEventListener('mouseup', onHandlerMouseUp);
176
173
  };
177
174
  var onHandlerMouseMove = function onHandlerMouseMove(e) {
178
- var maximum = isHorizontal ? drawerRootEle.current.offsetWidth : drawerRootEle.current.offsetHeight;
179
175
  switch (props.placement) {
180
176
  case 'left':
181
177
  {
182
- var newWidth = Number(offsetStyle.width) + (e.clientX - startRef.current);
183
- if (newWidth + 100 >= maximum || newWidth < resizeMinimum) return;
178
+ var newWidth = contentEleSize.current + (e.clientX - startRef.current);
179
+ if (newWidth + 100 >= rootEleSize.current || newWidth < resizeMinimum) return;
184
180
  setOffsetStyle({
185
181
  width: newWidth
186
182
  });
@@ -188,8 +184,8 @@ var Drawer = function Drawer(props) {
188
184
  }
189
185
  case 'right':
190
186
  {
191
- var _newWidth = Number(offsetStyle.width) - (e.clientX - startRef.current);
192
- if (_newWidth + 100 >= maximum || _newWidth < resizeMinimum) return;
187
+ var _newWidth = contentEleSize.current - (e.clientX - startRef.current);
188
+ if (_newWidth + 100 >= rootEleSize.current || _newWidth < resizeMinimum) return;
193
189
  setOffsetStyle({
194
190
  width: _newWidth
195
191
  });
@@ -197,8 +193,8 @@ var Drawer = function Drawer(props) {
197
193
  }
198
194
  case 'top':
199
195
  {
200
- var newHeight = Number(offsetStyle.height) + (e.clientY - startRef.current);
201
- if (newHeight + 100 >= maximum || newHeight < resizeMinimum) return;
196
+ var newHeight = contentEleSize.current + (e.clientY - startRef.current);
197
+ if (newHeight + 100 >= rootEleSize.current || newHeight < resizeMinimum) return;
202
198
  setOffsetStyle({
203
199
  height: newHeight
204
200
  });
@@ -206,8 +202,8 @@ var Drawer = function Drawer(props) {
206
202
  }
207
203
  case 'bottom':
208
204
  {
209
- var _newHeight = Number(offsetStyle.height) - (e.clientY - startRef.current);
210
- if (_newHeight + 100 >= maximum || _newHeight < resizeMinimum) return;
205
+ var _newHeight = contentEleSize.current - (e.clientY - startRef.current);
206
+ if (_newHeight + 100 >= rootEleSize.current || _newHeight < resizeMinimum) return;
211
207
  setOffsetStyle({
212
208
  height: _newHeight
213
209
  });
@@ -243,16 +239,16 @@ var Drawer = function Drawer(props) {
243
239
  }, {
244
240
  children: extra || jsxs(Fragment, {
245
241
  children: [jsx(Button, Object.assign({
246
- variant: 'outlined',
247
- size: 'medium',
242
+ variant: "outlined",
243
+ size: "medium",
248
244
  onClick: handleCancel
249
245
  }, cancelButtonProps, {
250
246
  children: (cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps.children) || intl({
251
247
  id: 'cancel'
252
248
  })
253
249
  })), jsx(Button, Object.assign({
254
- variant: 'contained',
255
- size: 'medium',
250
+ variant: "contained",
251
+ size: "medium",
256
252
  onClick: handleOk
257
253
  }, okButtonProps, {
258
254
  children: (okButtonProps === null || okButtonProps === void 0 ? void 0 : okButtonProps.children) || intl({
@@ -285,7 +281,7 @@ var Drawer = function Drawer(props) {
285
281
  return null;
286
282
  }
287
283
  var maskMotion = {
288
- motionName: $prefixCls + '-drawer-mask-motion',
284
+ motionName: "".concat($prefixCls, "-drawer-mask-motion"),
289
285
  motionAppear: true,
290
286
  motionEnter: true,
291
287
  motionLeave: true,
@@ -293,7 +289,7 @@ var Drawer = function Drawer(props) {
293
289
  };
294
290
  var panelMotion = function panelMotion(motionPlacement) {
295
291
  return {
296
- motionName: $prefixCls + "-drawer-panel-motion-".concat(motionPlacement),
292
+ motionName: "".concat($prefixCls, "-drawer-panel-motion-").concat(motionPlacement),
297
293
  motionAppear: true,
298
294
  motionEnter: true,
299
295
  motionLeave: true,
@@ -321,11 +317,11 @@ var Drawer = function Drawer(props) {
321
317
  }
322
318
  }, {
323
319
  children: [resizable && jsx("div", Object.assign({
324
- className: 'drawer-handle',
320
+ className: "drawer-handle",
325
321
  onMouseDown: onHandlerMouseDown
326
322
  }, {
327
323
  children: jsx("div", {
328
- className: 'drawer-handle-icon'
324
+ className: "drawer-handle-icon"
329
325
  })
330
326
  })), renderContent()]
331
327
  }));
@@ -1,5 +1,5 @@
1
- import React from "react";
2
- import { ButtonProps } from "../Button";
1
+ import React from 'react';
2
+ import { ButtonProps } from '../Button';
3
3
  /**
4
4
  * @author Hanz
5
5
  * @date 2021/11/8 下午3:07
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import React, { FC } from 'react';
7
7
  import './index.scss';
8
- export type Placement = "top" | "topLeft" | "topRight" | "bottom" | "bottomLeft" | "bottomRight";
8
+ export type Placement = 'top' | 'topLeft' | 'topRight' | 'bottom' | 'bottomLeft' | 'bottomRight';
9
9
  export interface DropdownProps {
10
10
  /** 触发下拉的行为 */
11
11
  trigger?: ('click' | 'hover' | 'contextMenu')[];
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { IConfig, IErrors, IValueList } from "./interface";
2
+ import { IConfig, IErrors, IValueList } from './interface';
3
3
  export type IFormItem = {
4
4
  /** 表单值集合*/
5
5
  valueList?: IValueList[];
@@ -3,7 +3,7 @@
3
3
  * @date 2022/11/7 10:32 AM
4
4
  * @description 多值框组件
5
5
  */
6
- import { FunctionComponent } from "react";
6
+ import { FunctionComponent } from 'react';
7
7
  import { IMultiValueProps } from './interface';
8
8
  import './index.scss';
9
9
  declare const DynamicMultiBox: FunctionComponent<IMultiValueProps>;
@@ -73,7 +73,7 @@ import 'rc-pagination';
73
73
  import '@para-ui/icons/Right';
74
74
  import '@para-ui/icons/DoubleLeft';
75
75
  import '@para-ui/icons/DoubleRight';
76
- import '../_verture/index-47297a40.js';
76
+ import '../_verture/index-bc461491.js';
77
77
  import 'rc-tree';
78
78
  import '@para-ui/icons/Document';
79
79
  import 'react-dom';
@@ -81,6 +81,7 @@ import '@para-ui/icons/EditFile';
81
81
  import '@para-ui/icons/PlusCircle';
82
82
  import '@para-ui/icons/MoreCircle';
83
83
  import '../_verture/utils-06d86594.js';
84
+ import '../Search/index.js';
84
85
  import 'rc-picker/es/generate/dayjs';
85
86
  import '../Tag/index.js';
86
87
  import '@para-ui/icons/EditOutline';
@@ -180,7 +181,7 @@ var FormItem = function FormItem(props) {
180
181
  var getTextField = function getTextField() {
181
182
  return jsx(TextField, Object.assign({}, rest, {
182
183
  required: false,
183
- label: '',
184
+ label: "",
184
185
  disabled: disabled,
185
186
  onChange: function onChange(e) {
186
187
  return inputChange(e.target.value);
@@ -196,7 +197,7 @@ var FormItem = function FormItem(props) {
196
197
  return jsx(Select, Object.assign({}, rest, {
197
198
  list: selectList,
198
199
  required: false,
199
- label: '',
200
+ label: "",
200
201
  disabled: disabled,
201
202
  onChange: function onChange(value) {
202
203
  return inputChange(value);
@@ -242,7 +243,7 @@ var FormItem = function FormItem(props) {
242
243
  var getInputNumber = function getInputNumber() {
243
244
  return jsx(InputNumber, Object.assign({}, rest, {
244
245
  required: false,
245
- label: '',
246
+ label: "",
246
247
  disabled: disabled,
247
248
  onChange: function onChange(value) {
248
249
  return inputChange(value);
@@ -256,7 +257,7 @@ var FormItem = function FormItem(props) {
256
257
  var getInputLang = function getInputLang() {
257
258
  return jsx(InputLang, Object.assign({}, rest, {
258
259
  required: false,
259
- label: '',
260
+ label: "",
260
261
  onChange: function onChange(value) {
261
262
  return inputChange(value);
262
263
  }
@@ -269,7 +270,7 @@ var FormItem = function FormItem(props) {
269
270
  var getDatePicker = function getDatePicker() {
270
271
  return jsx(DatePicker, Object.assign({}, rest, {
271
272
  required: false,
272
- label: '',
273
+ label: "",
273
274
  disabled: disabled,
274
275
  onChange: onDatePickerChange,
275
276
  getPopupContainer: function getPopupContainer() {
@@ -284,7 +285,7 @@ var FormItem = function FormItem(props) {
284
285
  var getComboSelect = function getComboSelect() {
285
286
  return jsx(ComboSelect, Object.assign({}, rest, {
286
287
  required: false,
287
- label: '',
288
+ label: "",
288
289
  disabled: disabled,
289
290
  onChange: function onChange(options) {
290
291
  return inputChange(options);
@@ -306,7 +307,9 @@ var FormItem = function FormItem(props) {
306
307
  };
307
308
 
308
309
  var RowForm = function RowForm(props) {
309
- var _props$valueList = props.valueList,
310
+ var _props$rowKey = props.rowKey,
311
+ rowKey = _props$rowKey === void 0 ? 'id' : _props$rowKey,
312
+ _props$valueList = props.valueList,
310
313
  valueList = _props$valueList === void 0 ? [] : _props$valueList,
311
314
  rowError = props.rowError,
312
315
  _props$errors = props.errors,
@@ -339,13 +342,13 @@ var RowForm = function RowForm(props) {
339
342
  othersData = __rest(data, ["style"]);
340
343
  var formItemProps = (data === null || data === void 0 ? void 0 : data.inputType) !== 'Switch' ? Object.assign({
341
344
  rowIndex: rowIndex,
342
- id: rowValue.id,
345
+ id: rowValue[rowKey],
343
346
  value: rowValue === null || rowValue === void 0 ? void 0 : rowValue[data.name || ''],
344
347
  error: !!(rowError === null || rowError === void 0 ? void 0 : rowError[data.name || '']),
345
348
  helperText: rowError === null || rowError === void 0 ? void 0 : rowError[data.name || '']
346
349
  }, othersData) : Object.assign({
347
350
  rowIndex: rowIndex,
348
- id: rowValue.id,
351
+ id: rowValue[rowKey],
349
352
  checked: rowValue === null || rowValue === void 0 ? void 0 : rowValue[data.name || '']
350
353
  }, othersData);
351
354
  return jsxs("div", Object.assign({
@@ -926,11 +929,13 @@ var localeJson = {
926
929
  en: en
927
930
  };
928
931
 
929
- var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-dynamic-multi-box {\n width: 100%;\n}\n.paraui-v4-dynamic-multi-box svg {\n overflow: hidden;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content {\n width: 100%;\n position: relative;\n overflow-x: auto;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .title-config {\n width: 100%;\n display: flex;\n align-items: center;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .title-config .title-config-row {\n display: flex;\n flex: 1;\n align-items: center;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .title-config .title-config-row .title-config-row-item {\n display: flex;\n align-items: center;\n min-width: 180px;\n margin-right: 10px;\n flex-shrink: 0;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .title-config .title-config-row .row-form-switch {\n flex: 0;\n min-width: 80px;\n align-items: center;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 {\n width: 32px;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon-panel {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 32px;\n height: 32px;\n cursor: pointer;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon-panel .svg-box {\n height: 24px;\n width: 24px;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgb(247, 248, 250);\n border-radius: 2px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon-panel .svg-box svg {\n font-size: 20px;\n color: rgb(92, 101, 115);\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon-panel .svg-box svg:hover {\n color: rgb(87, 131, 235);\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 32px;\n height: 32px;\n cursor: pointer;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon svg {\n font-size: 20px;\n color: rgb(92, 101, 115);\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon:hover {\n background: rgb(247, 248, 250);\n border-radius: 4px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon:hover svg {\n color: rgb(87, 131, 235);\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .hidden-icon {\n display: none;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .center-line {\n width: 1px;\n height: 12px;\n background-color: rgb(212, 218, 227);\n margin: 0 3px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-80 {\n width: 72px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .content-row-form {\n width: 100%;\n display: flex;\n align-items: flex-start;\n min-height: 42px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .content-row-form .paraui-v4-select {\n overflow: hidden;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .content-row-form .form-item {\n display: flex;\n align-items: flex-start;\n min-width: 180px;\n margin-right: 10px;\n flex-shrink: 0;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .content-row-form .form-item-icon {\n margin-left: 10px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .content-row-form .row-form-switch {\n flex: 0;\n box-sizing: content-box;\n align-items: center;\n height: 32px;\n min-width: 80px;\n}\n.paraui-v4-dynamic-multi-box .add-button {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 32px;\n background: rgb(247, 248, 250);\n border: 1px dashed rgb(212, 218, 227);\n border-radius: 4px;\n}\n.paraui-v4-dynamic-multi-box .add-button .text {\n font-size: 14px;\n margin-left: 10px;\n}\n.paraui-v4-dynamic-multi-box .add-button.add-button-scroll {\n margin-top: 14px;\n}\n.paraui-v4-dynamic-multi-box .add-button.normal-button {\n cursor: pointer;\n}\n.paraui-v4-dynamic-multi-box .add-button.normal-button .text {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-dynamic-multi-box .add-button.normal-button:hover {\n background: rgb(240, 245, 255);\n border: 1px dashed rgb(87, 131, 235);\n}\n.paraui-v4-dynamic-multi-box .add-button.disabled-add {\n cursor: not-allowed;\n}\n.paraui-v4-dynamic-multi-box .add-button.disabled-add .text {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-dynamic-multi-box .add-button.disabled-add svg {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-dynamic-multi-box .paraui-v4-comboselect,\n.paraui-v4-dynamic-multi-box .paraui-v4-picker-wrapper {\n width: 100%;\n}\n.paraui-v4-dynamic-multi-box .multi-value-switch {\n width: 100%;\n display: flex;\n align-items: center;\n}\n.paraui-v4-dynamic-multi-box .multi-value-switch .switch-text {\n color: rgb(161, 168, 179);\n margin-right: 4px;\n overflow: hidden;\n}\n.paraui-v4-dynamic-multi-box .multi-value-switch .switch {\n flex: 1;\n}\n\n.paraui-v4-dynamic-multi-box-popover .filter-config {\n width: 140px;\n padding-top: 4px;\n}\n.paraui-v4-dynamic-multi-box-popover .filter-config .check-list .title {\n font-size: 12px;\n color: rgb(161, 168, 179);\n line-height: 30px;\n padding: 0 10px;\n}\n.paraui-v4-dynamic-multi-box-popover .filter-config .check-list .paraui-v4-checkbox-group {\n max-height: 320px;\n overflow-y: auto;\n}\n.paraui-v4-dynamic-multi-box-popover .filter-config .check-list .paraui-v4-checkbox-group.paraui-v4-checkbox-group-column .checkbox-group-content > span {\n padding: 0 10px;\n margin-bottom: 0;\n line-height: 30px;\n}\n.paraui-v4-dynamic-multi-box-popover .filter-config .restore-default {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 40px;\n color: rgb(46, 101, 230);\n cursor: pointer;\n border-top: 1px solid rgb(247, 248, 250);\n}\n.paraui-v4-dynamic-multi-box-popover .no-other-property {\n width: 200px;\n padding: 16px 0;\n text-align: center;\n font-size: 12px;\n color: rgb(161, 168, 179);\n}";
932
+ var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-dynamic-multi-box {\n width: 100%;\n}\n.paraui-v4-dynamic-multi-box svg {\n overflow: hidden;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content {\n width: 100%;\n position: relative;\n overflow-x: auto;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .title-config {\n width: 100%;\n display: flex;\n align-items: center;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .title-config .title-config-row {\n display: flex;\n flex: 1;\n align-items: center;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .title-config .title-config-row .title-config-row-item {\n display: flex;\n align-items: center;\n min-width: 180px;\n margin-right: 10px;\n flex-shrink: 0;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .title-config .title-config-row .row-form-switch {\n flex: 0;\n min-width: 80px;\n align-items: center;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 {\n width: 32px;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon-panel {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 32px;\n height: 32px;\n cursor: pointer;\n margin-right: 1px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon-panel .svg-box {\n height: 24px;\n width: 24px;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgb(247, 248, 250);\n border-radius: 2px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon-panel .svg-box svg {\n font-size: 20px;\n color: rgb(92, 101, 115);\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon-panel .svg-box svg:hover {\n color: rgb(87, 131, 235);\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 32px;\n height: 32px;\n cursor: pointer;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon svg {\n font-size: 20px;\n color: rgb(92, 101, 115);\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon:hover {\n background: rgb(247, 248, 250);\n border-radius: 4px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon:hover svg {\n color: rgb(87, 131, 235);\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .hidden-icon {\n display: none;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .center-line {\n width: 1px;\n height: 12px;\n background-color: rgb(212, 218, 227);\n margin: 0 3px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-80 {\n width: 72px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .content-row-form {\n width: 100%;\n display: flex;\n align-items: flex-start;\n min-height: 42px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .content-row-form .paraui-v4-select {\n overflow: hidden;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .content-row-form .form-item {\n display: flex;\n align-items: flex-start;\n min-width: 180px;\n margin-right: 10px;\n flex-shrink: 0;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .content-row-form .form-item-icon {\n margin-left: 10px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .content-row-form .row-form-switch {\n flex: 0;\n box-sizing: content-box;\n align-items: center;\n height: 32px;\n min-width: 80px;\n}\n.paraui-v4-dynamic-multi-box .add-button {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 32px;\n background: rgb(247, 248, 250);\n border: 1px dashed rgb(212, 218, 227);\n border-radius: 4px;\n}\n.paraui-v4-dynamic-multi-box .add-button .text {\n font-size: 14px;\n margin-left: 10px;\n}\n.paraui-v4-dynamic-multi-box .add-button.add-button-scroll {\n margin-top: 14px;\n}\n.paraui-v4-dynamic-multi-box .add-button.normal-button {\n cursor: pointer;\n}\n.paraui-v4-dynamic-multi-box .add-button.normal-button .text {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-dynamic-multi-box .add-button.normal-button:hover {\n background: rgb(240, 245, 255);\n border: 1px dashed rgb(87, 131, 235);\n}\n.paraui-v4-dynamic-multi-box .add-button.disabled-add {\n cursor: not-allowed;\n}\n.paraui-v4-dynamic-multi-box .add-button.disabled-add .text {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-dynamic-multi-box .add-button.disabled-add svg {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-dynamic-multi-box .paraui-v4-comboselect,\n.paraui-v4-dynamic-multi-box .paraui-v4-picker-wrapper {\n width: 100%;\n}\n.paraui-v4-dynamic-multi-box .multi-value-switch {\n width: 100%;\n display: flex;\n align-items: center;\n}\n.paraui-v4-dynamic-multi-box .multi-value-switch .switch-text {\n color: rgb(161, 168, 179);\n margin-right: 4px;\n overflow: hidden;\n}\n.paraui-v4-dynamic-multi-box .multi-value-switch .switch {\n flex: 1;\n}\n\n.paraui-v4-dynamic-multi-box-popover .filter-config {\n width: 140px;\n padding-top: 4px;\n}\n.paraui-v4-dynamic-multi-box-popover .filter-config .check-list .title {\n font-size: 12px;\n color: rgb(161, 168, 179);\n line-height: 30px;\n padding: 0 10px;\n}\n.paraui-v4-dynamic-multi-box-popover .filter-config .check-list .paraui-v4-checkbox-group {\n max-height: 320px;\n overflow-y: auto;\n}\n.paraui-v4-dynamic-multi-box-popover .filter-config .check-list .paraui-v4-checkbox-group.paraui-v4-checkbox-group-column .checkbox-group-content > span {\n padding: 0 10px;\n margin-bottom: 0;\n line-height: 30px;\n}\n.paraui-v4-dynamic-multi-box-popover .filter-config .restore-default {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 36px;\n color: rgb(46, 101, 230);\n cursor: pointer;\n border-top: 1px solid rgb(247, 248, 250);\n}\n.paraui-v4-dynamic-multi-box-popover .no-other-property {\n width: 200px;\n padding: 16px 0;\n text-align: center;\n font-size: 12px;\n color: rgb(161, 168, 179);\n}";
930
933
  styleInject(css_248z);
931
934
 
932
935
  var DynamicMultiBox = function DynamicMultiBox(props) {
933
- var valueList = props.valueList,
936
+ var _props$rowKey = props.rowKey,
937
+ rowKey = _props$rowKey === void 0 ? 'id' : _props$rowKey,
938
+ valueList = props.valueList,
934
939
  _props$config = props.config,
935
940
  config = _props$config === void 0 ? [] : _props$config,
936
941
  _props$errors = props.errors,
@@ -1140,8 +1145,8 @@ var DynamicMultiBox = function DynamicMultiBox(props) {
1140
1145
  });
1141
1146
  };
1142
1147
  var popoverHandClass = function popoverHandClass() {
1143
- var str = $prefixCls + '-dynamic-multi-box-popover';
1144
- if (popoverClassName) str += ' ' + popoverClassName;
1148
+ var str = "".concat($prefixCls, "-dynamic-multi-box-popover");
1149
+ if (popoverClassName) str += " ".concat(popoverClassName);
1145
1150
  return str;
1146
1151
  };
1147
1152
  /**
@@ -1161,20 +1166,21 @@ var DynamicMultiBox = function DynamicMultiBox(props) {
1161
1166
  required = item.required,
1162
1167
  className = item.className,
1163
1168
  inputType = item.inputType,
1164
- style = item.style;
1169
+ style = item.style,
1170
+ labelProps = item.labelProps;
1165
1171
  var str = 'title-config-row-item';
1166
1172
  if (inputType === 'Switch') str += ' row-form-switch';
1167
- if (className) str += ' ' + className;
1173
+ if (className) str += " ".concat(className);
1168
1174
  var styleCom = Object.assign({}, style);
1169
1175
  if (!(style === null || style === void 0 ? void 0 : style.width) && !(style === null || style === void 0 ? void 0 : style.flex)) styleCom.flex = 1;
1170
1176
  return jsx("div", Object.assign({
1171
1177
  className: str,
1172
1178
  style: styleCom
1173
1179
  }, {
1174
- children: jsx(Label, {
1180
+ children: jsx(Label, Object.assign({
1175
1181
  required: required,
1176
1182
  label: label
1177
- })
1183
+ }, labelProps))
1178
1184
  }), index);
1179
1185
  })
1180
1186
  })) : titleMode === 'single' ? jsx(Label, {
@@ -1206,7 +1212,7 @@ var DynamicMultiBox = function DynamicMultiBox(props) {
1206
1212
  }))]
1207
1213
  }))]
1208
1214
  }));
1209
- }, [titleMode, fixedConfig, selectedConfig, isSort, isFilter, checked, onCheckChange, onRestoreDefault]);
1215
+ }, [titleMode, fixedConfig, selectedConfig, isSort, isFilter, checked, onCheckChange, onRestoreDefault, rowKey]);
1210
1216
  /**
1211
1217
  * 判断是否全部隐藏删除
1212
1218
  * 默认全部隐藏
@@ -1218,7 +1224,7 @@ var DynamicMultiBox = function DynamicMultiBox(props) {
1218
1224
  return false;
1219
1225
  }
1220
1226
  for (var i = 0, l = valueList === null || valueList === void 0 ? void 0 : valueList.length; i < l; i++) {
1221
- var id = (_a = valueList[i]) === null || _a === void 0 ? void 0 : _a.id;
1227
+ var id = (_a = valueList[i]) === null || _a === void 0 ? void 0 : _a[rowKey];
1222
1228
  if (id && deleteDisable.indexOf(id) === -1) {
1223
1229
  bol = false;
1224
1230
  break;
@@ -1237,9 +1243,9 @@ var DynamicMultiBox = function DynamicMultiBox(props) {
1237
1243
  return jsx(Fragment, {
1238
1244
  children: valueList.map(function (item, rowIndex) {
1239
1245
  var _a;
1240
- var id = item.id;
1246
+ var id = item[rowKey];
1241
1247
  var rowError = (_a = errors === null || errors === void 0 ? void 0 : errors.filter(function (item) {
1242
- return item.id === id;
1248
+ return item[rowKey] === id;
1243
1249
  })) === null || _a === void 0 ? void 0 : _a[0];
1244
1250
  return jsxs("div", Object.assign({
1245
1251
  className: 'content-row-form'
@@ -1280,7 +1286,7 @@ var DynamicMultiBox = function DynamicMultiBox(props) {
1280
1286
  })
1281
1287
  });
1282
1288
  }
1283
- }, [valueList, isSort, isFilter, errors, fixedConfig, selectedConfig, keepLastItem, deleteRender]);
1289
+ }, [valueList, isSort, isFilter, errors, fixedConfig, selectedConfig, keepLastItem, deleteRender, rowKey]);
1284
1290
  /**
1285
1291
  * @desc 删除事件
1286
1292
  * */
@@ -1321,12 +1327,8 @@ var DynamicMultiBox = function DynamicMultiBox(props) {
1321
1327
  var id = UUID();
1322
1328
  // 取出已经筛选的配置数据
1323
1329
  var configArr = [].concat(_toConsumableArray(fixedConfig), _toConsumableArray(selectedConfig));
1324
- valueArr.push(Object.assign(Object.assign({}, getNewItem(configArr, 'value')), {
1325
- id: id
1326
- }));
1327
- errorArr.push(Object.assign(Object.assign({}, getNewItem(configArr, 'error')), {
1328
- id: id
1329
- }));
1330
+ valueArr.push(Object.assign(Object.assign({}, getNewItem(configArr, 'value')), _defineProperty({}, rowKey, id)));
1331
+ errorArr.push(Object.assign(Object.assign({}, getNewItem(configArr, 'error')), _defineProperty({}, rowKey, id)));
1330
1332
  onAdd && onAdd(valueArr, errorArr);
1331
1333
  };
1332
1334
  /**
@@ -1346,12 +1348,12 @@ var DynamicMultiBox = function DynamicMultiBox(props) {
1346
1348
  var onDragSort = function onDragSort(newValueList) {
1347
1349
  // 获取排序后 id映射下标集合
1348
1350
  var idMapIndex = newValueList.reduce(function (acc, cur, index) {
1349
- return Object.assign(Object.assign({}, acc), _defineProperty({}, cur.id, index));
1351
+ return Object.assign(Object.assign({}, acc), _defineProperty({}, cur[rowKey], index));
1350
1352
  }, {});
1351
1353
  // 需要交换的下标集合
1352
1354
  var swapIds = [];
1353
1355
  valueList.forEach(function (item, idx) {
1354
- if (idx !== idMapIndex[item.id]) swapIds.push(idx);
1356
+ if (idx !== idMapIndex[item[rowKey]]) swapIds.push(idx);
1355
1357
  });
1356
1358
  onSort && onSort(newValueList, swapIds);
1357
1359
  };
@@ -1369,8 +1371,8 @@ var DynamicMultiBox = function DynamicMultiBox(props) {
1369
1371
  * @desc 处理className
1370
1372
  * */
1371
1373
  var handClass = function handClass() {
1372
- var str = $prefixCls + '-dynamic-multi-box';
1373
- if (className) str += ' ' + className;
1374
+ var str = "".concat($prefixCls, "-dynamic-multi-box");
1375
+ if (className) str += " ".concat(className);
1374
1376
  return str;
1375
1377
  };
1376
1378
  return jsxs("div", Object.assign({
@@ -1380,14 +1382,15 @@ var DynamicMultiBox = function DynamicMultiBox(props) {
1380
1382
  children: [jsxs("div", Object.assign({
1381
1383
  className: "multi-value-content"
1382
1384
  }, {
1383
- children: [renderTitle, jsx(dist.exports.ReactSortable, Object.assign({
1385
+ children: [renderTitle, isSort ? jsx(dist.exports.ReactSortable, Object.assign({
1386
+ id: rowKey,
1384
1387
  list: valueList,
1385
1388
  handle: '.sort-handler',
1386
1389
  animation: 150,
1387
1390
  setList: onDragSort
1388
1391
  }, {
1389
1392
  children: renderContent
1390
- }))]
1393
+ })) : renderContent]
1391
1394
  })), jsxs("div", Object.assign({
1392
1395
  className: "add-button ".concat(disabledAdd ? 'disabled-add' : 'normal-button'),
1393
1396
  onClick: onAddEvent
@@ -3,8 +3,9 @@
3
3
  * @date 2022/11/7 10:32 AM
4
4
  * @description 多值框组件接口定义
5
5
  */
6
- import { ReactNode } from "react";
7
- import { TextFieldProps, SelectProps, SwitchProps, InputNumberProps, InputLangProps, ComboSelectProps, DatePickerProps } from "@para-ui/core";
6
+ import { ReactNode } from 'react';
7
+ import { TextFieldProps, SelectProps, SwitchProps, InputNumberProps, InputLangProps, ComboSelectProps, DatePickerProps } from '@para-ui/core';
8
+ import { LabelProps } from "../Label";
8
9
  /**组件类型:输入框,下拉框,开关,数字输入框,国际化输入框,日期框,时间选择框,组合选择器,自定义组件*/
9
10
  export type IInputType = 'TextField' | 'Select' | 'Switch' | 'InputNumber' | 'InputLang' | 'ComboSelect' | 'DatePicker' | 'custom';
10
11
  /** 配置项*/
@@ -27,31 +28,28 @@ export type IConfig = {
27
28
  list?: ((rowIndex: number, id: string, name: string, valueList: IValueList[]) => any[]) | any[];
28
29
  /** 样式 */
29
30
  style?: React.CSSProperties;
31
+ /** 标题样式 */
32
+ labelProps?: LabelProps;
30
33
  /** 其他*/
31
34
  [name: string]: any;
32
35
  } & (TextFieldProps | SelectProps | SwitchProps | InputNumberProps | InputLangProps | ComboSelectProps | DatePickerProps);
33
36
  /** value集合*/
34
37
  export interface IValueList {
35
- /** id*/
36
- id: string;
37
38
  /** 每行value值集合, name映射configItem中的name*/
38
39
  [name: string]: any;
39
40
  }
40
41
  export interface IErrors {
41
- /** id*/
42
- id: string;
43
42
  /** 每行错误集合,name映射configItem中的name*/
44
43
  [name: string]: any;
45
44
  }
46
45
  export interface ICurrentItem {
47
46
  /** 表单名*/
48
47
  name?: string;
49
- /** 表单所处行id*/
50
- id: string;
51
48
  /** 表单值*/
52
49
  value?: any;
53
50
  /** 表单所处下标*/
54
51
  rowIndex?: number;
52
+ [name: string]: any;
55
53
  }
56
54
  /** 过滤回调出参*/
57
55
  export interface IFilterParams {
@@ -66,6 +64,8 @@ export interface IFilterParams {
66
64
  }
67
65
  /** 主体接口定义*/
68
66
  export interface IMultiValueProps {
67
+ /** 指定每行key */
68
+ rowKey?: string;
69
69
  /**
70
70
  * 组件配置项
71
71
  */
@@ -1,6 +1,8 @@
1
- import { ReactNode } from "react";
1
+ import { ReactNode } from 'react';
2
2
  import { IConfig, IErrors, IValueList } from './interface';
3
3
  export interface IRowForm {
4
+ /** 指定每行key */
5
+ rowKey?: string;
4
6
  /** 行数据*/
5
7
  valueList?: IValueList[];
6
8
  /**行错误数据 */
package/Empty/index.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  * @date 2022/4/2 上午10:45
4
4
  * @description
5
5
  */
6
- import React, { FC } from "react";
6
+ import React, { FC } from 'react';
7
7
  import './index.scss';
8
8
  export interface EmptyProps {
9
9
  /** cls */
package/Empty/index.js CHANGED
@@ -570,8 +570,8 @@ var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2022/4/2 上
570
570
  styleInject(css_248z);
571
571
 
572
572
  var imageMap = {
573
- 'large': jsx(LargeNull, {}),
574
- 'small': jsx(SmallNull, {})
573
+ large: jsx(LargeNull, {}),
574
+ small: jsx(SmallNull, {})
575
575
  };
576
576
  //empty空状态
577
577
  var Empty = function Empty(props) {
package/Form/index.d.ts CHANGED
@@ -6,8 +6,7 @@ import { ItemTypeProps } from '../FormItem/itemType';
6
6
  /**
7
7
  * form 表单原始属性
8
8
  */
9
- interface FormHtmlProps extends FormHTMLAttributes<HTMLFormElement> {
10
- }
9
+ type FormHtmlProps = FormHTMLAttributes<HTMLFormElement>;
11
10
  /**
12
11
  * 配置项项类型
13
12
  */
@@ -53,17 +52,17 @@ export interface FormProps {
53
52
  */
54
53
  refData?: RefDataProps;
55
54
  /**
56
- * 获取生效项目的值对象,会过滤掉不显示或是不启用的项目的值,
57
- */
55
+ * 获取生效项目的值对象,会过滤掉不显示或是不启用的项目的值,
56
+ */
58
57
  getValidValues?: Function;
59
58
  /**
60
- * 重置表单
61
- */
59
+ * 重置表单
60
+ */
62
61
  reset?: Function;
63
62
  /**
64
- * 清空表单数据
65
- * 允许清空单个
66
- */
63
+ * 清空表单数据
64
+ * 允许清空单个
65
+ */
67
66
  clear?: (name?: string | string[]) => void;
68
67
  }>;
69
68
  /**
@@ -122,12 +121,12 @@ export interface FormProps {
122
121
  */
123
122
  className?: string;
124
123
  /**
125
- * 标题其他配置
126
- */
124
+ * 标题其他配置
125
+ */
127
126
  labelProps?: LabelProps;
128
127
  /**
129
- * 报错提示其他配置
130
- */
128
+ * 报错提示其他配置
129
+ */
131
130
  helperTextProps?: HelperTextProps;
132
131
  /**
133
132
  * 文字宽度, 只对 type === vertical,状态下生效