@ccs-ui/rc-pro 2.3.6-beta-40 → 2.4.0-beta.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 (185) hide show
  1. package/docs-dist/154.1dfbf448.async.js +137 -0
  2. package/docs-dist/27.cf0e6aaf.async.js +11 -0
  3. package/docs-dist/272.98b3528d.async.js +15 -0
  4. package/docs-dist/272.e8c51481.chunk.css +5 -0
  5. package/docs-dist/313.ee13d2ba.async.js +5 -0
  6. package/docs-dist/387.c3734c23.async.js +573 -0
  7. package/docs-dist/404.html +15 -0
  8. package/docs-dist/859.2ac4ce6d.async.js +18 -0
  9. package/docs-dist/auth__demos.106c6ce7.async.js +1 -0
  10. package/docs-dist/button__demos.4c22be73.async.js +1 -0
  11. package/docs-dist/cascader__demos.46cb399e.async.js +1 -0
  12. package/docs-dist/date-picker__demos.cb7b5f00.async.js +1 -0
  13. package/docs-dist/dialog__demos.e4f54d6e.async.js +1 -0
  14. package/docs-dist/docs__guide.md.33be0665.chunk.css +1 -0
  15. package/docs-dist/docs__guide.md.fa186b09.async.js +1 -0
  16. package/docs-dist/docs__index.md.22217718.async.js +1 -0
  17. package/docs-dist/docs__index.md.33be0665.chunk.css +1 -0
  18. package/docs-dist/dumi__tmp-production__dumi__theme__ContextWrapper.a5f4a8dc.async.js +1 -0
  19. package/docs-dist/editor__demos.0b8f6819.async.js +6 -0
  20. package/docs-dist/favicon.png +0 -0
  21. package/docs-dist/group-form-item__demos.121f2381.async.js +1 -0
  22. package/docs-dist/guide/index.html +15 -0
  23. package/docs-dist/index.html +15 -0
  24. package/docs-dist/interval-button__demos.a9fa2598.async.js +1 -0
  25. package/docs-dist/loading__demos.0b2a0a1e.async.js +1 -0
  26. package/docs-dist/logo.svg +48 -0
  27. package/docs-dist/meta__docs.58d867fc.async.js +1 -0
  28. package/docs-dist/meta__packages.20ad7ce8.async.js +10079 -0
  29. package/docs-dist/meta__packages.9ed2b563.chunk.css +1 -0
  30. package/docs-dist/nm__dumi__dist__client__pages__404.28f3e467.async.js +1 -0
  31. package/docs-dist/nm__dumi__dist__client__pages__404.8b85f2d9.chunk.css +1 -0
  32. package/docs-dist/nm__dumi__dist__client__pages__Demo__index.1d26abae.async.js +1 -0
  33. package/docs-dist/nm__dumi__dist__client__pages__Demo__index.578aa5c0.chunk.css +1 -0
  34. package/docs-dist/nm__dumi__theme-default__layouts__DocLayout__index.626881d5.async.js +1 -0
  35. package/docs-dist/packages__rc-pro__src__auth__index.md.33be0665.chunk.css +1 -0
  36. package/docs-dist/packages__rc-pro__src__auth__index.md.80345bcc.async.js +1 -0
  37. package/docs-dist/packages__rc-pro__src__button__index.md.05cb5ebc.async.js +1 -0
  38. package/docs-dist/packages__rc-pro__src__button__index.md.33be0665.chunk.css +1 -0
  39. package/docs-dist/packages__rc-pro__src__cascader__index.md.33be0665.chunk.css +1 -0
  40. package/docs-dist/packages__rc-pro__src__cascader__index.md.d8535a05.async.js +1 -0
  41. package/docs-dist/packages__rc-pro__src__date-picker__index.md.33be0665.chunk.css +1 -0
  42. package/docs-dist/packages__rc-pro__src__date-picker__index.md.bab3c69e.async.js +1 -0
  43. package/docs-dist/packages__rc-pro__src__dialog__index.md.33be0665.chunk.css +1 -0
  44. package/docs-dist/packages__rc-pro__src__dialog__index.md.64ec2666.async.js +1 -0
  45. package/docs-dist/packages__rc-pro__src__editor__index.md.33be0665.chunk.css +1 -0
  46. package/docs-dist/packages__rc-pro__src__editor__index.md.a18cb4dc.async.js +1 -0
  47. package/docs-dist/packages__rc-pro__src__group-form-item__index.md.33be0665.chunk.css +1 -0
  48. package/docs-dist/packages__rc-pro__src__group-form-item__index.md.7d1da762.async.js +1 -0
  49. package/docs-dist/packages__rc-pro__src__index.md.33be0665.chunk.css +1 -0
  50. package/docs-dist/packages__rc-pro__src__index.md.d9449737.async.js +1 -0
  51. package/docs-dist/packages__rc-pro__src__interval-button__index.md.33be0665.chunk.css +1 -0
  52. package/docs-dist/packages__rc-pro__src__interval-button__index.md.c725522b.async.js +1 -0
  53. package/docs-dist/packages__rc-pro__src__layout-keep-alive__index.md.33be0665.chunk.css +1 -0
  54. package/docs-dist/packages__rc-pro__src__layout-keep-alive__index.md.d39a1325.async.js +1 -0
  55. package/docs-dist/packages__rc-pro__src__loading__index.md.33be0665.chunk.css +1 -0
  56. package/docs-dist/packages__rc-pro__src__loading__index.md.893eb1e0.async.js +1 -0
  57. package/docs-dist/packages__rc-pro__src__pro-table__index.md.33be0665.chunk.css +1 -0
  58. package/docs-dist/packages__rc-pro__src__pro-table__index.md.352db0a4.async.js +1 -0
  59. package/docs-dist/packages__rc-pro__src__pro-tabs__index.md.33be0665.chunk.css +1 -0
  60. package/docs-dist/packages__rc-pro__src__pro-tabs__index.md.f6578fee.async.js +1 -0
  61. package/docs-dist/packages__rc-pro__src__result__index.md.33be0665.chunk.css +1 -0
  62. package/docs-dist/packages__rc-pro__src__result__index.md.737b704c.async.js +2 -0
  63. package/docs-dist/packages__rc-pro__src__select__index.md.33be0665.chunk.css +1 -0
  64. package/docs-dist/packages__rc-pro__src__select__index.md.35981c54.async.js +2 -0
  65. package/docs-dist/packages__rc-pro__src__time-picker__index.md.33be0665.chunk.css +1 -0
  66. package/docs-dist/packages__rc-pro__src__time-picker__index.md.b525b352.async.js +1 -0
  67. package/docs-dist/packages__rc-pro__src__water-mark__index.md.33be0665.chunk.css +1 -0
  68. package/docs-dist/packages__rc-pro__src__water-mark__index.md.8e548df5.async.js +1 -0
  69. package/docs-dist/preload_helper.5f80f118.js +1 -0
  70. package/docs-dist/pro-table__demos.09e87ab4.async.js +1 -0
  71. package/docs-dist/pro-tabs__demos.eff953d6.async.js +1 -0
  72. package/docs-dist/rc-pros/auth/index.html +15 -0
  73. package/docs-dist/rc-pros/button/index.html +15 -0
  74. package/docs-dist/rc-pros/cascader/index.html +15 -0
  75. package/docs-dist/rc-pros/date-picker/index.html +15 -0
  76. package/docs-dist/rc-pros/dialog/index.html +15 -0
  77. package/docs-dist/rc-pros/editor/index.html +15 -0
  78. package/docs-dist/rc-pros/group-form-item/index.html +15 -0
  79. package/docs-dist/rc-pros/index.html +15 -0
  80. package/docs-dist/rc-pros/interval-button/index.html +15 -0
  81. package/docs-dist/rc-pros/layout-keep-alive/index.html +15 -0
  82. package/docs-dist/rc-pros/loading/index.html +15 -0
  83. package/docs-dist/rc-pros/pro-table/index.html +15 -0
  84. package/docs-dist/rc-pros/pro-tabs/index.html +15 -0
  85. package/docs-dist/rc-pros/result/index.html +15 -0
  86. package/docs-dist/rc-pros/select/index.html +15 -0
  87. package/docs-dist/rc-pros/time-picker/index.html +15 -0
  88. package/docs-dist/rc-pros/water-mark/index.html +15 -0
  89. package/docs-dist/result__demos.4832bcb4.async.js +1 -0
  90. package/docs-dist/select__demos.e57e694a.async.js +1 -0
  91. package/docs-dist/time-picker__demos.518f8acb.async.js +1 -0
  92. package/docs-dist/umi.4e0bcd92.css +1 -0
  93. package/docs-dist/umi.cc941610.js +108 -0
  94. package/docs-dist/water-mark__demos.4e7773cd.async.js +1 -0
  95. package/docs-dist/~demos/:id/index.html +15 -0
  96. package/docs-dist/~demos/auth-demo-basic/index.html +15 -0
  97. package/docs-dist/~demos/button-demo-button/index.html +15 -0
  98. package/docs-dist/~demos/button-demo-group/index.html +15 -0
  99. package/docs-dist/~demos/cascader-demo-basic/index.html +15 -0
  100. package/docs-dist/~demos/cascader-demo-cache/index.html +15 -0
  101. package/docs-dist/~demos/date-picker-demo-basic/index.html +15 -0
  102. package/docs-dist/~demos/date-picker-demo-range/index.html +15 -0
  103. package/docs-dist/~demos/dialog-demo-demos/index.html +15 -0
  104. package/docs-dist/~demos/editor-demo-demos/index.html +15 -0
  105. package/docs-dist/~demos/group-form-item-demo-basic/index.html +15 -0
  106. package/docs-dist/~demos/interval-button-demo-basic/index.html +15 -0
  107. package/docs-dist/~demos/loading-demo-basic/index.html +15 -0
  108. package/docs-dist/~demos/pro-table-demo-basic/index.html +15 -0
  109. package/docs-dist/~demos/pro-table-demo-fixed/index.html +15 -0
  110. package/docs-dist/~demos/pro-table-demo-selection/index.html +15 -0
  111. package/docs-dist/~demos/pro-tabs-demo-basic/index.html +15 -0
  112. package/docs-dist/~demos/pro-tabs-demo-tab/index.html +15 -0
  113. package/docs-dist/~demos/result-demo-basic/index.html +15 -0
  114. package/docs-dist/~demos/select-demo-api/index.html +15 -0
  115. package/docs-dist/~demos/select-demo-basic/index.html +15 -0
  116. package/docs-dist/~demos/select-demo-customize/index.html +15 -0
  117. package/docs-dist/~demos/select-demo-customize-label/index.html +15 -0
  118. package/docs-dist/~demos/time-picker-demo-basic/index.html +15 -0
  119. package/docs-dist/~demos/water-mark-demo-basic/index.html +15 -0
  120. package/es/Foo/d +0 -0
  121. package/es/aj-captcha/index.less +9 -23
  122. package/es/auth/index.d.ts +7 -0
  123. package/es/auth/index.js +14 -0
  124. package/es/cascader/index.js +4 -4
  125. package/es/ccs.d.ts +7 -13
  126. package/es/config.js +33 -11
  127. package/es/context/index.d.ts +2 -2
  128. package/es/date-picker/index.js +20 -0
  129. package/es/dialog/button.d.ts +1 -1
  130. package/es/dialog/button.js +4 -4
  131. package/es/dialog/index.d.ts +0 -1
  132. package/es/dialog/index.js +0 -1
  133. package/es/ellipsis/index.js +4 -2
  134. package/es/ellipsis/useResizeEffect.js +10 -24
  135. package/es/group-form-item/index.d.ts +11 -0
  136. package/es/group-form-item/index.js +124 -0
  137. package/es/hooks/use-page.d.ts +1 -1
  138. package/es/hooks/use-selection.d.ts +12 -23
  139. package/es/hooks/use-selection.js +51 -25
  140. package/es/index.d.ts +1 -3
  141. package/es/index.js +1 -3
  142. package/es/interval-button/index.js +4 -4
  143. package/es/layout-keep-alive/index.d.ts +1 -1
  144. package/es/layout-keep-alive/index.js +26 -20
  145. package/es/layout-keep-alive/index.less +19 -23
  146. package/es/layout-keep-alive/page.d.ts +3 -2
  147. package/es/layout-keep-alive/page.js +4 -3
  148. package/es/layout-single-page/index.d.ts +5 -3
  149. package/es/layout-single-page/index.js +12 -5
  150. package/es/layout-single-page/index.less +2 -8
  151. package/es/layout-single-page/page.d.ts +3 -1
  152. package/es/layout-single-page/page.js +2 -1
  153. package/es/pro-table/_utils.d.ts +1 -1
  154. package/es/pro-table/_utils.js +7 -7
  155. package/es/pro-table/form-item.d.ts +5 -3
  156. package/es/pro-table/form-item.js +28 -11
  157. package/es/pro-table/head.js +88 -63
  158. package/es/pro-table/index.less +20 -175
  159. package/es/pro-table/selection-alert.d.ts +4 -2
  160. package/es/pro-table/selection-alert.js +16 -4
  161. package/es/pro-table/table.d.ts +13 -24
  162. package/es/pro-table/table.js +128 -250
  163. package/es/pro-table/tree.d.ts +3 -3
  164. package/es/pro-table/tree.js +28 -17
  165. package/es/select/ modal.d.ts +3 -9
  166. package/es/select/ modal.js +63 -22
  167. package/es/select/customize.d.ts +7 -15
  168. package/es/select/customize.js +58 -48
  169. package/es/select/index.d.ts +2 -1
  170. package/es/select/index.js +9 -9
  171. package/es/table/index.js +12 -14
  172. package/es/table/index.less +0 -129
  173. package/package.json +13 -32
  174. package/LICENSE +0 -21
  175. package/README.md +0 -37
  176. package/es/breadcrumb.d.ts +0 -8
  177. package/es/breadcrumb.js +0 -40
  178. package/es/dialog/index.less +0 -16
  179. package/es/pro-grid/index.d.ts +0 -15
  180. package/es/pro-grid/index.js +0 -58
  181. package/es/trigger/index.d.ts +0 -43
  182. package/es/trigger/index.js +0 -298
  183. package/es/trigger/index.less +0 -42
  184. package/es/virtual-list/index.d.ts +0 -51
  185. package/es/virtual-list/index.js +0 -132
