@ccs-ui/rc-pro 2.3.6-alpha-31 → 2.3.6-alpha-33

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 (162) hide show
  1. package/package.json +6 -27
  2. package/LICENSE +0 -21
  3. package/README.md +0 -37
  4. package/es/aj-captcha/index.d.ts +0 -34
  5. package/es/aj-captcha/index.js +0 -302
  6. package/es/aj-captcha/index.less +0 -89
  7. package/es/auth/index.d.ts +0 -15
  8. package/es/auth/index.js +0 -38
  9. package/es/breadcrumb.d.ts +0 -8
  10. package/es/breadcrumb.js +0 -40
  11. package/es/button/dropdown.d.ts +0 -6
  12. package/es/button/dropdown.js +0 -72
  13. package/es/button/group.d.ts +0 -2
  14. package/es/button/group.js +0 -176
  15. package/es/button/index.d.ts +0 -65
  16. package/es/button/index.js +0 -133
  17. package/es/cascader/index.d.ts +0 -33
  18. package/es/cascader/index.js +0 -120
  19. package/es/ccs.d.ts +0 -131
  20. package/es/ccs.js +0 -1
  21. package/es/color-picker/index.d.ts +0 -7
  22. package/es/color-picker/index.js +0 -142
  23. package/es/color-picker/index.less +0 -8
  24. package/es/config.d.ts +0 -6
  25. package/es/config.js +0 -126
  26. package/es/context/index.d.ts +0 -115
  27. package/es/context/index.js +0 -6
  28. package/es/date-picker/index.d.ts +0 -19
  29. package/es/date-picker/index.js +0 -72
  30. package/es/dialog/HookDrawer.d.ts +0 -9
  31. package/es/dialog/HookDrawer.js +0 -156
  32. package/es/dialog/HookModal.d.ts +0 -10
  33. package/es/dialog/HookModal.js +0 -213
  34. package/es/dialog/button.d.ts +0 -24
  35. package/es/dialog/button.js +0 -256
  36. package/es/dialog/context.d.ts +0 -25
  37. package/es/dialog/context.js +0 -13
  38. package/es/dialog/drawer-footer.d.ts +0 -16
  39. package/es/dialog/drawer-footer.js +0 -43
  40. package/es/dialog/form.d.ts +0 -16
  41. package/es/dialog/form.js +0 -53
  42. package/es/dialog/hook.d.ts +0 -80
  43. package/es/dialog/hook.js +0 -234
  44. package/es/dialog/index.d.ts +0 -19
  45. package/es/dialog/index.js +0 -14
  46. package/es/dialog/usePatchElement.d.ts +0 -5
  47. package/es/dialog/usePatchElement.js +0 -35
  48. package/es/editor/index.d.ts +0 -22
  49. package/es/editor/index.js +0 -18
  50. package/es/editor/index.less +0 -19
  51. package/es/editor/javascript.d.ts +0 -2
  52. package/es/editor/javascript.js +0 -56
  53. package/es/editor/json.d.ts +0 -7
  54. package/es/editor/json.js +0 -82
  55. package/es/editor/sql.d.ts +0 -2
  56. package/es/editor/sql.js +0 -54
  57. package/es/ellipsis/index.d.ts +0 -22
  58. package/es/ellipsis/index.js +0 -129
  59. package/es/ellipsis/index.less +0 -5
  60. package/es/ellipsis/useMeasure.d.ts +0 -9
  61. package/es/ellipsis/useMeasure.js +0 -142
  62. package/es/ellipsis/useResizeEffect.d.ts +0 -2
  63. package/es/ellipsis/useResizeEffect.js +0 -14
  64. package/es/ellipsis/withStopPropagation.d.ts +0 -4
  65. package/es/ellipsis/withStopPropagation.js +0 -38
  66. package/es/full-screen/index.d.ts +0 -3
  67. package/es/full-screen/index.js +0 -49
  68. package/es/group-form-item/index.d.ts +0 -11
  69. package/es/group-form-item/index.js +0 -124
  70. package/es/hooks/use-app.d.ts +0 -25
  71. package/es/hooks/use-app.js +0 -52
  72. package/es/hooks/use-event.d.ts +0 -10
  73. package/es/hooks/use-event.js +0 -69
  74. package/es/hooks/use-once-event.d.ts +0 -2
  75. package/es/hooks/use-once-event.js +0 -16
  76. package/es/hooks/use-page.d.ts +0 -10
  77. package/es/hooks/use-page.js +0 -10
  78. package/es/hooks/use-selection.d.ts +0 -17
  79. package/es/hooks/use-selection.js +0 -172
  80. package/es/hooks/use-tabs.d.ts +0 -2
  81. package/es/hooks/use-tabs.js +0 -10
  82. package/es/hooks/use-window.d.ts +0 -8
  83. package/es/hooks/use-window.js +0 -15
  84. package/es/index.d.ts +0 -37
  85. package/es/index.js +0 -37
  86. package/es/interval-button/index.d.ts +0 -14
  87. package/es/interval-button/index.js +0 -128
  88. package/es/layout-keep-alive/index.d.ts +0 -29
  89. package/es/layout-keep-alive/index.js +0 -400
  90. package/es/layout-keep-alive/index.less +0 -79
  91. package/es/layout-keep-alive/page.d.ts +0 -14
  92. package/es/layout-keep-alive/page.js +0 -53
  93. package/es/layout-single-page/index.d.ts +0 -14
  94. package/es/layout-single-page/index.js +0 -71
  95. package/es/layout-single-page/index.less +0 -15
  96. package/es/layout-single-page/page.d.ts +0 -13
  97. package/es/layout-single-page/page.js +0 -41
  98. package/es/loading/index.d.ts +0 -14
  99. package/es/loading/index.js +0 -43
  100. package/es/pro-grid/index.d.ts +0 -15
  101. package/es/pro-grid/index.js +0 -58
  102. package/es/pro-table/_utils.d.ts +0 -12
  103. package/es/pro-table/_utils.js +0 -94
  104. package/es/pro-table/form-item.d.ts +0 -9
  105. package/es/pro-table/form-item.js +0 -44
  106. package/es/pro-table/head.d.ts +0 -16
  107. package/es/pro-table/head.js +0 -225
  108. package/es/pro-table/index.d.ts +0 -23
  109. package/es/pro-table/index.js +0 -37
  110. package/es/pro-table/index.less +0 -82
  111. package/es/pro-table/operation.d.ts +0 -14
  112. package/es/pro-table/operation.js +0 -194
  113. package/es/pro-table/selection-alert.d.ts +0 -20
  114. package/es/pro-table/selection-alert.js +0 -64
  115. package/es/pro-table/size.d.ts +0 -10
  116. package/es/pro-table/size.js +0 -17
  117. package/es/pro-table/summary.d.ts +0 -8
  118. package/es/pro-table/summary.js +0 -32
  119. package/es/pro-table/table.d.ts +0 -104
  120. package/es/pro-table/table.js +0 -712
  121. package/es/pro-table/tree.d.ts +0 -24
  122. package/es/pro-table/tree.js +0 -197
  123. package/es/pro-tabs/index.d.ts +0 -9
  124. package/es/pro-tabs/index.js +0 -174
  125. package/es/resize-observer.d.ts +0 -15
  126. package/es/resize-observer.js +0 -37
  127. package/es/result/icon.d.ts +0 -3
  128. package/es/result/icon.js +0 -3
  129. package/es/result/index.d.ts +0 -12
  130. package/es/result/index.js +0 -68
  131. package/es/select/ modal.d.ts +0 -10
  132. package/es/select/ modal.js +0 -141
  133. package/es/select/api.d.ts +0 -25
  134. package/es/select/api.js +0 -67
  135. package/es/select/customize.d.ts +0 -25
  136. package/es/select/customize.js +0 -139
  137. package/es/select/index.d.ts +0 -31
  138. package/es/select/index.js +0 -108
  139. package/es/status-tag/index.d.ts +0 -13
  140. package/es/status-tag/index.js +0 -31
  141. package/es/table/index.d.ts +0 -19
  142. package/es/table/index.js +0 -253
  143. package/es/table/index.less +0 -29
  144. package/es/theme-dialog.d.ts +0 -28
  145. package/es/theme-dialog.js +0 -81
  146. package/es/time-picker/index.d.ts +0 -15
  147. package/es/time-picker/index.js +0 -49
  148. package/es/trigger/index.d.ts +0 -43
  149. package/es/trigger/index.js +0 -298
  150. package/es/trigger/index.less +0 -42
  151. package/es/types.d.ts +0 -0
  152. package/es/types.js +0 -0
  153. package/es/upload/index.d.ts +0 -42
  154. package/es/upload/index.js +0 -167
  155. package/es/upload/upload-image.d.ts +0 -6
  156. package/es/upload/upload-image.js +0 -205
  157. package/es/virtual-list/index.d.ts +0 -51
  158. package/es/virtual-list/index.js +0 -132
  159. package/es/water-mark/index.d.ts +0 -65
  160. package/es/water-mark/index.js +0 -141
  161. package/es/water-mark/relative.d.ts +0 -62
  162. package/es/water-mark/relative.js +0 -130
