@ccs-ui/rc-pro 2.3.6-beta-40 → 2.4.0-beta.2

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 (209) hide show
  1. package/docs-dist/1449.2b56219b.async.js +15 -0
  2. package/docs-dist/1449.e8c51481.chunk.css +5 -0
  3. package/docs-dist/1474.20b8cea1.async.js +578 -0
  4. package/docs-dist/2085.27b7a56c.async.js +5 -0
  5. package/docs-dist/27.cf0e6aaf.async.js +11 -0
  6. package/docs-dist/404.html +15 -0
  7. package/docs-dist/4859.645461e8.async.js +18 -0
  8. package/docs-dist/9510.92d7c9e5.async.js +137 -0
  9. package/docs-dist/auth__demos.3be7cd2a.async.js +1 -0
  10. package/docs-dist/button__demos.a0dc2689.async.js +1 -0
  11. package/docs-dist/cascader__demos.d47af25c.async.js +1 -0
  12. package/docs-dist/date-picker__demos.259c9ecb.async.js +1 -0
  13. package/docs-dist/demos.a585b64a.async.js +1 -0
  14. package/docs-dist/dialog__demos.03d15fe7.async.js +1 -0
  15. package/docs-dist/docs__guide.md.33be0665.chunk.css +1 -0
  16. package/docs-dist/docs__guide.md.e5041fb4.async.js +1 -0
  17. package/docs-dist/docs__index.md.33be0665.chunk.css +1 -0
  18. package/docs-dist/docs__index.md.75a9a568.async.js +1 -0
  19. package/docs-dist/dumi__tmp-production__dumi__theme__ContextWrapper.ef64dc7c.async.js +1 -0
  20. package/docs-dist/editor__demos.88663d1e.async.js +6 -0
  21. package/docs-dist/favicon.png +0 -0
  22. package/docs-dist/group-form-item__demos.4b5b499b.async.js +1 -0
  23. package/docs-dist/guide/index.html +15 -0
  24. package/docs-dist/index.html +15 -0
  25. package/docs-dist/interval-button__demos.d647fbab.async.js +1 -0
  26. package/docs-dist/loading__demos.fe7b1e59.async.js +1 -0
  27. package/docs-dist/logo.svg +48 -0
  28. package/docs-dist/meta__docs.56a19a6a.async.js +1 -0
  29. package/docs-dist/meta__packages.6c636f9a.async.js +13817 -0
  30. package/docs-dist/meta__packages.9ed2b563.chunk.css +1 -0
  31. package/docs-dist/nm__dumi__dist__client__pages__404.3097fa22.async.js +1 -0
  32. package/docs-dist/nm__dumi__dist__client__pages__404.8b85f2d9.chunk.css +1 -0
  33. package/docs-dist/nm__dumi__dist__client__pages__Demo__index.578aa5c0.chunk.css +1 -0
  34. package/docs-dist/nm__dumi__dist__client__pages__Demo__index.83a2c730.async.js +1 -0
  35. package/docs-dist/nm__dumi__theme-default__layouts__DocLayout__index.e556091c.async.js +1 -0
  36. package/docs-dist/packages__plugin-eui__src__free.md.33be0665.chunk.css +1 -0
  37. package/docs-dist/packages__plugin-eui__src__free.md.9706dcd8.async.js +1 -0
  38. package/docs-dist/packages__plugin-eui__src__table-tree.md.33be0665.chunk.css +1 -0
  39. package/docs-dist/packages__plugin-eui__src__table-tree.md.63bc8653.async.js +1 -0
  40. package/docs-dist/packages__plugin-eui__src__table.md.33be0665.chunk.css +1 -0
  41. package/docs-dist/packages__plugin-eui__src__table.md.58c0aeec.async.js +1 -0
  42. package/docs-dist/packages__plugin-eui__src__tabs.md.33be0665.chunk.css +1 -0
  43. package/docs-dist/packages__plugin-eui__src__tabs.md.5cd12eb6.async.js +1 -0
  44. package/docs-dist/packages__plugin-openapi__src__index.md.33be0665.chunk.css +1 -0
  45. package/docs-dist/packages__plugin-openapi__src__index.md.ac4ed387.async.js +54 -0
  46. package/docs-dist/packages__rc-pro__src__auth__index.md.09d47ed9.async.js +1 -0
  47. package/docs-dist/packages__rc-pro__src__auth__index.md.33be0665.chunk.css +1 -0
  48. package/docs-dist/packages__rc-pro__src__button__index.md.33be0665.chunk.css +1 -0
  49. package/docs-dist/packages__rc-pro__src__button__index.md.e4392f5d.async.js +1 -0
  50. package/docs-dist/packages__rc-pro__src__cascader__index.md.33be0665.chunk.css +1 -0
  51. package/docs-dist/packages__rc-pro__src__cascader__index.md.83dd07db.async.js +1 -0
  52. package/docs-dist/packages__rc-pro__src__date-picker__index.md.1954391f.async.js +1 -0
  53. package/docs-dist/packages__rc-pro__src__date-picker__index.md.33be0665.chunk.css +1 -0
  54. package/docs-dist/packages__rc-pro__src__dialog__index.md.0ab8f5d9.async.js +1 -0
  55. package/docs-dist/packages__rc-pro__src__dialog__index.md.33be0665.chunk.css +1 -0
  56. package/docs-dist/packages__rc-pro__src__editor__index.md.33be0665.chunk.css +1 -0
  57. package/docs-dist/packages__rc-pro__src__editor__index.md.571e2c64.async.js +1 -0
  58. package/docs-dist/packages__rc-pro__src__group-form-item__index.md.33be0665.chunk.css +1 -0
  59. package/docs-dist/packages__rc-pro__src__group-form-item__index.md.ae7880a8.async.js +1 -0
  60. package/docs-dist/packages__rc-pro__src__index.md.2043702c.async.js +1 -0
  61. package/docs-dist/packages__rc-pro__src__index.md.33be0665.chunk.css +1 -0
  62. package/docs-dist/packages__rc-pro__src__interval-button__index.md.33be0665.chunk.css +1 -0
  63. package/docs-dist/packages__rc-pro__src__interval-button__index.md.4ee5873c.async.js +1 -0
  64. package/docs-dist/packages__rc-pro__src__layout-keep-alive__index.md.33be0665.chunk.css +1 -0
  65. package/docs-dist/packages__rc-pro__src__layout-keep-alive__index.md.9bbd4cba.async.js +1 -0
  66. package/docs-dist/packages__rc-pro__src__loading__index.md.33be0665.chunk.css +1 -0
  67. package/docs-dist/packages__rc-pro__src__loading__index.md.ffd4e9c3.async.js +1 -0
  68. package/docs-dist/packages__rc-pro__src__pro-table__index.md.33be0665.chunk.css +1 -0
  69. package/docs-dist/packages__rc-pro__src__pro-table__index.md.e8542cec.async.js +1 -0
  70. package/docs-dist/packages__rc-pro__src__pro-tabs__index.md.33be0665.chunk.css +1 -0
  71. package/docs-dist/packages__rc-pro__src__pro-tabs__index.md.5c2c6378.async.js +1 -0
  72. package/docs-dist/packages__rc-pro__src__result__index.md.33be0665.chunk.css +1 -0
  73. package/docs-dist/packages__rc-pro__src__result__index.md.bf4bb31c.async.js +2 -0
  74. package/docs-dist/packages__rc-pro__src__select__index.md.33be0665.chunk.css +1 -0
  75. package/docs-dist/packages__rc-pro__src__select__index.md.f739fe71.async.js +2 -0
  76. package/docs-dist/packages__rc-pro__src__time-picker__index.md.33be0665.chunk.css +1 -0
  77. package/docs-dist/packages__rc-pro__src__time-picker__index.md.cdc2078f.async.js +1 -0
  78. package/docs-dist/packages__rc-pro__src__water-mark__index.md.33be0665.chunk.css +1 -0
  79. package/docs-dist/packages__rc-pro__src__water-mark__index.md.7d0bee7d.async.js +1 -0
  80. package/docs-dist/packages__utils__src__utils__index.md.2e9b549d.async.js +1 -0
  81. package/docs-dist/packages__utils__src__utils__index.md.33be0665.chunk.css +1 -0
  82. package/docs-dist/plugin-euis/free/index.html +15 -0
  83. package/docs-dist/plugin-euis/table/index.html +15 -0
  84. package/docs-dist/plugin-euis/table-tree/index.html +15 -0
  85. package/docs-dist/plugin-euis/tabs/index.html +15 -0
  86. package/docs-dist/plugin-openapis/index.html +15 -0
  87. package/docs-dist/preload_helper.b6bb2ecb.js +1 -0
  88. package/docs-dist/pro-table__demos.ca265923.async.js +1 -0
  89. package/docs-dist/pro-tabs__demos.1edccbc5.async.js +1 -0
  90. package/docs-dist/rc-pros/auth/index.html +15 -0
  91. package/docs-dist/rc-pros/button/index.html +15 -0
  92. package/docs-dist/rc-pros/cascader/index.html +15 -0
  93. package/docs-dist/rc-pros/date-picker/index.html +15 -0
  94. package/docs-dist/rc-pros/dialog/index.html +15 -0
  95. package/docs-dist/rc-pros/editor/index.html +15 -0
  96. package/docs-dist/rc-pros/group-form-item/index.html +15 -0
  97. package/docs-dist/rc-pros/index.html +15 -0
  98. package/docs-dist/rc-pros/interval-button/index.html +15 -0
  99. package/docs-dist/rc-pros/layout-keep-alive/index.html +15 -0
  100. package/docs-dist/rc-pros/loading/index.html +15 -0
  101. package/docs-dist/rc-pros/pro-table/index.html +15 -0
  102. package/docs-dist/rc-pros/pro-tabs/index.html +15 -0
  103. package/docs-dist/rc-pros/result/index.html +15 -0
  104. package/docs-dist/rc-pros/select/index.html +15 -0
  105. package/docs-dist/rc-pros/time-picker/index.html +15 -0
  106. package/docs-dist/rc-pros/water-mark/index.html +15 -0
  107. package/docs-dist/result__demos.7ad0defe.async.js +1 -0
  108. package/docs-dist/select__demos.c6a6d803.async.js +1 -0
  109. package/docs-dist/time-picker__demos.8beda018.async.js +1 -0
  110. package/docs-dist/umi.4859fef9.js +108 -0
  111. package/docs-dist/umi.4e0bcd92.css +1 -0
  112. package/docs-dist/utils/utils/index.html +15 -0
  113. package/docs-dist/utils__demos.4d502190.async.js +1 -0
  114. package/docs-dist/water-mark__demos.26d16c3b.async.js +1 -0
  115. package/docs-dist/~demos/:id/index.html +15 -0
  116. package/docs-dist/~demos/auth-demo-basic/index.html +15 -0
  117. package/docs-dist/~demos/button-demo-button/index.html +15 -0
  118. package/docs-dist/~demos/button-demo-group/index.html +15 -0
  119. package/docs-dist/~demos/cascader-demo-basic/index.html +15 -0
  120. package/docs-dist/~demos/cascader-demo-cache/index.html +15 -0
  121. package/docs-dist/~demos/date-picker-demo-basic/index.html +15 -0
  122. package/docs-dist/~demos/date-picker-demo-range/index.html +15 -0
  123. package/docs-dist/~demos/dialog-demo-demos/index.html +15 -0
  124. package/docs-dist/~demos/editor-demo-demos/index.html +15 -0
  125. package/docs-dist/~demos/group-form-item-demo-basic/index.html +15 -0
  126. package/docs-dist/~demos/interval-button-demo-basic/index.html +15 -0
  127. package/docs-dist/~demos/loading-demo-basic/index.html +15 -0
  128. package/docs-dist/~demos/packages-plugin-eui-src-free-demo-free/index.html +15 -0
  129. package/docs-dist/~demos/packages-plugin-eui-src-table-demo-table/index.html +15 -0
  130. package/docs-dist/~demos/packages-plugin-eui-src-table-tree-demo-table-tree/index.html +15 -0
  131. package/docs-dist/~demos/packages-plugin-eui-src-tabs-demo-tabs/index.html +15 -0
  132. package/docs-dist/~demos/pro-table-demo-basic/index.html +15 -0
  133. package/docs-dist/~demos/pro-table-demo-fixed/index.html +15 -0
  134. package/docs-dist/~demos/pro-table-demo-selection/index.html +15 -0
  135. package/docs-dist/~demos/pro-tabs-demo-basic/index.html +15 -0
  136. package/docs-dist/~demos/pro-tabs-demo-tab/index.html +15 -0
  137. package/docs-dist/~demos/result-demo-basic/index.html +15 -0
  138. package/docs-dist/~demos/select-demo-api/index.html +15 -0
  139. package/docs-dist/~demos/select-demo-basic/index.html +15 -0
  140. package/docs-dist/~demos/select-demo-customize/index.html +15 -0
  141. package/docs-dist/~demos/select-demo-customize-label/index.html +15 -0
  142. package/docs-dist/~demos/time-picker-demo-basic/index.html +15 -0
  143. package/docs-dist/~demos/utils-demo-demos/index.html +15 -0
  144. package/docs-dist/~demos/water-mark-demo-basic/index.html +15 -0
  145. package/es/Foo/d +0 -0
  146. package/es/aj-captcha/index.less +9 -23
  147. package/es/auth/index.d.ts +7 -0
  148. package/es/auth/index.js +14 -0
  149. package/es/cascader/index.js +4 -4
  150. package/es/ccs.d.ts +7 -13
  151. package/es/config.js +33 -11
  152. package/es/context/index.d.ts +2 -2
  153. package/es/date-picker/index.js +20 -0
  154. package/es/dialog/button.d.ts +1 -1
  155. package/es/dialog/button.js +3 -3
  156. package/es/dialog/index.d.ts +0 -1
  157. package/es/dialog/index.js +0 -1
  158. package/es/ellipsis/index.js +4 -2
  159. package/es/ellipsis/useResizeEffect.js +10 -24
  160. package/es/group-form-item/index.d.ts +11 -0
  161. package/es/group-form-item/index.js +124 -0
  162. package/es/hooks/use-selection.d.ts +12 -23
  163. package/es/hooks/use-selection.js +51 -25
  164. package/es/index.d.ts +1 -3
  165. package/es/index.js +1 -3
  166. package/es/interval-button/index.js +4 -4
  167. package/es/layout-keep-alive/index.d.ts +1 -1
  168. package/es/layout-keep-alive/index.js +26 -20
  169. package/es/layout-keep-alive/index.less +19 -23
  170. package/es/layout-keep-alive/page.d.ts +3 -2
  171. package/es/layout-keep-alive/page.js +4 -3
  172. package/es/layout-single-page/index.d.ts +4 -2
  173. package/es/layout-single-page/index.js +12 -5
  174. package/es/layout-single-page/index.less +2 -8
  175. package/es/layout-single-page/page.d.ts +3 -1
  176. package/es/layout-single-page/page.js +2 -1
  177. package/es/pro-table/_utils.d.ts +1 -1
  178. package/es/pro-table/_utils.js +7 -7
  179. package/es/pro-table/form-item.d.ts +5 -3
  180. package/es/pro-table/form-item.js +28 -11
  181. package/es/pro-table/head.js +88 -63
  182. package/es/pro-table/index.less +20 -175
  183. package/es/pro-table/selection-alert.d.ts +4 -2
  184. package/es/pro-table/selection-alert.js +16 -4
  185. package/es/pro-table/table.d.ts +13 -24
  186. package/es/pro-table/table.js +128 -250
  187. package/es/pro-table/tree.d.ts +3 -3
  188. package/es/pro-table/tree.js +28 -17
  189. package/es/select/ modal.d.ts +3 -9
  190. package/es/select/ modal.js +63 -22
  191. package/es/select/customize.d.ts +7 -15
  192. package/es/select/customize.js +58 -48
  193. package/es/select/index.d.ts +2 -1
  194. package/es/select/index.js +9 -9
  195. package/es/table/index.js +12 -14
  196. package/es/table/index.less +0 -129
  197. package/package.json +11 -29
  198. package/LICENSE +0 -21
  199. package/README.md +0 -37
  200. package/es/breadcrumb.d.ts +0 -8
  201. package/es/breadcrumb.js +0 -40
  202. package/es/dialog/index.less +0 -16
  203. package/es/pro-grid/index.d.ts +0 -15
  204. package/es/pro-grid/index.js +0 -58
  205. package/es/trigger/index.d.ts +0 -43
  206. package/es/trigger/index.js +0 -298
  207. package/es/trigger/index.less +0 -42
  208. package/es/virtual-list/index.d.ts +0 -51
  209. package/es/virtual-list/index.js +0 -132