package/es/index.js CHANGED
@@ -9,6 +9,7 @@ export { default as CcsDialog } from "./dialog";
9
9
  export { default as CcsEditor } from "./editor";
10
10
  export { default as CcsEllipsis } from "./ellipsis";
11
11
  export { default as CcsFullScreenButton } from "./full-screen";
12
+ export { default as CcsGroupFormItem } from "./group-form-item";
12
13
  export { default as useAppConfig } from "./hooks/use-app";
13
14
  export { default as useCcsOnceEvent } from "./hooks/use-once-event";
14
15
  export { default as useCcsPage } from "./hooks/use-page";
@@ -19,7 +20,6 @@ export { default as CcsIntervalButton } from "./interval-button";
19
20
  export { default as CcsKeepAliveTabs } from "./layout-keep-alive";
20
21
  export { default as CcsSinglePage } from "./layout-single-page";
21
22
  export { default as CcsLoading } from "./loading";
22
- export { default as CcsProGrid } from "./pro-grid";
23
23
  export { default as CcsProTable } from "./pro-table";
24
24
  export { default as CcsProTabs } from "./pro-tabs";
25
25
  export { default as CcsResizeObserver } from "./resize-observer";
@@ -28,9 +28,7 @@ export { default as CcsSelect } from "./select";
28
28
  export { default as CcsStatusTag } from "./status-tag";
