@para-ui/core 3.0.28 → 3.0.30

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 (140) hide show
  1. package/AutoBox/index.js +48 -88
  2. package/AutoTips/index.js +25 -32
  3. package/Breadcrumbs/index.js +43 -63
  4. package/Button/SplitButton.d.ts +1 -1
  5. package/Button/index.d.ts +1 -1
  6. package/Button/index.js +88 -118
  7. package/ButtonGroup/index.js +27 -36
  8. package/Carousel/index.d.ts +2 -2
  9. package/Carousel/index.js +27 -28
  10. package/Cascader/index.js +52 -64
  11. package/Checkbox/index.js +23 -39
  12. package/CheckboxGroup/index.js +31 -48
  13. package/Collapse/collapsePanel.d.ts +1 -1
  14. package/Collapse/index.d.ts +1 -1
  15. package/Collapse/index.js +9 -29
  16. package/Collapse/util.d.ts +2 -2
  17. package/CollapseBox/index.js +45 -56
  18. package/CollapseLayout/index.js +35 -54
  19. package/ComboSelect/index.js +222 -349
  20. package/ComboSelect/interface.d.ts +3 -3
  21. package/Container/index.js +17 -20
  22. package/DatePicker/generatePicker/index.d.ts +17 -17
  23. package/DatePicker/index.d.ts +4 -4
  24. package/DatePicker/index.js +111 -167
  25. package/Desktop/index.js +62 -173
  26. package/Drawer/index.js +65 -58
  27. package/Drawer/interface.d.ts +7 -3
  28. package/Dropdown/index.d.ts +1 -1
  29. package/Dropdown/index.js +3 -3
  30. package/Empty/index.js +17 -22
  31. package/Form/index.d.ts +1 -1
  32. package/Form/index.js +38 -80
  33. package/FormItem/index.d.ts +1 -1
  34. package/FormItem/index.js +11 -11
  35. package/FormItem/validateFunction.d.ts +1 -1
  36. package/FunctionModal/index.js +11 -11
  37. package/GlobalContext/index.js +3 -3
  38. package/GlobalContext/usePopupContainer.d.ts +1 -1
  39. package/Help/index.js +11 -11
  40. package/HelperText/index.js +11 -12
  41. package/InputLang/index.js +47 -80
  42. package/InputNumber/index.js +65 -100
  43. package/Label/index.js +15 -16
  44. package/Loading/index.js +6 -7
  45. package/Menu/index.js +148 -328
  46. package/Menu/interface.d.ts +2 -2
  47. package/Menu/verticalMenuList.d.ts +1 -1
  48. package/Message/index.d.ts +1 -1
  49. package/Message/index.js +45 -64
  50. package/Modal/Confirm/index.d.ts +2 -2
  51. package/Modal/index.d.ts +1 -1
  52. package/Modal/index.js +119 -152
  53. package/MultiBox/index.js +44 -76
  54. package/Notification/index.d.ts +2 -2
  55. package/Notification/index.js +51 -72
  56. package/OperateBtn/index.js +42 -70
  57. package/PageHeader/index.js +120 -286
  58. package/PageHeader/interface.d.ts +1 -1
  59. package/Pagination/index.d.ts +2 -2
  60. package/Pagination/index.js +79 -131
  61. package/ParauiProvider/index.js +2 -3
  62. package/PasswordRules/index.js +12 -30
  63. package/PopConfirm/index.d.ts +1 -1
  64. package/PopConfirm/index.js +52 -59
  65. package/Popover/index.js +8 -9
  66. package/Progress/index.d.ts +6 -6
  67. package/Progress/index.js +50 -89
  68. package/Querying/index.js +14 -17
  69. package/README.md +813 -800
  70. package/Radio/index.js +21 -33
  71. package/RadioGroup/index.js +32 -47
  72. package/Search/index.js +44 -66
  73. package/Select/index.js +176 -343
  74. package/SelectInput/index.js +8 -9
  75. package/Selector/index.js +285 -681
  76. package/SelectorPicker/index.js +62 -97
  77. package/SingleBox/index.js +30 -55
  78. package/Slider/index.d.ts +1 -1
  79. package/Slider/index.js +29 -41
  80. package/Slider/interface.d.ts +2 -2
  81. package/Split/index.js +10 -23
  82. package/Status/index.js +8 -7
  83. package/Stepper/index.d.ts +1 -1
  84. package/Stepper/index.js +20 -25
  85. package/Styles/form.scss +5 -5
  86. package/Styles/index.scss +37 -37
  87. package/Styles/normalize.scss +348 -348
  88. package/Styles/scrollbar.scss +223 -223
  89. package/Styles/theme.scss +74 -74
  90. package/Switch/index.d.ts +2 -2
  91. package/Switch/index.js +19 -20
  92. package/Table/index.js +568 -1019
  93. package/Table/interface.d.ts +5 -5
  94. package/Tabs/index.d.ts +3 -3
  95. package/Tabs/index.js +47 -65
  96. package/Tag/TagGroup.d.ts +1 -1
  97. package/Tag/index.d.ts +2 -2
  98. package/Tag/index.js +72 -107
  99. package/TextEditor/index.d.ts +2 -2
  100. package/TextEditor/index.js +81 -105
  101. package/TextField/index.js +141 -220
  102. package/TimePicker/index.d.ts +1 -1
  103. package/TimePicker/index.js +12 -15
  104. package/Timeline/index.js +42 -52
  105. package/Title/index.js +10 -9
  106. package/ToggleButton/ToggleButtonGroup.d.ts +1 -1
  107. package/ToggleButton/index.js +50 -70
  108. package/Tooltip/index.js +64 -98
  109. package/Tooltip/interface.d.ts +1 -1
  110. package/Transfer/index.d.ts +1 -1
  111. package/Transfer/index.js +114 -137
  112. package/Transfer/useClick.d.ts +1 -1
  113. package/Tree/index.js +10 -10
  114. package/Tree/interface.d.ts +6 -6
  115. package/Upload/Dragger/index.d.ts +1 -1
  116. package/Upload/ImageUpload/index.d.ts +1 -1
  117. package/Upload/ImgCrop/EasyCrop.d.ts +1 -1
  118. package/Upload/index.d.ts +1 -1
  119. package/Upload/index.js +283 -475
  120. package/Upload/interface.d.ts +2 -2
  121. package/_verture/{constant-bf34e6fa.js → constant-66aa48a1.js} +0 -1
  122. package/_verture/defineProperty-62acccfc.js +34 -0
  123. package/_verture/{index-342379c6.js → index-06fea29b.js} +79 -124
  124. package/_verture/{index-48875ffd.js → index-131f8fe5.js} +80 -181
  125. package/_verture/{index-31ce5a11.js → index-92144ad3.js} +238 -445
  126. package/_verture/{index-bbed73a3.js → index-be4faaee.js} +19 -61
  127. package/_verture/{intl-336570e4.js → intl-5cbb940c.js} +4 -12
  128. package/_verture/{modalContext-d646d9db.js → modalContext-c749e1c6.js} +18 -43
  129. package/_verture/{slicedToArray-d7722f4b.js → slicedToArray-77980792.js} +23 -25
  130. package/_verture/{toConsumableArray-f8047a75.js → toConsumableArray-87c7d895.js} +1 -1
  131. package/_verture/{useFormatMessage-f4452258.js → useFormatMessage-703f8b20.js} +1 -3
  132. package/_verture/{useGlobalProps-af9a2af6.js → useGlobalProps-1b846a65.js} +1 -2
  133. package/_verture/{usePopupContainer-b8ab7cab.js → usePopupContainer-87febeb9.js} +10 -25
  134. package/_verture/{util-a77b261e.js → util-7e1fb1e2.js} +2 -3
  135. package/index.d.ts +2 -4
  136. package/index.js +15 -16
  137. package/package.json +167 -168
  138. package/Test/index.d.ts +0 -3
  139. package/Test/index.js +0 -9
  140. package/_verture/defineProperty-0590dc61.js +0 -16