@@ -1,129 +0,0 @@
1
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
- 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."); }
3
- 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); }
4
- 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; }
5
- 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; } }
6
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
- import { CopyOutlined } from '@ant-design/icons';
8
- import CcsUtils from '@ccs-ui/utils';
9
- import { Tooltip } from 'antd';
10
- import React from 'react';
11
- import CcsDialog from "../dialog";
12
- import "./index.less";
13
- import useMeasure from "./useMeasure";
14
- import { useResizeEffect } from "./useResizeEffect";
15
- import { withStopPropagation } from "./withStopPropagation";
16
- import { jsx as _jsx } from "react/jsx-runtime";
17
- import { jsxs as _jsxs } from "react/jsx-runtime";
18
- import { Fragment as _Fragment } from "react/jsx-runtime";
19
- var classPrefix = "ccs-ellipsis";
20
- var defaultProps = {
21
- direction: 'end',
22
- rows: 1,
23
- expandText: '',
24
- content: '',
25
- collapseText: '',
26
- stopPropagationForActionButtons: [],
27
- onContentClick: function onContentClick() {},
28
- defaultExpanded: false,
29
- showTooltip: false
30
- };
31
-
32
- /**
33
- * 文本缩略
34
- * @param EllipsisProps
35
- * @returns
36
- */
37
- var Ellipsis = function Ellipsis(p) {
38
- var props = CcsUtils.mergeProps(defaultProps, p);
39
- var direction = props.direction,
40
- rows = props.rows,
41
- expandText = props.expandText,
42
- collapseText = props.collapseText,
43
- stopPropagationForActionButtons = props.stopPropagationForActionButtons,
44
- onContentClick = props.onContentClick,
45
- defaultExpanded = props.defaultExpanded,
46
- showTooltip = props.showTooltip;
47
- var content = props.content === null ? '' : props.content.toString();
48
-
49
- // ============================ Refs ============================
50
- var rootRef = React.useRef(null);
51
-
52
- // ========================== Expanded ==========================
53
- var _React$useState = React.useState(defaultExpanded),
54
- _React$useState2 = _slicedToArray(_React$useState, 2),
55
- expanded = _React$useState2[0],
56
- setExpanded = _React$useState2[1];
57
- var expandNode = expandText ? withStopPropagation(stopPropagationForActionButtons, /*#__PURE__*/_jsx("a", {
58
- onClick: function onClick() {
59
- setExpanded(true);
60
- },
61
- children: expandText
62
- })) : null;
63
- var collapseNode = collapseText ? withStopPropagation(stopPropagationForActionButtons, /*#__PURE__*/_jsx("a", {
64
- onClick: function onClick() {
65
- setExpanded(false);
66
- },
67
- children: collapseText
68
- })) : null;
69
-
70
- // ========================== Ellipsis ==========================
71
- var _useMeasure = useMeasure(content, rows, direction, expanded, expandNode, collapseNode),
72
- _useMeasure2 = _slicedToArray(_useMeasure, 3),
73
- measureNodes = _useMeasure2[0],
74
- status = _useMeasure2[1],
75
- forceResize = _useMeasure2[2];
76
- useResizeEffect(forceResize, rootRef);
77
-
78
- // =========================== Render ===========================
79
- var renderNode = /*#__PURE__*/_jsx("div", {
80
- ref: rootRef,
81
- className: classPrefix,
82
- onClick: function onClick(e) {
83
- if (e.target === e.currentTarget) {
84
- onContentClick(e);
85
- }
86
- },
87
- children: measureNodes
88
- });
89
- if (status === 100 || !showTooltip) {
90
- return renderNode;
91
- }
92
- if (showTooltip) {
93
- return /*#__PURE__*/_jsx(Tooltip, {
94
- zIndex: 9999,
95
- title: function title() {
96
- return /*#__PURE__*/_jsxs(_Fragment, {
97
- children: [content, /*#__PURE__*/_jsxs("a", {
98
- style: {
99
- color: 'gray',
100
- display: 'block'
101
- },
102
- onClick: function onClick() {
103
- var _CcsDialog$message;
104
- CcsUtils.copy(content);
105
- (_CcsDialog$message = CcsDialog.message) === null || _CcsDialog$message === void 0 || _CcsDialog$message.info('复制成功');
106
- },
107
- children: [/*#__PURE__*/_jsx(CopyOutlined, {
108
- style: {
109
- marginRight: 5
110
- }
111
- }), "\u590D\u5236"]
112
- })]
113
- });
114
- },
115
- placement: "bottomLeft",
116
- destroyTooltipOnHide: true,
117
- styles: {
118
- body: {
119
- whiteSpace: 'normal'
120
- }
121
- },
122
- children: renderNode
123
- });
124
- }
125
- };
126
- if (process.env.NODE_ENV !== 'production') {
127
- Ellipsis.displayName = 'CcsEllipsis';
128
- }
129
- export default Ellipsis;
@@ -1,5 +0,0 @@
1
- .ccs-ellipsis {
2
- overflow: hidden;
3
- line-height: 1.5;
4
- word-break: break-word;
5
- }
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- declare const enum MEASURE_STATUS {
3
- PREPARE = 1,
4
- MEASURE_WALKING = 2,
5
- STABLE_ELLIPSIS = 99,
6
- STABLE_NO_ELLIPSIS = 100
7
- }
8
- export default function useMeasure(content: string, rows: number, direction: 'start' | 'end' | 'middle', expanded: boolean, expandNode: React.ReactElement | null, collapseNode: React.ReactElement | null): readonly [import("react/jsx-runtime").JSX.Element, MEASURE_STATUS, () => void];
9
- export {};
@@ -1,142 +0,0 @@
1
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
- 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."); }
3
- 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); }
4
- 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; }
5
- 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; } }
6
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
- import { useEvent } from 'rc-util';
8
- import React from 'react';
9
- import { unstable_batchedUpdates } from 'react-dom';
10
- import runes from 'runes2';
11
- import { Fragment as _Fragment } from "react/jsx-runtime";
12
- import { jsxs as _jsxs } from "react/jsx-runtime";
13
- import { jsx as _jsx } from "react/jsx-runtime";
14
- var ELLIPSIS_TEXT = '...';
15
- var measureStyle = {
16
- visibility: 'hidden',
17
- whiteSpace: 'inherit',
18
- lineHeight: 'inherit',
19
- fontSize: 'inherit'
20
- };
21
- export default function useMeasure(content, rows, direction, expanded, expandNode, collapseNode) {
22
- var contentChars = React.useMemo(function () {
23
- return runes(content);
24
- }, [content]);
25
- var _React$useState = React.useState(0),
26
- _React$useState2 = _slicedToArray(_React$useState, 2),
27
- maxHeight = _React$useState2[0],
28
- setMaxHeight = _React$useState2[1];
29
- var _React$useState3 = React.useState([0, 0]),
30
- _React$useState4 = _slicedToArray(_React$useState3, 2),
31
- walkingIndexes = _React$useState4[0],
32
- setWalkingIndexes = _React$useState4[1];
33
- var midIndex = Math.ceil((walkingIndexes[0] + walkingIndexes[1]) / 2);
34
- var _React$useState5 = React.useState(100),
35
- _React$useState6 = _slicedToArray(_React$useState5, 2),
36
- status = _React$useState6[0],
37
- setStatus = _React$useState6[1];
38
-
39
- // ============================ Refs ============================
40
- var singleRowMeasureRef = React.useRef(null);
41
- var fullMeasureRef = React.useRef(null);
42
- var midMeasureRef = React.useRef(null);
43
- var startMeasure = useEvent(function () {
44
- // use batch update to avoid async update trigger 2 render
45
- unstable_batchedUpdates(function () {
46
- setStatus(1);
47
- setWalkingIndexes([0, direction === 'middle' ? Math.ceil(contentChars.length / 2) : contentChars.length]);
48
- });
49
- });
50
-
51
- // Initialize
52
- React.useLayoutEffect(function () {
53
- startMeasure();
54
- }, [contentChars, rows]);
55
-
56
- // Measure element height
57
- React.useLayoutEffect(function () {
58
- if (status === 1) {
59
- var _fullMeasureRef$curre, _singleRowMeasureRef$;
60
- var fullMeasureHeight = ((_fullMeasureRef$curre = fullMeasureRef.current) === null || _fullMeasureRef$curre === void 0 ? void 0 : _fullMeasureRef$curre.offsetHeight) || 0;
61
- var singleRowMeasureHeight = ((_singleRowMeasureRef$ = singleRowMeasureRef.current) === null || _singleRowMeasureRef$ === void 0 ? void 0 : _singleRowMeasureRef$.offsetHeight) || 0;
62
- var rowMeasureHeight = singleRowMeasureHeight * (rows + 0.5);
63
- if (fullMeasureHeight <= rowMeasureHeight) {
64
- setStatus(100);
65
- } else {
66
- setMaxHeight(rowMeasureHeight);
67
- setStatus(2);
68
- }
69
- }
70
- }, [status]);
71
-
72
- // Walking measure
73
- React.useLayoutEffect(function () {
74
- if (status === 2) {
75
- var _midMeasureRef$curren;
76
- var diff = walkingIndexes[1] - walkingIndexes[0];
77
- var midHeight = ((_midMeasureRef$curren = midMeasureRef.current) === null || _midMeasureRef$curren === void 0 ? void 0 : _midMeasureRef$curren.offsetHeight) || 0;
78
- if (diff > 1) {
79
- if (midHeight > maxHeight) {
80
- setWalkingIndexes([walkingIndexes[0], midIndex]);
81
- } else {
82
- setWalkingIndexes([midIndex, walkingIndexes[1]]);
83
- }
84
- } else {
85
- if (midHeight > maxHeight) {
86
- setWalkingIndexes([walkingIndexes[0], walkingIndexes[0]]);
87
- } else {
88
- setWalkingIndexes([walkingIndexes[1], walkingIndexes[1]]);
89
- }
90
- setStatus(99);
91
- }
92
- }
93
- }, [status, walkingIndexes]);
94
-
95
- // =========================== Render ===========================
96
- /** Render by cut index */
97
- var renderContent = function renderContent(index) {
98
- var prefixContent = contentChars.slice(0, index);
99
- var suffixContent = contentChars.slice(contentChars.length - index);
100
- return /*#__PURE__*/_jsxs(_Fragment, {
101
- children: [direction === 'start' && /*#__PURE__*/_jsxs(_Fragment, {
102
- children: [expandNode, ELLIPSIS_TEXT]
103
- }), direction !== 'start' && prefixContent.join(''), direction === 'middle' && /*#__PURE__*/_jsx(_Fragment, {
104
- children: expandNode ? /*#__PURE__*/_jsxs(_Fragment, {
105
- children: [ELLIPSIS_TEXT, expandNode, ELLIPSIS_TEXT]
106
- }) : ELLIPSIS_TEXT
107
- }), direction !== 'end' && suffixContent.join(''), direction === 'end' && /*#__PURE__*/_jsxs(_Fragment, {
108
- children: [ELLIPSIS_TEXT, expandNode]
109
- })]
110
- });
111
- };
112
- var finalContent = React.useMemo(function () {
113
- if (expanded || status === 100) {
114
- return /*#__PURE__*/_jsxs(React.Fragment, {
115
- children: [content, status === 99 && collapseNode]
116
- }, "display");
117
- }
118
- if (status === 99) {
119
- return renderContent(midIndex);
120
- }
121
- return null;
122
- }, [expanded, status, content, collapseNode, midIndex]);
123
- var allNodes = /*#__PURE__*/_jsxs(_Fragment, {
124
- children: [status === 1 && /*#__PURE__*/_jsxs("div", {
125
- "aria-hidden": true,
126
- ref: fullMeasureRef,
127
- style: measureStyle,
128
- children: [content, expandNode]
129
- }, "full"), status === 1 && /*#__PURE__*/_jsx("div", {
130
- "aria-hidden": true,
131
- ref: singleRowMeasureRef,
132
- style: measureStyle,
133
- children: "\xA0"
134
- }, "stable"), status === 2 && /*#__PURE__*/_jsx("div", {
135
- "aria-hidden": true,
136
- ref: midMeasureRef,
137
- style: measureStyle,
138
- children: renderContent(midIndex)
139
- }, "walking-mid"), finalContent]
140
- });
141
- return [allNodes, status, startMeasure];
142
- }
@@ -1,2 +0,0 @@
1
- import { RefObject } from 'react';
2
- export declare function useResizeEffect<T extends HTMLElement>(effect: (target: T) => void, targetRef: RefObject<T>): void;
@@ -1,14 +0,0 @@
1
- import { useDebounceEffect, useMemoizedFn, useSize } from 'ahooks';
2
- import { useRef } from 'react';
3
- export function useResizeEffect(effect, targetRef) {
4
- var fn = useMemoizedFn(effect);
5
- var widthRef = useRef();
6
- var size = useSize(targetRef);
7
- useDebounceEffect(function () {
8
- if ((size === null || size === void 0 ? void 0 : size.width) === 0 || (size === null || size === void 0 ? void 0 : size.width) === widthRef.current) return;
9
- fn(targetRef.current);
10
- widthRef.current = size === null || size === void 0 ? void 0 : size.width;
11
- }, [size === null || size === void 0 ? void 0 : size.width], {
12
- wait: 500
13
- });
14
- }
@@ -1,4 +0,0 @@
1
- import type { ReactElement } from 'react';
2
- import React from 'react';
3
- export type PropagationEvent = 'click' | 'touchstart';
4
- export declare function withStopPropagation(events: PropagationEvent[], element: ReactElement): ReactElement<any, string | React.JSXElementConstructor<any>>;
@@ -1,38 +0,0 @@
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 _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
3
- 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); }
4
- 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; }
5
- 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; }
6
- 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; }
7
- 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; }
8
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
9
- 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); }
10
- import React from 'react';
11
- var eventToPropRecord = {
12
- click: 'onClick',
13
- touchstart: 'onTouchStart'
14
- };
15
- export function withStopPropagation(events, element) {
16
- var props = _objectSpread({}, element.props);
17
- var _iterator = _createForOfIteratorHelper(events),
18
- _step;
19
- try {
20
- var _loop = function _loop() {
21
- var key = _step.value;
22
- var prop = eventToPropRecord[key];
23
- props[prop] = function (e) {
24
- var _element$props$prop, _element$props;
25
- e.stopPropagation();
26
- (_element$props$prop = (_element$props = element.props)[prop]) === null || _element$props$prop === void 0 || _element$props$prop.call(_element$props, e);
27
- };
28
- };
29
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
30
- _loop();
31
- }
32
- } catch (err) {
33
- _iterator.e(err);
34
- } finally {
35
- _iterator.f();
36
- }
37
- return /*#__PURE__*/React.cloneElement(element, props);
38
- }
@@ -1,3 +0,0 @@
1
- export default function FullScreen({ onFullScreen, }: {
2
- onFullScreen: (isFull: boolean) => void;
3
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,49 +0,0 @@
1
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
- 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."); }
3
- 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); }
4
- 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; }
5
- 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; } }
6
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
- import { FullscreenExitOutlined, FullscreenOutlined } from '@ant-design/icons';
8
- import { Button, Tooltip } from 'antd';
9
- import { useState } from 'react';
10
- import { classPrefix } from "../pro-table/table";
11
- import { jsx as _jsx } from "react/jsx-runtime";
12
- export default function FullScreen(_ref) {
13
- var onFullScreen = _ref.onFullScreen;
14
- var _useState = useState(false),
15
- _useState2 = _slicedToArray(_useState, 2),
16
- isFull = _useState2[0],
17
- setIsFull = _useState2[1];
18
- var handleOnFullScreen = function handleOnFullScreen() {
19
- setIsFull(!isFull);
20
- onFullScreen(!isFull);
21
- };
22
- return /*#__PURE__*/_jsx(Tooltip, {
23
- title: isFull ? '取消全屏' : '全屏',
24
- children: isFull ? /*#__PURE__*/_jsx(Button, {
25
- onClick: function onClick() {
26
- return handleOnFullScreen();
27
- },
28
- icon: /*#__PURE__*/_jsx(FullscreenExitOutlined, {
29
- className: "".concat(classPrefix, "-icon")
30
- }),
31
- type: "text",
32
- style: {
33
- width: 24
34
- }
35
- }) : /*#__PURE__*/_jsx(Button, {
36
- onClick: function onClick() {
37
- return handleOnFullScreen();
38
- },
39
- icon: /*#__PURE__*/_jsx(FullscreenOutlined, {
40
- className: "".concat(classPrefix, "-icon")
41
- }),
42
- type: "text",
43
- style: {
44
- width: 24
45
- },
46
- className: "ccs-pl-fullbtn"
47
- })
48
- });
49
- }
@@ -1,11 +0,0 @@
1
- import { FormItemProps } from 'antd';
2
- import { NamePath } from 'antd/es/form/interface';
3
- export type GroupFormItemProps = FormItemProps & {
4
- /** 组表单项名称 */
5
- groupItemNames: NamePath[];
6
- };
7
- declare function GroupFormItem({ groupItemNames, name, ...formItemProps }: GroupFormItemProps): import("react/jsx-runtime").JSX.Element;
8
- declare namespace GroupFormItem {
9
- var displayName: string;
10
- }
11
- export default GroupFormItem;
@@ -1,124 +0,0 @@
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
- var _excluded = ["groupItemNames", "name"];
3
- 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; }
4
- 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; }
5
- 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; }
6
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
- 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); }
8
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
9
- 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."); }
10
- 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; } }
11
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12
- 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; }
13
- 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; }
14
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
15
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
16
- 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); }
17
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
18
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
19
- 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; }
20
- import { useUpdateEffect } from 'ahooks';
21
- import { Form } from 'antd';
22
- import { useEffect, useState } from 'react';
23
- import { getDataByNamePath } from "../select";
24
- import { jsx as _jsx } from "react/jsx-runtime";
25
- import { Fragment as _Fragment } from "react/jsx-runtime";
26
- import { jsxs as _jsxs } from "react/jsx-runtime";
27
- var FormUpdateItem = function FormUpdateItem(_ref) {
28
- var name = _ref.name,
29
- getFieldsValue = _ref.getFieldsValue,
30
- setFieldValue = _ref.setFieldValue,
31
- getFieldValue = _ref.getFieldValue,
32
- groupItemNames = _ref.groupItemNames;
33
- var nameValue = getFieldValue(name);
34
- useEffect(function () {
35
- // 初始值
36
- var initialValues = getFieldsValue(true);
37
- var initNameValue = [];
38
-
39
- // 根据子项初始值设置name的默认值
40
- groupItemNames.forEach(function (item) {
41
- initNameValue.push(getDataByNamePath(initialValues, item));
42
- });
43
-
44
- // 如果子项有初始值,则设置name的默认值
45
- if (initNameValue.filter(function (n) {
46
- return n !== undefined;
47
- }).length > 0) {
48
- setFieldValue(name, initNameValue);
49
- return;
50
- }
51
-
52
- // 如果子项没有初始值,主项有初始值
53
- var groupNameValue = getDataByNamePath(initialValues, name);
54
- if (Array.isArray(groupNameValue)) {
55
- groupItemNames.forEach(function (item, index) {
56
- setFieldValue(item, groupNameValue[index]);
57
- });
58
- }
59
- }, []);
60
-
61
- // 依赖主字段变更,更新子项属性值
62
- useUpdateEffect(function () {
63
- setTimeout(function () {
64
- groupItemNames.forEach(function (item, index) {
65
- setFieldValue(item, Array.isArray(nameValue) ? nameValue[index] : undefined);
66
- });
67
- }, 1);
68
- }, [nameValue]);
69
- return null;
70
- };
71
- function onGetNameValue() {
72
- var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
73
- var name = arguments.length > 1 ? arguments[1] : undefined;
74
- if (!obj) return undefined;
75
- if (Array.isArray(name)) {
76
- var names = _toConsumableArray(name);
77
- var newName = names.shift();
78
- if (names.length === 0) return obj[newName];
79
- return onGetNameValue(obj[newName], names);
80
- }
81
- return obj[name];
82
- }
83
- function GroupFormItem(_ref2) {
84
- var groupItemNames = _ref2.groupItemNames,
85
- name = _ref2.name,
86
- formItemProps = _objectWithoutProperties(_ref2, _excluded);
87
- var _useState = useState(name || "_".concat(JSON.stringify(groupItemNames).replace(/[^a-zA-Z]/g, ''), "_")),
88
- _useState2 = _slicedToArray(_useState, 1),
89
- itemName = _useState2[0];
90
- return /*#__PURE__*/_jsxs(_Fragment, {
91
- children: [/*#__PURE__*/_jsx(Form.Item, _objectSpread({
92
- name: itemName
93
- }, formItemProps)), groupItemNames && groupItemNames.length > 0 && /*#__PURE__*/_jsxs(_Fragment, {
94
- children: [/*#__PURE__*/_jsx(Form.Item, {
95
- noStyle: true,
96
- shouldUpdate: function shouldUpdate(l, r) {
97
- return onGetNameValue(l, itemName) !== onGetNameValue(r, itemName);
98
- },
99
- children: function children(_ref3) {
100
- var getFieldsValue = _ref3.getFieldsValue,
101
- setFieldValue = _ref3.setFieldValue,
102
- getFieldValue = _ref3.getFieldValue;
103
- return /*#__PURE__*/_jsx(FormUpdateItem, {
104
- getFieldsValue: getFieldsValue,
105
- setFieldValue: setFieldValue,
106
- getFieldValue: getFieldValue,
107
- groupItemNames: groupItemNames,
108
- name: itemName
109
- });
110
- }
111
- }), groupItemNames.map(function (item, index) {
112
- return /*#__PURE__*/_jsx(Form.Item, {
113
- noStyle: true,
114
- name: item,
115
- hidden: true
116
- }, index);
117
- })]
118
- })]
119
- });
120
- }
121
- if (process.env.NODE_ENV !== 'production') {
122
- GroupFormItem.displayName = 'CcsGroupFormItem';
123
- }
124
- export default GroupFormItem;
@@ -1,25 +0,0 @@
1
- /**
2
- * app配置
3
- * @returns
4
- */
5
- declare const useAppConfig: () => import("../context").CssAppConfigType;
6
- export declare const useProTableFields: () => {
7
- dataSource: string[];
8
- total: string[];
9
- requestParam: {
10
- pageNo: string[];
11
- pageSize: string[];
12
- query?: string[] | undefined;
13
- orderProps?: string[] | undefined;
14
- filters?: string[] | undefined;
15
- };
16
- };
17
- export declare const useProTableTreeFields: () => {
18
- dataSource: string[];
19
- };
20
- export declare const useDialogFields: () => {
21
- success: string[];
22
- successTag: any;
23
- errorMsg: string[];
24
- };
25
- export default useAppConfig;
@@ -1,52 +0,0 @@
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); }
7
- import { useContext } from 'react';
8
- import { AppConfigContext } from "../context";
9
-
10
- /**
11
- * app配置
12
- * @returns
13
- */
14
- var useAppConfig = function useAppConfig() {
15
- var context = useContext(AppConfigContext);
16
- if (context === undefined) {
17
- throw new Error('AppConfigContext not found 未全局使用 CcsAppConfig');
18
- }
19
- return context;
20
- };
21
- export var useProTableFields = function useProTableFields() {
22
- var _context$fieldNames;
23
- var context = useContext(AppConfigContext) || {};
24
- return _objectSpread({
25
- dataSource: ['data', 'result'],
26
- total: ['data', 'totalNum'],
27
- requestParam: {
28
- pageNo: ['pageNo'],
29
- pageSize: ['pageSize'],
30
- filters: ['filters'],
31
- orderProps: ['orderProps'],
32
- query: ['query']
33
- }
34
- }, context === null || context === void 0 || (_context$fieldNames = context.fieldNames) === null || _context$fieldNames === void 0 ? void 0 : _context$fieldNames.proTable);
35
- };
36
- export var useProTableTreeFields = function useProTableTreeFields() {
37
- var _context$fieldNames2;
38
- var context = useContext(AppConfigContext) || {};
39
- return _objectSpread({
40
- dataSource: ['data']
41
- }, context === null || context === void 0 || (_context$fieldNames2 = context.fieldNames) === null || _context$fieldNames2 === void 0 ? void 0 : _context$fieldNames2.proTableTree);
42
- };
43
- export var useDialogFields = function useDialogFields() {
44
- var _context$fieldNames3;
45
- var context = useContext(AppConfigContext) || {};
46
- return _objectSpread({
47
- success: ['success'],
48
- successTag: true,
49
- errorMsg: ['msg']
50
- }, context === null || context === void 0 || (_context$fieldNames3 = context.fieldNames) === null || _context$fieldNames3 === void 0 ? void 0 : _context$fieldNames3.dialog);
51
- };
52
- export default useAppConfig;
@@ -1,10 +0,0 @@
1
- export declare class EventInstance<T = any, ActionType = any> {
2
- private subscriptions;
3
- emit: (val: T, actionType?: ActionType) => void;
4
- useSubscription: (callback: (val: T) => void, actionType?: ActionType) => T;
5
- }
6
- /**
7
- * 组件消息订阅方式传值
8
- * @returns
9
- */
10
- export default function Event<T = void, ActionType = any>(): EventInstance<T, ActionType>;