29
29
  export { default as CcsTable } from "./table";
30
30
  export { default as CcsTimePicker } from "./time-picker";
31
- export { default as CcsTrigger } from "./trigger";
32
31
  export { default as CcsUpload } from "./upload";
33
- export { default as CcsVirtualList } from "./virtual-list";
34
32
  export { default as CcsWaterMark } from "./water-mark";
35
33
  import * as CCS from "./ccs";
36
34
  export default CCS;
@@ -54,7 +54,7 @@ function IntervalButton(_ref, ref) {
54
54
  while (1) switch (_context.prev = _context.next) {
55
55
  case 0:
56
56
  _context.next = 2;
57
- return localStorage.getStroage(key);
57
+ return localStorage.getItem(key);
58
58
  case 2:
59
59
  s = _context.sent;
60
60
  if (!s) {
@@ -90,7 +90,7 @@ function IntervalButton(_ref, ref) {
90
90
  if (count - 1 === 0) {
91
91
  setCodeInterval(null);
92
92
  setCount(num);
93
- if (key) localStorage.removeStroage(key);
93
+ if (key) localStorage.removeItem(key);
94
94
  return;
95
95
  }
96
96
  setCount(count - 1);
@@ -103,10 +103,10 @@ function IntervalButton(_ref, ref) {
103
103
  var onStart = function onStart() {
104
104
  setCodeInterval(1000);
105
105
  if (key) {
106
- localStorage.setStroage(key, {
106
+ localStorage.setItem(key, JSON.stringify({
107
107
  num: num,
108
108
  time: new Date().getTime()
109
- });
109
+ }));
110
110
  }
111
111
  };
112
112
  useImperativeHandle(ref, function () {
@@ -6,9 +6,9 @@ import { MenuType } from '../ccs';
6
6
  import './index.less';
7
7
  export type CacheRouter = {
8
8
  key: string;
9
+ menuKey: string;
9
10
  label: string;
10
11
  urlAuthList: string[];
11
- timestamp: number;
12
12
  outlet: ReactElement<any, string | JSXElementConstructor<any>> | null;
13
13
  children?: ReactElement<any, string | JSXElementConstructor<any>> | null;
14
14
  breadcrumb: BreadcrumbProps['items'];
@@ -16,14 +16,14 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
16
16
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
17
17
  import { MoreOutlined } from '@ant-design/icons';
18
18
  import CcsUtils from '@ccs-ui/utils';
19
- import { useUpdate, useUpdateEffect } from 'ahooks';
20
- import { Button, Dropdown, Empty, Tabs } from 'antd';
19
+ import { useMemoizedFn, useUpdate, useUpdateEffect } from 'ahooks';
20
+ import { Button, Dropdown, Tabs } from 'antd';
21
21
  import classnames from 'classnames';
22
22
  import updateHelper from 'immutability-helper';
23
- import { useMemo, useRef } from 'react';
23
+ import { useCallback, useMemo, useRef } from 'react';
24
24
  import { useLocation } from 'react-router';
25
25
  import { useOutlet } from 'react-router-dom';
26
- import { useAppConfig } from '..';
26
+ import { CcsResult, useAppConfig } from '..';
27
27
  import "./index.less";
28
28
  import Page from "./page";
29
29
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -151,11 +151,10 @@ function KeepAliveTabs(_ref) {
151
151
  useUpdateEffect(function () {
152
152
  routers.current.forEach(function (router) {
153
153
  var _menu$btnAuth;
154
- var menu = findMenuById(menuItems, router.key);
154
+ var menu = findMenuById(menuItems, router.menuKey);
155
155
  router.urlAuthList = (menu === null || menu === void 0 || (_menu$btnAuth = menu.btnAuth) === null || _menu$btnAuth === void 0 ? void 0 : _menu$btnAuth.map(function (b) {
156
156
  return b.code;
157
157
  })) || [];
158
- router.timestamp = new Date().getTime();
159
158
  });
160
159
  update();
161
160
  }, [menuItems]);
@@ -262,25 +261,26 @@ function KeepAliveTabs(_ref) {
262
261
  btnAuth = _ref3$btnAuth === void 0 ? [] : _ref3$btnAuth,
263
262
  _ref3$breadcrumb = _ref3.breadcrumb,
264
263
  breadcrumb = _ref3$breadcrumb === void 0 ? [] : _ref3$breadcrumb;
264
+ var isMenu = curMenu.key !== undefined;
265
265
  routers.current = updateHelper(routers.current, {
266
266
  $push: [{
267
267
  key: location.key,
268
- timestamp: new Date().getTime(),
269
268
  label: (curMenu === null || curMenu === void 0 ? void 0 : curMenu.label) || '未知',
270
- outlet: curMenu ? outlet : /*#__PURE__*/_jsx(Empty, {
271
- description: "\u672A\u77E5\u9875\u9762"
269
+ outlet: isMenu ? outlet : /*#__PURE__*/_jsx(CcsResult.Page404, {
270
+ title: "\u672A\u77E5\u9875\u9762"
272
271
  }),
273
272
  urlAuthList: btnAuth.map(function (b) {
274
273
  return b.code;
275
274
  }),
276
- breadcrumb: breadcrumb,
277
- pageLocation: location
275
+ breadcrumb: isMenu ? breadcrumb : [],
276
+ pageLocation: location,
277
+ menuKey: (curMenu === null || curMenu === void 0 ? void 0 : curMenu.key) || ''
278
278
  }]
279
279
  });
280
280
  }
281
281
 
282
282
  // tab路由切换,携带search,state参数
283
- var onHistory = function onHistory(key) {
283
+ var onHistory = useCallback(function (key) {
284
284
  var tab = routers.current.find(function (c) {
285
285
  return c.key === key;
286
286
  });
@@ -291,10 +291,10 @@ function KeepAliveTabs(_ref) {
291
291
  search = _tab$pageLocation.search;
292
292
  history.push("".concat(_pathname).concat(search), state);
293
293
  }
294
- };
294
+ }, []);
295
295
 
296
296
  // 页面主动销毁或关闭tab
297
- var onDestroy = function onDestroy(key) {
297
+ var onDestroy = useMemoizedFn(function (key) {
298
298
  var index = routers.current.findIndex(function (c) {
299
299
  return c.key === key;
300
300
  });
@@ -326,10 +326,10 @@ function KeepAliveTabs(_ref) {
326
326
  // 显示后一个
327
327
  onHistory(routers.current[index].key);
328
328
  }
329
- };
329
+ });
330
330
 
331
331
  // 扩展操作
332
- var onCloseTab = function onCloseTab(key) {
332
+ var onCloseTab = useCallback(function (key) {
333
333
  // 关闭其他标签
334
334
  if (key === '1') {
335
335
  routers.current = routers.current.filter(function (c) {
@@ -340,7 +340,7 @@ function KeepAliveTabs(_ref) {
340
340
  routers.current = [];
341
341
  history.push('/');
342
342
  }
343
- };
343
+ }, []);
344
344
  var tabBarExtraContent = /*#__PURE__*/_jsx(Dropdown, {
345
345
  menu: {
346
346
  items: extraItems,
@@ -368,11 +368,18 @@ function KeepAliveTabs(_ref) {
368
368
  return onDestroy(e);
369
369
  },
370
370
  items: routers.current,
371
- tabBarExtraContent: routers.current.length > 2 ? tabBarExtraContent : null
371
+ tabBarExtraContent: routers.current.length > 2 ? tabBarExtraContent : null,
372
+ tabBarStyle: {
373
+ margin: 0
374
+ },
375
+ renderTabBar: function renderTabBar(props, DefaultTabBar) {
376
+ return /*#__PURE__*/_jsx(DefaultTabBar, _objectSpread(_objectSpread({}, props), {}, {
377
+ className: "ccs-keep-alive-nav"
378
+ }));
379
+ }
372
380
  }), routers.current.map(function (_ref4) {
373
381
  var key = _ref4.key,
374
382
  urlAuthList = _ref4.urlAuthList,
375
- timestamp = _ref4.timestamp,
376
383
  outlet = _ref4.outlet,
377
384
  breadcrumb = _ref4.breadcrumb,
378
385
  pageLocation = _ref4.pageLocation;
@@ -381,7 +388,6 @@ function KeepAliveTabs(_ref) {
381
388
  location: pageLocation,
382
389
  onDestroy: onDestroy,
383
390
  urlAuthList: urlAuthList,
384
- timestamp: timestamp,
385
391
  breadcrumb: breadcrumb,
386
392
  children: outlet
387
393
  }, key);
@@ -1,3 +1,14 @@
1
+ // .ccs-keep-alive-nav .ant-tabs-tab {
2
+ // border: 0 !important;
3
+ // border-radius: 0 !important;
4
+ // }
5
+ // .ccs-keep-alive-nav .ant-tabs-tab-active {
6
+ // background-color: #f0f2f5 !important;
7
+ // }
8
+ // .ccs-keep-alive .dark .ccs-keep-alive-nav .ant-tabs-tab-active {
9
+ // background-color: #2b2c2c !important;
10
+ // }
11
+
1
12
  .ccs-keep-alive {
2
13
  flex: 1 1 auto;
3
14
  display: flex;
@@ -33,6 +44,14 @@
33
44
  }
34
45
  }
35
46
 
47
+ &-nav {
48
+ margin: 0;
49
+
50
+ &::before {
51
+ border-bottom: 0 !important;
52
+ }
53
+ }
54
+
36
55
  &-tabs {
37
56
  background-color: #fff;
38
57
  border-bottom: 1px solid #f1f2f5;
@@ -41,29 +60,6 @@
41
60
  background-color: rgb(37, 37, 37);
42
61
  border-bottom: 0;
43
62
  }
44
-
45
- & > .ant-tabs-nav {
46
- margin: 0;
47
-
48
- &::before {
49
- border-bottom: 0;
50
- }
51
-
52
- .ant-tabs-tab {
53
- border: 0;
54
- border-radius: 0 !important;
55
- }
56
-
57
- .ant-tabs-tab-active {
58
- background-color: #f0f2f5;
59
- }
60
- }
61
-
62
- &.dark > .ant-tabs-nav {
63
- .ant-tabs-tab-active {
64
- background-color: #2b2c2c;
65
- }
66
- }
67
63
  }
68
64
 
69
65
  .ccs-tab-item {
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { Location } from 'react-router';
3
3
  import { CacheRouter } from '.';
4
- export type CachePageProps = Pick<CacheRouter, 'breadcrumb' | 'urlAuthList' | 'children' | 'timestamp'> & {
4
+ export type CachePageProps = Pick<CacheRouter, 'breadcrumb' | 'urlAuthList' | 'children'> & {
5
5
  /** 选中状态 */
6
6
  active: boolean;
7
7
  /** router location */
@@ -9,5 +9,6 @@ export type CachePageProps = Pick<CacheRouter, 'breadcrumb' | 'urlAuthList' | 'c
9
9
  /** 销毁页面 */
10
10
  onDestroy: (path: string) => void;
11
11
  };
12
- declare const _default: import("react").MemoExoticComponent<(props: CachePageProps) => import("react/jsx-runtime").JSX.Element>;
12
+ declare function CachePage(props: CachePageProps): import("react/jsx-runtime").JSX.Element;
13
+ declare const _default: import("react").MemoExoticComponent<typeof CachePage>;
13
14
  export default _default;
@@ -6,7 +6,7 @@ import { PageContext } from "../context";
6
6
  import { DialogElementsHolder } from "../dialog/hook";
7
7
  import { jsx as _jsx } from "react/jsx-runtime";
8
8
  import { jsxs as _jsxs } from "react/jsx-runtime";
9
- export default /*#__PURE__*/memo(function (props) {
9
+ function CachePage(props) {
10
10
  var children = props.children,
11
11
  active = props.active,
12
12
  urlAuthList = props.urlAuthList,
@@ -47,6 +47,7 @@ export default /*#__PURE__*/memo(function (props) {
47
47
  })
48
48
  })
49
49
  });
50
- }, function (l, n) {
51
- return l.active === n.active && l.timestamp === n.timestamp;
50
+ }
51
+ export default /*#__PURE__*/memo(CachePage, function (l, n) {
52
+ return l.active === n.active && l.urlAuthList.join(',') === n.urlAuthList.join(',');
52
53
  });
@@ -1,11 +1,13 @@
1
- import CCS from "..";
1
+ import CCS from '@ccs-ui/rc-pro';
2
+ import { CSSProperties, ReactNode } from 'react';
2
3
  import './index.less';
3
4
  type PropsType = {
4
5
  appName: string;
5
6
  menuItems: CCS.MenuType[];
6
- className?: string;
7
+ breadcrumbStyle?: CSSProperties;
8
+ children?: ReactNode;
7
9
  };
8
- declare function SinglePage({ appName, menuItems, className }: PropsType): import("react/jsx-runtime").JSX.Element;
10
+ declare function SinglePage({ appName, menuItems, breadcrumbStyle, children, }: PropsType): import("react/jsx-runtime").JSX.Element;
9
11
  declare namespace SinglePage {
10
12
  var displayName: string;
11
13
  }
@@ -1,4 +1,3 @@
1
- import classnames from 'classnames';
2
1
  import { useMemo } from 'react';
3
2
  import { useLocation } from 'react-router';
4
3
  import { useOutlet } from 'react-router-dom';
@@ -6,12 +5,15 @@ import { findMenusByUrl } from "../layout-keep-alive";
6
5
  import CcsResult from "../result";
7
6
  import "./index.less";
8
7
  import Page from "./page";
8
+ import { Fragment as _Fragment } from "react/jsx-runtime";
9
+ import { jsxs as _jsxs } from "react/jsx-runtime";
9
10
  import { jsx as _jsx } from "react/jsx-runtime";
10
11
  function SinglePage(_ref) {
11
12
  var appName = _ref.appName,
12
13
  _ref$menuItems = _ref.menuItems,
13
14
  menuItems = _ref$menuItems === void 0 ? [] : _ref$menuItems,
14
- className = _ref.className;
15
+ breadcrumbStyle = _ref.breadcrumbStyle,
16
+ children = _ref.children;
15
17
  var location = useLocation();
16
18
  var pathname = location.pathname;
17
19
  var outlet = useOutlet();
@@ -46,14 +48,19 @@ function SinglePage(_ref) {
46
48
  menu: menu
47
49
  };
48
50
  }, [pathname, menuItems]);
49
- return /*#__PURE__*/_jsx("div", {
50
- className: classnames(className, "ccs-single-page"),
51
+ return /*#__PURE__*/_jsx(_Fragment, {
51
52
  children: menuInfo !== null && menuInfo !== void 0 && menuInfo.auth ? /*#__PURE__*/_jsx(Page, {
52
53
  location: location,
53
54
  urlAuthList: menuInfo.auth,
54
55
  breadcrumb: menuInfo.breadcrumb,
55
- children: outlet
56
+ breadcrumbStyle: breadcrumbStyle,
57
+ children: /*#__PURE__*/_jsxs(_Fragment, {
58
+ children: [outlet, children]
59
+ })
56
60
  }) : /*#__PURE__*/_jsx(CcsResult.Page404, {
61
+ style: {
62
+ flex: 'auto'
63
+ },
57
64
  subTitle: "\u9875\u9762\u4E0D\u5B58\u5728"
58
65
  })
59
66
  });
@@ -1,13 +1,7 @@
1
- .ccs-single-page {
2
- flex: 1 1 auto;
1
+ .ccs-sticky-scroll > div {
3
2
  display: flex;
4
3
  flex-direction: column;
5
-
6
- .ccs-sticky-scroll > div {
7
- display: flex;
8
- flex-direction: column;
9
- padding: 10px 16px 16px;
10
- }
4
+ padding: 10px 16px 16px;
11
5
  }
12
6
 
13
7
  .colorful-theme {
@@ -1,4 +1,4 @@
1
- import { JSXElementConstructor, ReactElement } from 'react';
1
+ import { CSSProperties, JSXElementConstructor, ReactElement } from 'react';
2
2
  import { Location } from 'react-router';
3
3
  import { CacheRouter } from '../layout-keep-alive';
4
4
  export type SinglePageProps = Pick<CacheRouter, 'breadcrumb' | 'urlAuthList'> & {
@@ -6,6 +6,8 @@ export type SinglePageProps = Pick<CacheRouter, 'breadcrumb' | 'urlAuthList'> &
6
6
  location: Location;
7
7
  /** children */
8
8
  children: ReactElement<any, string | JSXElementConstructor<any>> | null;
9
+ /** 语义化style */
10
+ breadcrumbStyle?: CSSProperties;
9
11
  };
10
12
  declare const _default: import("react").MemoExoticComponent<(props: SinglePageProps) => import("react/jsx-runtime").JSX.Element>;
11
13
  export default _default;
@@ -31,7 +31,8 @@ export default /*#__PURE__*/memo(function (props) {
31
31
  className: "ccs-sticky-scroll",
32
32
  children: [/*#__PURE__*/_jsx(Breadcrumb, {
33
33
  items: breadcrumb,
34
- className: "ccs-breadcrumb"
34
+ className: "ccs-breadcrumb",
35
+ style: props.breadcrumbStyle
35
36
  }), children, /*#__PURE__*/_jsx(DialogElementsHolder, {
36
37
  ref: dialogHolderRef
37
38
  }, "modal-drawer-holder")]
@@ -2,7 +2,7 @@ import { TableSticky } from 'rc-table/lib/interface';
2
2
  import React, { ReactNode } from 'react';
3
3
  import CCS from '..';
4
4
  import { ShowDependType, TableStickyProps } from './table';
5
- declare const onTableInModalOrDrawer: (node: any) => TableStickyProps;
5
+ declare const onTableInModalOrDrawer: (node: any, classPrefix: string) => TableStickyProps;
6
6
  declare const onTableInTabItem: (node: any) => boolean | TableSticky;
7
7
  declare const getDataById: (data: any[], rowKey: string, id: React.Key) => any;
8
8
  declare const getAllChildrenId: (data: any[], rowKey: string) => string[];
@@ -1,13 +1,13 @@
1
1
  import _isArray from 'lodash.isarray';
2
2
  import React from 'react';
3
3
  // 判断组件所处dom
4
- var onTableInModalOrDrawer = function onTableInModalOrDrawer(node) {
5
- var _parent$classList, _parent$classList2, _parent$classList3, _parent$classList4, _parent$classList5;
4
+ var onTableInModalOrDrawer = function onTableInModalOrDrawer(node, classPrefix) {
5
+ var _parent$classList, _parent$classList2, _parent$classList3, _parent$classList4;
6
6
  var parent = node.parentNode;
7
7
  if (!parent) return false;
8
8
  if (
9
9
  // 通过指定dom吸顶
10
- (_parent$classList = parent.classList) !== null && _parent$classList !== void 0 && _parent$classList.contains('ccs-trigger-container') || (_parent$classList2 = parent.classList) !== null && _parent$classList2 !== void 0 && _parent$classList2.contains('ccs-drawer-content') || (_parent$classList3 = parent.classList) !== null && _parent$classList3 !== void 0 && _parent$classList3.contains('ant-drawer-body')) {
10
+ (_parent$classList = parent.classList) !== null && _parent$classList !== void 0 && _parent$classList.contains('ccs-drawer-content') || (_parent$classList2 = parent.classList) !== null && _parent$classList2 !== void 0 && _parent$classList2.contains("".concat(classPrefix, "-drawer-body"))) {
11
11
  return {
12
12
  getContainer: function getContainer() {
13
13
  return parent;
@@ -17,20 +17,20 @@ var onTableInModalOrDrawer = function onTableInModalOrDrawer(node) {
17
17
  }
18
18
 
19
19
  // 在弹出框中吸顶top
20
- if ((_parent$classList4 = parent.classList) !== null && _parent$classList4 !== void 0 && _parent$classList4.contains('ant-modal') || (_parent$classList5 = parent.classList) !== null && _parent$classList5 !== void 0 && _parent$classList5.contains('ant-drawer')) {
20
+ if ((_parent$classList3 = parent.classList) !== null && _parent$classList3 !== void 0 && _parent$classList3.contains("".concat(classPrefix, "-modal")) || (_parent$classList4 = parent.classList) !== null && _parent$classList4 !== void 0 && _parent$classList4.contains("".concat(classPrefix, "-drawer"))) {
21
21
  return {
22
22
  offsetHeader: 0,
23
23
  isInDialog: true
24
24
  };
25
25
  }
26
- return onTableInModalOrDrawer(parent);
26
+ return onTableInModalOrDrawer(parent, classPrefix);
27
27
  };
28
28
  var onTableInTabItem = function onTableInTabItem(node) {
29
- var _parent$classList6;
29
+ var _parent$classList5;
30
30
  var parent = node.parentNode;
31
31
  if (!parent) return false;
32
32
  if ( // 通过指定dom吸顶
33
- (_parent$classList6 = parent.classList) !== null && _parent$classList6 !== void 0 && _parent$classList6.contains('ccs-sticky-scroll')) {
33
+ (_parent$classList5 = parent.classList) !== null && _parent$classList5 !== void 0 && _parent$classList5.contains('ccs-sticky-scroll')) {
34
34
  return {
35
35
  getContainer: function getContainer() {
36
36
  return node;
@@ -1,7 +1,9 @@
1
+ import { NamePath } from 'antd/es/form/interface';
1
2
  import { TableFormItem } from '../ccs';
2
- import { CcsProTableProps } from './table';
3
3
  type PropsType = TableFormItem & {
4
4
  dependParam?: any;
5
- } & Pick<CcsProTableProps<any>, 'formItemLabelWidth'>;
6
- export default function HeadFormItem({ label, name, rules, value, dependParam, formItemLabelWidth, }: PropsType): import("react/jsx-runtime").JSX.Element;
5
+ groupItemNames?: NamePath[];
6
+ formItemLabelWidth?: number | string;
7
+ };
8
+ export default function HeadFormItem({ label, name, rules, value, dependParam, groupItemNames, formItemLabelWidth, }: PropsType): import("react/jsx-runtime").JSX.Element;
7
9
  export {};
@@ -1,5 +1,12 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
1
7
  import { Form } from 'antd';
2
8
  import { cloneElement } from 'react';
9
+ import { CcsGroupFormItem } from '..';
3
10
  import { classPrefix } from "./table";
4
11
  import { jsx as _jsx } from "react/jsx-runtime";
5
12
  import { Fragment as _Fragment } from "react/jsx-runtime";
@@ -9,19 +16,29 @@ export default function HeadFormItem(_ref) {
9
16
  rules = _ref.rules,
10
17
  value = _ref.value,
11
18
  dependParam = _ref.dependParam,
19
+ groupItemNames = _ref.groupItemNames,
12
20
  formItemLabelWidth = _ref.formItemLabelWidth;
21
+ var props = {
22
+ rules: rules,
23
+ className: "".concat(classPrefix, "-form-item"),
24
+ label: formItemLabelWidth ? /*#__PURE__*/_jsx("div", {
25
+ style: {
26
+ width: formItemLabelWidth
27
+ },
28
+ children: label
29
+ }) : label
30
+ };
31
+ if (groupItemNames) {
32
+ return /*#__PURE__*/_jsx(CcsGroupFormItem, _objectSpread(_objectSpread({}, props), {}, {
33
+ groupItemNames: groupItemNames,
34
+ children: dependParam ? /*#__PURE__*/cloneElement(value, dependParam) : value
35
+ }));
36
+ }
13
37
  return /*#__PURE__*/_jsx(_Fragment, {
14
- children: /*#__PURE__*/_jsx(Form.Item, {
15
- name: name,
16
- rules: rules,
17
- className: "".concat(classPrefix, "-form-label"),
18
- label: formItemLabelWidth ? /*#__PURE__*/_jsx("div", {
19
- style: {
20
- width: formItemLabelWidth
21
- },
22
- children: label
23
- }) : label,
38
+ children: /*#__PURE__*/_jsx(Form.Item, _objectSpread(_objectSpread({
39
+ name: name
40
+ }, props), {}, {
24
41
  children: dependParam ? /*#__PURE__*/cloneElement(value, dependParam) : value
25
- })
42
+ }))
26
43
  });
27
44
  }