@@ -1,13 +1,13 @@
1
1
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
2
2
  import { useState, useEffect, useMemo, useCallback, useRef } from 'react';
3
- import { _ as _toConsumableArray } from '../_verture/toConsumableArray-f8047a75.js';
4
- import { _ as _slicedToArray } from '../_verture/slicedToArray-d7722f4b.js';
3
+ import { _ as _toConsumableArray } from '../_verture/toConsumableArray-87c7d895.js';
4
+ import { _ as _slicedToArray } from '../_verture/slicedToArray-77980792.js';
5
5
  import { Popover } from '../Popover/index.js';
6
6
  import Down from '@para-ui/icons/Down';
7
7
  import * as iconList from '@para-ui/icons';
8
8
  import More from '@para-ui/icons/More';
9
9
  import { UUID, DeepClone } from '@paraview/lib';
10
- import { $ as $prefixCls } from '../_verture/constant-bf34e6fa.js';
10
+ import { $ as $prefixCls } from '../_verture/constant-66aa48a1.js';
11
11
  import { Button } from '../Button/index.js';
12
12
  import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
13
13
  import '../_verture/tslib.es6-55ed4bd2.js';
@@ -15,84 +15,71 @@ import '../Tooltip/index.js';
15
15
  import 'rc-tooltip';
16
16
  import 'rc-tooltip/lib/placements';
17
17
  import 'clsx';
18
- import '../_verture/usePopupContainer-b8ab7cab.js';
18
+ import '../_verture/usePopupContainer-87febeb9.js';
19
19
  import '../_verture/typeof-498dd2b1.js';
20
20
  import '@para-ui/icons/LoadingF';
21
21
  import '@para-ui/icons/Forbid';
22
- import '../_verture/index-bbed73a3.js';
22
+ import '../_verture/index-be4faaee.js';
23
23
  import 'rc-dropdown';
24
24
  import 'dayjs';
25
- import '../_verture/useFormatMessage-f4452258.js';
25
+ import '../_verture/useFormatMessage-703f8b20.js';
26
26
  import '@para-ui/core/GlobalContext';
27
27
 
28
28
  /**
29
29
  * @description 处理菜单标签
30
30
  * 默认div,最后一级为a标签
31
31
  * */
32
-
33
32
  var handMenuEle = function handMenuEle(children) {
34
33
  var Ele = 'div';
35
34
  var lastOne = !children || children.length === 0;
36
-
37
35
  if (lastOne) {
38
36
  Ele = 'a';
39
37
  }
40
-
41
38
  return Ele;
42
39
  };
43
40
  /**
44
41
  * 处理菜单href地址
45
42
  * */