@@ -1,15 +1,18 @@
1
+ var _excluded = ["value", "type", "defaultRows", "keyField", "onChangeRows", "onChange"];
1
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; }
2
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; }
3
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; }
4
5
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
5
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); }
6
- 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); }
7
7
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
8
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
9
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
10
10
  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; }
11
11
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
12
12
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
14
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
15
+ 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); }
13
16
  import { useMemoizedFn, useUpdateEffect } from 'ahooks';
14
17
  import { useEffect, useRef, useState } from 'react';
15
18
  // 判断相对
@@ -21,34 +24,53 @@ function isEq(obj1, obj2) {
21
24
  }
22
25
  return JSON.stringify(o1) !== JSON.stringify(o2);
23
26
  }
27
+ function onGetKeys(value, keyField) {
28
+ if (value === undefined) return value;
29
+ if (Array.isArray(value)) {
30
+ return value.map(function (item) {
31
+ return _typeof(item) === 'object' ? item[keyField] : item;
32
+ });
33
+ }
34
+ if (_typeof(value) === 'object') {
35
+ return value[keyField];
36
+ }
37
+ return [value];
38
+ }
24
39
  export default function useTableSelection(props) {
25
40
  var _ref = props || {},
26
41
  value = _ref.value,
42
+ _ref$type = _ref.type,
43
+ type = _ref$type === void 0 ? 'checkbox' : _ref$type,
27
44
  defaultRows = _ref.defaultRows,
28
45
  _ref$keyField = _ref.keyField,
29
46
  keyField = _ref$keyField === void 0 ? 'key' : _ref$keyField,
30
- multiple = _ref.multiple,
47
+ onChangeRows = _ref.onChangeRows,
31
48
  onChangeValue = _ref.onChange,
32
- onChangeOptions = _ref.onChangeOptions;
49
+ rowSelectionProps = _objectWithoutProperties(_ref, _excluded);
33
50
  var _useState = useState({}),
34
51
  _useState2 = _slicedToArray(_useState, 2),
35
52
  setUpdate = _useState2[1];
36
53
  var selectionRef = useRef({
37
- selectedRowKeys: ['number', 'string'].includes(_typeof(value)) ? [value] : value,
54
+ selectedRowKeys: onGetKeys(value, keyField),
38
55
  selectedRows: defaultRows,
39
56
  info: {
40
57
  type: 'none'
41
58
  }
42
59
  });
60
+ var isMultiple = type === 'checkbox';
43
61
  var handleOnChange = useMemoizedFn(function () {
44
- var _selectionRef$current = selectionRef.current.selectedRowKeys,
45
- selectedRowKeys = _selectionRef$current === void 0 ? [] : _selectionRef$current;
46
- if (multiple) {
62
+ var _selectionRef$current = selectionRef.current,
63
+ _selectionRef$current2 = _selectionRef$current.selectedRowKeys,
64
+ selectedRowKeys = _selectionRef$current2 === void 0 ? [] : _selectionRef$current2,
65
+ _selectionRef$current3 = _selectionRef$current.selectedRows,
66
+ selectedRows = _selectionRef$current3 === void 0 ? [] : _selectionRef$current3;
67
+ if (isMultiple) {
47
68
  // 受控调用onChange
48
- onChangeValue === null || onChangeValue === void 0 || onChangeValue(selectedRowKeys);
69
+ onChangeValue === null || onChangeValue === void 0 || onChangeValue(selectedRowKeys, selectedRows);
49
70
  } else {
50
- onChangeValue === null || onChangeValue === void 0 || onChangeValue(selectedRowKeys[0]);
71
+ onChangeValue === null || onChangeValue === void 0 || onChangeValue(selectedRowKeys[0], selectedRows[0]);
51
72
  }
73
+ onChangeRows === null || onChangeRows === void 0 || onChangeRows(selectedRows || []);
52
74
  if (!onChangeValue) setUpdate({});
53
75
  });
54
76
 
@@ -58,22 +80,23 @@ export default function useTableSelection(props) {
58
80
  selectionRef.current.selectedRows = defaultRows;
59
81
 
60
82
  // 生成选项
61
- if (onChangeOptions) onChangeOptions(defaultRows);
83
+ if (onChangeRows) onChangeRows(defaultRows);
62
84
  setUpdate({});
63
85
  }
64
86
  }, [defaultRows]);
65
87
 
66
88
  // value 变更,与当前选中数据不匹配
67
89
  useUpdateEffect(function () {
68
- if (isEq(value, selectionRef.current.selectedRowKeys)) {
69
- var _selectionRef$current2;
70
- var rows = (_selectionRef$current2 = selectionRef.current.selectedRows) === null || _selectionRef$current2 === void 0 ? void 0 : _selectionRef$current2.filter(function () {
90
+ var newValue = onGetKeys(value, keyField);
91
+ if (isEq(newValue, selectionRef.current.selectedRowKeys)) {
92
+ var _selectionRef$current4;
93
+ var rows = (_selectionRef$current4 = selectionRef.current.selectedRows) === null || _selectionRef$current4 === void 0 ? void 0 : _selectionRef$current4.filter(function () {
71
94
  var _ref2;
72
95
  var row = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
73
- return (_ref2 = value || []) === null || _ref2 === void 0 ? void 0 : _ref2.includes(row[keyField]);
96
+ return (_ref2 = newValue || []) === null || _ref2 === void 0 ? void 0 : _ref2.includes(row[keyField]);
74
97
  });
75
98
  selectionRef.current = {
76
- selectedRowKeys: value,
99
+ selectedRowKeys: newValue === undefined && isMultiple ? [] : newValue,
77
100
  selectedRows: rows,
78
101
  info: {
79
102
  type: 'none'
@@ -101,7 +124,6 @@ export default function useTableSelection(props) {
101
124
  }
102
125
  });
103
126
  }
104
- onChangeOptions === null || onChangeOptions === void 0 || onChangeOptions(rows);
105
127
  handleOnChange();
106
128
  });
107
129
 
@@ -110,18 +132,18 @@ export default function useTableSelection(props) {
110
132
  // 未传入key,删除全部
111
133
  if (!key) {
112
134
  selectionRef.current = {
113
- selectedRowKeys: undefined,
114
- selectedRows: undefined,
135
+ selectedRowKeys: [],
136
+ selectedRows: [],
115
137
  info: {
116
138
  type: 'none'
117
139
  }
118
140
  };
119
141
  } else {
120
- var _selectionRef$current3 = selectionRef.current,
121
- _selectionRef$current4 = _selectionRef$current3.selectedRowKeys,
122
- selectedRowKeys = _selectionRef$current4 === void 0 ? [] : _selectionRef$current4,
123
- _selectionRef$current5 = _selectionRef$current3.selectedRows,
124
- selectedRows = _selectionRef$current5 === void 0 ? [] : _selectionRef$current5;
142
+ var _selectionRef$current5 = selectionRef.current,
143
+ _selectionRef$current6 = _selectionRef$current5.selectedRowKeys,
144
+ selectedRowKeys = _selectionRef$current6 === void 0 ? [] : _selectionRef$current6,
145
+ _selectionRef$current7 = _selectionRef$current5.selectedRows,
146
+ selectedRows = _selectionRef$current7 === void 0 ? [] : _selectionRef$current7;
125
147
  var newRows = selectedRows.filter(function () {
126
148
  var r = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
127
149
  return r[keyField] !== key;
@@ -139,8 +161,12 @@ export default function useTableSelection(props) {
139
161
  }
140
162
  handleOnChange();
141
163
  });
142
- return _objectSpread(_objectSpread({}, selectionRef.current), {}, {
164
+ return _objectSpread(_objectSpread(_objectSpread({}, selectionRef.current), {}, {
143
165
  onChange: onChange,
144
- onClear: onClear
166
+ onClear: onClear,
167
+ type: type
168
+ }, rowSelectionProps), {}, {
169
+ // @ts-ignore
170
+ onClearByProTable: onClear
145
171
  });
146
172
  }
package/es/index.d.ts 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;
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
1
  import CCS from "..";
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 {};