46
-
47
-
48
43
  var handHref = function handHref() {
49
44
  var children = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
50
45
  var path = arguments.length > 1 ? arguments[1] : undefined;
51
46
  var href = arguments.length > 2 ? arguments[2] : undefined;
52
47
  var lastOne = !children || children.length === 0;
53
-
54
48
  if (lastOne) {
55
49
  return {
56
50
  href: href ? href : '#' + path
57
51
  };
58
52
  }
59
-
60
53
  return {};
61
- }; // 弹出菜单
62
-
63
-
54
+ };
55
+ // 弹出菜单
64
56
  var MenuItemPopper = function MenuItemPopper(props) {
65
57
  var idMenuLast = props.idMenuLast,
66
- _props$selectMenu = props.selectMenu,
67
- selectMenu = _props$selectMenu === void 0 ? '' : _props$selectMenu,
68
- onClickMenu = props.onClickMenu,
69
- _props$list = props.list,
70
- list = _props$list === void 0 ? [] : _props$list,
71
- onMouseEnter = props.onMouseEnter,
72
- onMouseLeave = props.onMouseLeave,
73
- _props$level = props.level,
74
- level = _props$level === void 0 ? 1 : _props$level,
75
- className = props.className;
76
-
58
+ _props$selectMenu = props.selectMenu,
59
+ selectMenu = _props$selectMenu === void 0 ? '' : _props$selectMenu,
60
+ onClickMenu = props.onClickMenu,
61
+ _props$list = props.list,
62
+ list = _props$list === void 0 ? [] : _props$list,
63
+ onMouseEnter = props.onMouseEnter,
64
+ onMouseLeave = props.onMouseLeave,
65
+ _props$level = props.level,
66
+ level = _props$level === void 0 ? 1 : _props$level,
67
+ className = props.className;
77
68
  var _useState = useState(null),
78
- _useState2 = _slicedToArray(_useState, 2),
79
- openChild = _useState2[0],
80
- setOpenChild = _useState2[1];
81
-
69
+ _useState2 = _slicedToArray(_useState, 2),
70
+ openChild = _useState2[0],
71
+ setOpenChild = _useState2[1];
82
72
  var _useState3 = useState(null),
83
- _useState4 = _slicedToArray(_useState3, 2),
84
- childPos = _useState4[0],
85
- setChildPos = _useState4[1];
86
-
73
+ _useState4 = _slicedToArray(_useState3, 2),
74
+ childPos = _useState4[0],
75
+ setChildPos = _useState4[1];
87
76
  var _useState5 = useState([]),
88
- _useState6 = _slicedToArray(_useState5, 2),
89
- childList = _useState6[0],
90
- setChildList = _useState6[1];
91
-
77
+ _useState6 = _slicedToArray(_useState5, 2),
78
+ childList = _useState6[0],
79
+ setChildList = _useState6[1];
92
80
  var _useState7 = useState({}),
93
- _useState8 = _slicedToArray(_useState7, 1),
94
- timerJson = _useState8[0];
95
-
81
+ _useState8 = _slicedToArray(_useState7, 1),
82
+ timerJson = _useState8[0];
96
83
  useEffect(function () {
97
84
  return function () {
98
85
  clearTimeout(timerJson.leaveTimer);
@@ -104,11 +91,9 @@ var MenuItemPopper = function MenuItemPopper(props) {
104
91
  * @param index {number} 移入当前项下标
105
92
  * @param e 当前元素
106
93
  */
107
-
108
94
  var mouseEnterItem = function mouseEnterItem(item, index) {
109
95
  return function (e) {
110
96
  // 防止火狐浏览器一直重绘,死循环,不触发点击事件了
111
-
112
97
  /*if (timerJson.lastItem && timerJson.lastItem.path === item.path) {
113
98
  return;
114
99
  }
@@ -117,11 +102,9 @@ var MenuItemPopper = function MenuItemPopper(props) {
117
102
  clearTimeout(timerJson.leaveTimer);
118
103
  timerJson.leaveTimer = setTimeout(function () {
119
104
  var childListHand = [item];
120
-
121
105
  if (item.children && item.children.length > 0) {
122
106
  childListHand = item.children;
123
107
  }
124
-
125
108
  var target = event.target;
126
109
  setChildPos(target);
127
110
  setChildList(childListHand);
@@ -136,8 +119,6 @@ var MenuItemPopper = function MenuItemPopper(props) {
136
119
  * @param index {number} 移入当前项下标
137
120
  * @param e 当前元素
138
121
  */
139
-
140
-
141
122
  var MouseLeaveItem = function MouseLeaveItem(item, index) {
142
123
  return function (e) {
143
124
  clearTimeout(timerJson.leaveTimer);
@@ -153,8 +134,6 @@ var MenuItemPopper = function MenuItemPopper(props) {
153
134
  * @param item {MenuChildrenProps} 当前项参数
154
135
  * @param e 当前元素
155
136
  */
156
-
157
-
158
137
  var clickMenu = function clickMenu(item) {
159
138
  return function (e) {
160
139
  e.preventDefault();
@@ -168,11 +147,8 @@ var MenuItemPopper = function MenuItemPopper(props) {
168
147
  * @param item {MenuChildrenProps} 当前项参数
169
148
  * @return {ReactNode} 返回图标元素
170
149
  */
171
-
172
-
173
150
  var handIcon = function handIcon(item) {
174
151
  var icon = item.icon;
175
-
176
152
  if (icon) {
177
153
  var iconCom = iconList[icon];
178
154
  if (iconCom) return iconCom();
@@ -184,8 +160,6 @@ var MenuItemPopper = function MenuItemPopper(props) {
184
160
  * @param item {MenuChildrenProps} 当前项参数
185
161
  * @return {ReactNode} 返回图标元素
186
162
  */
187
-
188
-
189
163
  var handArrow = function handArrow(item) {
190
164
  var children = item.children;
191
165
  if (children && children.length > 0) return jsx(Down, {});
@@ -195,24 +169,18 @@ var MenuItemPopper = function MenuItemPopper(props) {
195
169
  * @param item {MenuChildrenProps} 当前项参数
196
170
  * @return {string} 返回图标元素
197
171
  */
198
-
199
-
200
172
  var handItemClass = function handItemClass(item) {
201
173
  var str = 'menu-item-popper-content-item';
202
174
  var selectMenuLast = idMenuLast && idMenuLast[selectMenu]; // 当前选中菜单的 所有上下级 一条线
203
-
204
175
  if (selectMenuLast && selectMenuLast.indexOf(item.path) !== -1) {
205
176
  str += ' menu-item-popper-content-item-select';
206
177
  }
207
-
208
178
  return str;
209
179
  };
210
180
  /**
211
181
  * 处理MenuPopover样式类名
212
182
  * @return {string} class名
213
183
  */
214
-
215
-
216
184
  var handPopoverClass = function handPopoverClass() {
217
185
  var str = 'menu-item-popper';
218
186
  if (level !== 1) str += ' menu-item-popper-child';
@@ -225,8 +193,6 @@ var MenuItemPopper = function MenuItemPopper(props) {
225
193
  * @param index {number} 下标
226
194
  * @return {ReactNode} 节点内容
227
195
  */
228
-
229
-
230
196
  var ChildMenu = useCallback(function (item, index) {
231
197
  return jsx(Fragment, {
232
198
  children: item.children && item.children.length > 0 && openChild === index && jsx(MenuItemPopper, {
@@ -243,7 +209,6 @@ var MenuItemPopper = function MenuItemPopper(props) {
243
209
  });
244
210
  }, [openChild, childPos, childList, idMenuLast, selectMenu, onClickMenu, onMouseEnter, onMouseLeave, level]);
245
211
  /** 内容 */
246
-
247
212
  var ContentMemo = useMemo(function () {
248
213
  return jsx("div", Object.assign({
249
214
  className: "menu-item-popper-content"
@@ -285,72 +250,51 @@ var MenuItemPopper = function MenuItemPopper(props) {
285
250
  children: ContentMemo
286
251
  }));
287
252
  };
288
-
289
253
  var HorizontalMenu = function HorizontalMenu(props) {
290
254
  var list = props.list,
291
- _props$selectMenu2 = props.selectMenu,
292
- selectMenu = _props$selectMenu2 === void 0 ? '' : _props$selectMenu2,
293
- onClickMenu = props.onClickMenu,
294
- className = props.className,
295
- moreCustomize = props.moreCustomize;
296
-
255
+ _props$selectMenu2 = props.selectMenu,
256
+ selectMenu = _props$selectMenu2 === void 0 ? '' : _props$selectMenu2,
257
+ onClickMenu = props.onClickMenu,
258
+ className = props.className,
259
+ moreCustomize = props.moreCustomize;
297
260
  var _useState9 = useState(false),
298
- _useState10 = _slicedToArray(_useState9, 2),
299
- openChild = _useState10[0],
300
- setOpenChild = _useState10[1]; // 侧边展开子菜单
301
-
302
-
261
+ _useState10 = _slicedToArray(_useState9, 2),
262
+ openChild = _useState10[0],
263
+ setOpenChild = _useState10[1]; // 侧边展开子菜单
303
264
  var _useState11 = useState(null),
304
- _useState12 = _slicedToArray(_useState11, 2),
305
- openChildIndex = _useState12[0],
306
- setOpenChildIndex = _useState12[1]; // 侧边菜单第几项
307
-
308
-
265
+ _useState12 = _slicedToArray(_useState11, 2),
266
+ openChildIndex = _useState12[0],
267
+ setOpenChildIndex = _useState12[1]; // 侧边菜单第几项
309
268
  var _useState13 = useState(null),
310
- _useState14 = _slicedToArray(_useState13, 2),
311
- childPos = _useState14[0],
312
- setChildPos = _useState14[1]; // 侧边子菜单定位
313
-
314
-
269
+ _useState14 = _slicedToArray(_useState13, 2),
270
+ childPos = _useState14[0],
271
+ setChildPos = _useState14[1]; // 侧边子菜单定位
315
272
  var _useState15 = useState([]),
316
- _useState16 = _slicedToArray(_useState15, 2),
317
- childList = _useState16[0],
318
- setChildList = _useState16[1]; // 侧边子菜单数据
319
-
320
-
273
+ _useState16 = _slicedToArray(_useState15, 2),
274
+ childList = _useState16[0],
275
+ setChildList = _useState16[1]; // 侧边子菜单数据
321
276
  var _useState17 = useState(""),
322
- _useState18 = _slicedToArray(_useState17, 2),
323
- selectMenuCom = _useState18[0],
324
- setSelectMenuCom = _useState18[1]; // 当前选中菜单id
325
-
326
-
277
+ _useState18 = _slicedToArray(_useState17, 2),
278
+ selectMenuCom = _useState18[0],
279
+ setSelectMenuCom = _useState18[1]; // 当前选中菜单id
327
280
  var _useState19 = useState({}),
328
- _useState20 = _slicedToArray(_useState19, 2),
329
- idMenuLast = _useState20[0],
330
- setIdMenuLast = _useState20[1]; // 最后一级菜单所有层级id
331
-
332
-
281
+ _useState20 = _slicedToArray(_useState19, 2),
282
+ idMenuLast = _useState20[0],
283
+ setIdMenuLast = _useState20[1]; // 最后一级菜单所有层级id
333
284
  var _useState21 = useState({}),
334
- _useState22 = _slicedToArray(_useState21, 2),
335
- menuLevelMapping = _useState22[0],
336
- setMenuLevelMapping = _useState22[1]; // 菜单层级mapping
337
-
338
-
285
+ _useState22 = _slicedToArray(_useState21, 2),
286
+ menuLevelMapping = _useState22[0],
287
+ setMenuLevelMapping = _useState22[1]; // 菜单层级mapping
339
288
  var _useState23 = useState('horizontal-menu-list-' + UUID()),
340
- _useState24 = _slicedToArray(_useState23, 1),
341
- classOne = _useState24[0]; // 唯一class
342
-
343
-
289
+ _useState24 = _slicedToArray(_useState23, 1),
290
+ classOne = _useState24[0]; // 唯一class
344
291
  var _useState25 = useState(null),
345
- _useState26 = _slicedToArray(_useState25, 2),
346
- morePos = _useState26[0],
347
- setMorePos = _useState26[1]; // 超出在原始位置
348
-
349
-
292
+ _useState26 = _slicedToArray(_useState25, 2),
293
+ morePos = _useState26[0],
294
+ setMorePos = _useState26[1]; // 超出在原始位置
350
295
  var _useState27 = useState({}),
351
- _useState28 = _slicedToArray(_useState27, 1),
352
- timerJson = _useState28[0];
353
-
296
+ _useState28 = _slicedToArray(_useState27, 1),
297
+ timerJson = _useState28[0];
354
298
  useEffect(function () {
355
299
  if (selectMenu !== selectMenuCom) setSelectMenuCom(selectMenu);
356
300
  }, [selectMenu]);
@@ -364,7 +308,6 @@ var HorizontalMenu = function HorizontalMenu(props) {
364
308
  };
365
309
  }, [list]);
366
310
  /** 改变屏幕大小 */
367
-
368
311
  var changeSize = function changeSize() {
369
312
  clearTimeout(timerJson.timerResize);
370
313
  handleCloseMore();
@@ -377,47 +320,38 @@ var HorizontalMenu = function HorizontalMenu(props) {
377
320
  * 不换行 计算
378
321
  * @param index 下标
379
322
  */
380
-
381
-
382
323
  var handMultiline = function handMultiline(index) {
383
324
  if (index === null || index === 0) return;
384
325
  if (index === undefined) index = (list || []).length;
385
326
  var boxDom = document.querySelector('.' + classOne);
386
327
  if (!boxDom) return;
387
-
388
328
  if (boxDom.scrollHeight > boxDom.clientHeight) {
389
- var num = Number(index) - 1; // 超出
390
-
329
+ var num = Number(index) - 1;
330
+ // 超出
391
331
  setMorePos(num);
392
332
  handMultiline(num);
393
333
  } else {
394
334
  // 一行
395
335
  if ((list || []).length <= index) handleCloseMore();
396
336
  }
397
- }; // 关闭显示更多
398
-
399
-
400
- var handleCloseMore = function handleCloseMore() {//setOpenMoreCom(false);
337
+ };
338
+ // 关闭显示更多
339
+ var handleCloseMore = function handleCloseMore() {
340
+ //setOpenMoreCom(false);
401
341
  };
402
342
  /**
403
343
  * 处理菜单数据
404
344
  * @param dataArr {MenuChildrenProps} 当前菜单数据
405
345
  */
406
-
407
-
408
346
  var handList = function handList(dataArr) {
409
347
  var idMap = {}; // 所有id,层级map
410
-
411
348
  var idMapLast = {}; // 最后一层菜单,层级map
412
-
413
349
  var selectMenuLevelMapping = {}; // 菜单层级mapping
414
-
415
350
  var recurrenceFunc = function recurrenceFunc(daraChildArr, parent, level) {
416
351
  for (var i = 0, l = daraChildArr.length; i < l; i++) {
417
352
  var item = daraChildArr[i];
418
353
  var path = item.path;
419
354
  var levelCom = level === undefined ? i : level;
420
-
421
355
  if (parent) {
422
356
  var idList = DeepClone(idMap[parent.path] || []);
423
357
  idList.push(path);
@@ -426,7 +360,6 @@ var HorizontalMenu = function HorizontalMenu(props) {
426
360
  // 不存在parent,第一级
427
361
  idMap[path] = [path];
428
362
  }
429
-
430
363
  if (item.children && item.children.length > 0) {
431
364
  recurrenceFunc(item.children, item, levelCom);
432
365
  } else {
@@ -436,11 +369,11 @@ var HorizontalMenu = function HorizontalMenu(props) {
436
369
  }
437
370
  }
438
371
  };
439
-
440
- recurrenceFunc(dataArr); //setJsonMenu(json);
441
-
372
+ recurrenceFunc(dataArr);
373
+ //setJsonMenu(json);
442
374
  setMenuLevelMapping(selectMenuLevelMapping);
443
- setIdMenuLast(idMapLast); //console.log(idMapLast, selectMenuLevelMapping)
375
+ setIdMenuLast(idMapLast);
376
+ //console.log(idMapLast, selectMenuLevelMapping)
444
377
  };
445
378
  /**
446
379
  * 鼠标移入
@@ -448,16 +381,12 @@ var HorizontalMenu = function HorizontalMenu(props) {
448
381
  * @param index {number} 移入当前项下标
449
382
  * @param e 当前元素
450
383
  */
451
-
452
-
453
384
  var mouseOverFunc = function mouseOverFunc(item, index) {
454
385
  return function (e) {
455
386
  var childListHand = [];
456
-
457
387
  if (item.children && item.children.length > 0) {
458
388
  childListHand = item.children;
459
389
  }
460
-
461
390
  if (childListHand.length === 0) return leaveFunc();
462
391
  setOpenChildIndex(index);
463
392
  setChildPos(e.target);
@@ -466,8 +395,6 @@ var HorizontalMenu = function HorizontalMenu(props) {
466
395
  };
467
396
  };
468
397
  /** 移出事件 */
469
-
470
-
471
398
  var leaveFunc = function leaveFunc() {
472
399
  setOpenChild(false);
473
400
  setChildPos(null);
@@ -475,8 +402,6 @@ var HorizontalMenu = function HorizontalMenu(props) {
475
402
  setOpenChildIndex(null);
476
403
  };
477
404
  /** 移出子菜单 */
478
-
479
-
480
405
  var onMouseLeaveChild = function onMouseLeaveChild() {
481
406
  leaveFunc();
482
407
  };
@@ -484,8 +409,6 @@ var HorizontalMenu = function HorizontalMenu(props) {
484
409
  * 点击菜单
485
410
  * @param item {MenuChildrenProps | false} 当前项参数
486
411
  */
487
-
488
-
489
412
  var clickMenu = function clickMenu(item) {
490
413
  onClickMenu && onClickMenu(item);
491
414
  };
@@ -494,12 +417,9 @@ var HorizontalMenu = function HorizontalMenu(props) {
494
417
  * @param item {MenuChildrenProps} 当前项参数
495
418
  * @param index {number} 下标
496
419
  */
497
-
498
-
499
420
  var handClassItem = function handClassItem(item, index) {
500
421
  var str = 'horizontal-menu-list-item';
501
422
  var selectMenuLast = idMenuLast[selectMenuCom]; // 当前选中菜单的 所有上下级 一条线
502
-
503
423
  if (selectMenuLast && selectMenuLast.indexOf(item.path) !== -1) str += ' horizontal-menu-list-item-select';
504
424
  if (openChildIndex === index) str += ' horizontal-menu-list-item-hover';
505
425
  return str;
@@ -508,11 +428,8 @@ var HorizontalMenu = function HorizontalMenu(props) {
508
428
  * 处理icon
509
429
  * @param item {MenuChildrenProps} 当前项参数
510
430
  */
511
-
512
-
513
431
  var handIcon = function handIcon(item) {
514
432
  var icon = item.icon;
515
-
516
433
  if (icon) {
517
434
  var iconCom = iconList[icon];
518
435
  if (iconCom) return iconCom();
@@ -523,15 +440,11 @@ var HorizontalMenu = function HorizontalMenu(props) {
523
440
  * 处理箭头
524
441
  * @param item {MenuChildrenProps} 当前项参数
525
442
  */
526
-
527
-
528
443
  var handArrow = function handArrow(item) {
529
444
  var children = item.children;
530
445
  if (children && children.length > 0) return jsx(Down, {});
531
446
  };
532
447
  /** 收缩弹出框菜单 */
533
-
534
-
535
448
  var MenuItemPopperMemo = useMemo(function () {
536
449
  return jsx(Fragment, {
537
450
  children: openChild && jsx(MenuItemPopper, {
@@ -550,7 +463,6 @@ var HorizontalMenu = function HorizontalMenu(props) {
550
463
  * 处理class
551
464
  * @return class名
552
465
  */
553
-
554
466
  var handClass = function handClass() {
555
467
  var str = 'horizontal-menu-list';
556
468
  if (className) str += ' ' + className;
@@ -561,16 +473,12 @@ var HorizontalMenu = function HorizontalMenu(props) {
561
473
  * 移入更多
562
474
  * @param e 元素
563
475
  */
564
-
565
-
566
476
  var mouseOverFuncMore = function mouseOverFuncMore(e) {
567
477
  clearTimeout(timerJson.leaveTimer);
568
478
  var childListHand = [];
569
-
570
479
  for (var i = Number(morePos), l = (list || []).length; i < l; i++) {
571
480
  childListHand.push((list || [])[i]);
572
481
  }
573
-
574
482
  setOpenChildIndex(morePos);
575
483
  setChildPos(e.target);
576
484
  setChildList(childListHand);
@@ -580,8 +488,6 @@ var HorizontalMenu = function HorizontalMenu(props) {
580
488
  * 处理class
581
489
  * @return class名
582
490
  */
583
-
584
-
585
491
  var handClassItemMore = function handClassItemMore() {
586
492
  var str = ' horizontal-menu-list-item';
587
493
  var selectMenuLevel = menuLevelMapping[selectMenuCom];
@@ -589,12 +495,10 @@ var HorizontalMenu = function HorizontalMenu(props) {
589
495
  if (openChildIndex === morePos) str += ' horizontal-menu-list-item-hover';
590
496
  return str;
591
497
  };
592
-
593
498
  var onVisibleChange = function onVisibleChange(bol) {
594
499
  if (bol) return;
595
500
  leaveFunc();
596
501
  };
597
-
598
502
  return jsxs("div", Object.assign({
599
503
  className: handClass()
600
504
  }, {
@@ -614,7 +518,6 @@ var HorizontalMenu = function HorizontalMenu(props) {
614
518
  children: jsxs(Ele, Object.assign({
615
519
  onClick: function onClick(e) {
616
520
  e.preventDefault();
617
-
618
521
  if (!item.children || item.children.length === 0) {
619
522
  clickMenu(item);
620
523
  }
@@ -664,18 +567,16 @@ var HorizontalMenu = function HorizontalMenu(props) {
664
567
  };
665
568
 
666
569
  /* 返回自助服务 */
667
-
668
570
  var BackSelfcare = function BackSelfcare(props) {
669
571
  var icon = props.icon,
670
- label = props.label,
671
- render = props.render,
672
- onClick = props.onClick,
673
- className = props.className;
572
+ label = props.label,
573
+ render = props.render,
574
+ onClick = props.onClick,
575
+ className = props.className;
674
576
  /**
675
577
  * 点击按钮
676
578
  * @param e 元素
677
579
  */
678
-
679
580
  var onClickCom = function onClickCom(e) {
680
581
  onClick && onClick(e);
681
582
  };
@@ -683,8 +584,6 @@ var BackSelfcare = function BackSelfcare(props) {
683
584
  * 处理内容
684
585
  * @return {ReactNode}
685
586
  */
686
-
687
-
688
587
  var handContent = function handContent() {
689
588
  return jsx(Button, Object.assign({
690
589
  startIcon: icon,
@@ -698,14 +597,11 @@ var BackSelfcare = function BackSelfcare(props) {
698
597
  * 处理class
699
598
  * @return {string} class名
700
599
  */
701
-
702
-
703
600
  var handClass = function handClass() {
704
601
  var str = 'back-btn';
705
602
  if (className) str += ' ' + className;
706
603
  return str;
707
604
  };
708
-
709
605
  return jsx(Fragment, {
710
606
  children: render ? render : jsx("div", Object.assign({
711
607
  className: handClass()
@@ -715,54 +611,42 @@ var BackSelfcare = function BackSelfcare(props) {
715
611
  });
716
612
  };
717
613
  /* 国际化 */
718
-
719
-
720
614
  var Language = function Language(props) {
721
615
  var _props$language = props.language,
722
- language = _props$language === void 0 ? [] : _props$language,
723
- _props$selectLang = props.selectLang,
724
- selectLang = _props$selectLang === void 0 ? '' : _props$selectLang,
725
- onClick = props.onClick,
726
- className = props.className,
727
- render = props.render;
728
-
616
+ language = _props$language === void 0 ? [] : _props$language,
617
+ _props$selectLang = props.selectLang,
618
+ selectLang = _props$selectLang === void 0 ? '' : _props$selectLang,
619
+ onClick = props.onClick,
620
+ className = props.className,
621
+ render = props.render;
729
622
  var _useState = useState({}),
730
- _useState2 = _slicedToArray(_useState, 2),
731
- langJson = _useState2[0],
732
- setLangJson = _useState2[1]; // 国际化
733
-
734
-
623
+ _useState2 = _slicedToArray(_useState, 2),
624
+ langJson = _useState2[0],
625
+ setLangJson = _useState2[1]; // 国际化
735
626
  var _useState3 = useState({}),
736
- _useState4 = _slicedToArray(_useState3, 2),
737
- selectItem = _useState4[0],
738
- setSelectItem = _useState4[1]; // 选中对象
739
-
740
-
627
+ _useState4 = _slicedToArray(_useState3, 2),
628
+ selectItem = _useState4[0],
629
+ setSelectItem = _useState4[1]; // 选中对象
741
630
  var _useState5 = useState(false),
742
- _useState6 = _slicedToArray(_useState5, 2),
743
- showDialog = _useState6[0],
744
- setShowDialog = _useState6[1]; // 显示弹出菜单
745
-
746
-
631
+ _useState6 = _slicedToArray(_useState5, 2),
632
+ showDialog = _useState6[0],
633
+ setShowDialog = _useState6[1]; // 显示弹出菜单
747
634
  useEffect(function () {
748
635
  var item = langJson[selectLang] || {};
749
636
  setSelectItem(item);
750
637
  }, [selectLang, langJson]);
751
638
  useEffect(function () {
752
639
  var json = {};
753
-
754
640
  for (var i = 0, l = language.length; i < l; i++) {
755
641
  var item = language[i];
756
642
  if (item.value) json[item.value] = item;
757
643
  }
758
-
759
644
  setLangJson(json);
760
645
  }, [language]);
761
646
  /**
762
647
  * 点击语言下拉
763
648
  * @param item {LanguageItemProps} 当前项参数
764
649
  */
765
-
766
650
  var clickLangItem = function clickLangItem(item) {
767
651
  return function () {
768
652
  onClick && onClick(item.value, item);
@@ -773,8 +657,6 @@ var Language = function Language(props) {
773
657
  * 处理class
774
658
  * @return class名
775
659
  */
776
-
777
-
778
660
  var handClass = function handClass() {
779
661
  var str = 'language';
780
662
  if (className) str += ' ' + className;
@@ -785,16 +667,12 @@ var Language = function Language(props) {
785
667
  * 是否显示
786
668
  * @param bol
787
669
  */
788
-
789
-
790
670
  var onVisibleChange = function onVisibleChange(bol) {
791
671
  setShowDialog(bol);
792
672
  };
793
673
  /**
794
674
  * 下拉内容
795
675
  * */
796
-
797
-
798
676
  var selectPopover = function selectPopover() {
799
677
  /**
800
678
  * 处理每一项className
@@ -806,7 +684,6 @@ var Language = function Language(props) {
806
684
  if (item.value === selectItem.value) str += ' menu-popover-item-select';
807
685
  return str;
808
686
  };
809
-
810
687
  return jsx("div", Object.assign({
811
688
  className: "menu-popover-box"
812
689
  }, {
@@ -832,8 +709,6 @@ var Language = function Language(props) {
832
709
  }));
833
710
  };
834
711
  /** 内容 */
835
-
836
-
837
712
  var itemLanguage = function itemLanguage() {
838
713
  /** 处理显示的内容 */
839
714
  var handContent = function handContent() {
@@ -849,7 +724,6 @@ var Language = function Language(props) {
849
724
  }))]
850
725
  });
851
726
  };
852
-
853
727
  return jsx(Popover, Object.assign({
854
728
  trigger: 'hover',
855
729
  visible: showDialog,
@@ -865,7 +739,6 @@ var Language = function Language(props) {
865
739
  }))
866
740
  }));
867
741
  };
868
-
869
742
  return jsx(Fragment, {
870
743
  children: render ? render : jsx("div", Object.assign({
871
744
  className: handClass()
@@ -875,19 +748,16 @@ var Language = function Language(props) {
875
748
  });
876
749
  };
877
750
  /* 按钮组 */
878
-
879
-
880
751
  var BtnList = function BtnList(props) {
881
752
  var _props$list = props.list,
882
- list = _props$list === void 0 ? [] : _props$list,
883
- render = props.render,
884
- className = props.className,
885
- onClick = props.onClick;
753
+ list = _props$list === void 0 ? [] : _props$list,
754
+ render = props.render,
755
+ className = props.className,
756
+ onClick = props.onClick;
886
757
  /**
887
758
  * 处理class
888
759
  * @return class名
889
760
  */
890
-
891
761
  var handClass = function handClass() {
892
762
  var str = 'btn-list';
893
763
  if (className) str += ' ' + className;
@@ -898,16 +768,12 @@ var BtnList = function BtnList(props) {
898
768
  * @param item {BtnListItemProps} 详情
899
769
  * @param e 元素
900
770
  */
901
-
902
-
903
771
  var clickItem = function clickItem(item) {
904
772
  return function (e) {
905
773
  onClick && onClick(item, e);
906
774
  };
907
775
  };
908
776
  /** 内容 */
909
-
910
-
911
777
  var ContentMemo = useMemo(function () {
912
778
  /**
913
779
  * 处理显示的内容
@@ -927,7 +793,6 @@ var BtnList = function BtnList(props) {
927
793
  }))]
928
794
  });
929
795
  };
930
-
931
796
  return jsx(Fragment, {
932
797
  children: list.map(function (item, index) {
933
798
  var str = 'btn-list-item';
@@ -950,29 +815,23 @@ var BtnList = function BtnList(props) {
950
815
  });
951
816
  };
952
817
  /* 用户 */
953
-
954
-
955
818
  var User = function User(props) {
956
819
  var img = props.img,
957
- imgRender = props.imgRender,
958
- label = props.label,
959
- render = props.render,
960
- className = props.className,
961
- list = props.list,
962
- onClick = props.onClick,
963
- onClickMenu = props.onClickMenu,
964
- selectValue = props.selectValue;
965
-
820
+ imgRender = props.imgRender,
821
+ label = props.label,
822
+ render = props.render,
823
+ className = props.className,
824
+ list = props.list,
825
+ onClick = props.onClick,
826
+ onClickMenu = props.onClickMenu,
827
+ selectValue = props.selectValue;
966
828
  var _useState7 = useState(false),
967
- _useState8 = _slicedToArray(_useState7, 2),
968
- showDialog = _useState8[0],
969
- setShowDialog = _useState8[1]; // 显示弹出菜单
970
-
971
-
829
+ _useState8 = _slicedToArray(_useState7, 2),
830
+ showDialog = _useState8[0],
831
+ setShowDialog = _useState8[1]; // 显示弹出菜单
972
832
  var _useState9 = useState({}),
973
- _useState10 = _slicedToArray(_useState9, 1),
974
- timerJson = _useState10[0];
975
-
833
+ _useState10 = _slicedToArray(_useState9, 1),
834
+ timerJson = _useState10[0];
976
835
  var posDom = useRef();
977
836
  useEffect(function () {
978
837
  return function () {
@@ -983,7 +842,6 @@ var User = function User(props) {
983
842
  * 点击
984
843
  * @param e 元素
985
844
  */
986
-
987
845
  var onClickCom = function onClickCom(e) {
988
846
  onClick && onClick(e);
989
847
  };
@@ -991,8 +849,6 @@ var User = function User(props) {
991
849
  * 点击语言下拉
992
850
  * @param item {UserListProps} 当前项参数
993
851
  */
994
-
995
-
996
852
  var clickUserItem = function clickUserItem(item) {
997
853
  return function () {
998
854
  onClickMenu && onClickMenu(item.value, item);
@@ -1003,16 +859,12 @@ var User = function User(props) {
1003
859
  * 是否显示
1004
860
  * @param bol
1005
861
  */
1006
-
1007
-
1008
862
  var onVisibleChange = function onVisibleChange(bol) {
1009
863
  setShowDialog(bol);
1010
864
  };
1011
865
  /**
1012
866
  * 下拉内容
1013
867
  * */
1014
-
1015
-
1016
868
  var selectPopover = function selectPopover() {
1017
869
  /**
1018
870
  * 处理每一项className
@@ -1024,17 +876,13 @@ var User = function User(props) {
1024
876
  if (item.value === selectValue) str += ' menu-popover-item-select';
1025
877
  return str;
1026
878
  };
1027
-
1028
879
  var handStyleWidth = function handStyleWidth() {
1029
880
  var styleJson = {};
1030
-
1031
881
  if (posDom && posDom.current) {
1032
882
  styleJson.width = posDom.current.getBoundingClientRect().width + 'px';
1033
883
  }
1034
-
1035
884
  return styleJson;
1036
885
  };
1037
-
1038
886
  return jsx("div", Object.assign({
1039
887
  className: "menu-popover-box",
1040
888
  style: handStyleWidth()
@@ -1064,8 +912,6 @@ var User = function User(props) {
1064
912
  * 处理内容
1065
913
  * @return {ReactNode}
1066
914
  */
1067
-
1068
-
1069
915
  var handContent = function handContent() {
1070
916
  return jsxs(Fragment, {
1071
917
  children: [imgRender ? imgRender : img && jsx("img", {
@@ -1086,15 +932,12 @@ var User = function User(props) {
1086
932
  * 处理class
1087
933
  * @return class名
1088
934
  */
1089
-
1090
-
1091
935
  var handClass = function handClass() {
1092
936
  var str = 'logo';
1093
937
  if (className) str += ' ' + className;
1094
938
  if (showDialog) str += ' logo-show-dialog';
1095
939
  return str;
1096
940
  };
1097
-
1098
941
  return jsx(Fragment, {
1099
942
  children: render ? render : jsx(Popover, Object.assign({
1100
943
  trigger: 'hover',
@@ -1114,43 +957,36 @@ var User = function User(props) {
1114
957
  }))
1115
958
  });
1116
959
  };
1117
-
1118
960
  var HorizontalMeunRight = function HorizontalMeunRight(props) {
1119
961
  var _props$className = props.className,
1120
- className = _props$className === void 0 ? '' : _props$className,
1121
- backSelfcareProps = props.backSelfcareProps,
1122
- languageProps = props.languageProps,
1123
- btnListProps = props.btnListProps,
1124
- userProps = props.userProps,
1125
- render = props.render;
962
+ className = _props$className === void 0 ? '' : _props$className,
963
+ backSelfcareProps = props.backSelfcareProps,
964
+ languageProps = props.languageProps,
965
+ btnListProps = props.btnListProps,
966
+ userProps = props.userProps,
967
+ render = props.render;
1126
968
  /**
1127
969
  * 处理class
1128
970
  * @return class名
1129
971
  */
1130
-
1131
972
  var handClass = function handClass() {
1132
973
  var str = 'horizontal-meun-right';
1133
974
  if (className) str += ' ' + className;
1134
975
  return str;
1135
976
  };
1136
977
  /** 返回自助服务 */
1137
-
1138
-
1139
978
  var BackSelfcareMemo = useMemo(function () {
1140
979
  return backSelfcareProps && jsx(BackSelfcare, Object.assign({}, backSelfcareProps));
1141
980
  }, [backSelfcareProps]);
1142
981
  /** language */
1143
-
1144
982
  var LanguageMemo = useMemo(function () {
1145
983
  return languageProps && jsx(Language, Object.assign({}, languageProps));
1146
984
  }, [languageProps]);
1147
985
  /** 按钮组 */
1148
-
1149
986
  var BtnListMemo = useMemo(function () {
1150
987
  return btnListProps && jsx(BtnList, Object.assign({}, btnListProps));
1151
988
  }, [btnListProps]);
1152
989
  /** UserMemo */
1153
-
1154
990
  var UserMemo = useMemo(function () {
1155
991
  return userProps && jsx(User, Object.assign({}, userProps));
1156
992
  }, [userProps]);
@@ -1168,12 +1004,12 @@ styleInject(css_248z);
1168
1004
 
1169
1005
  var PageHeader = function PageHeader(props) {
1170
1006
  var leftRender = props.leftRender,
1171
- menuListProps = props.menuListProps,
1172
- footerProps = props.footerProps,
1173
- selectMenu = props.selectMenu,
1174
- onClickMenu = props.onClickMenu,
1175
- className = props.className,
1176
- style = props.style;
1007
+ menuListProps = props.menuListProps,
1008
+ footerProps = props.footerProps,
1009
+ selectMenu = props.selectMenu,
1010
+ onClickMenu = props.onClickMenu,
1011
+ className = props.className,
1012
+ style = props.style;
1177
1013
  var LeftMemo = useMemo(function () {
1178
1014
  return leftRender && jsx("div", Object.assign({
1179
1015
  className: 'page-header-left'
@@ -1197,13 +1033,11 @@ var PageHeader = function PageHeader(props) {
1197
1033
  /**
1198
1034
  * 处理class
1199
1035
  */
1200
-
1201
1036
  var handClass = function handClass() {
1202
1037
  var str = $prefixCls + '-page-header';
1203
1038
  if (className) str += ' ' + className;
1204
1039
  return str;
1205
1040
  };
1206
-
1207
1041
  return jsxs("div", Object.assign({
1208
1042
  className: handClass(),
1209
1043
  style: style