ebaoferc 0.1.3 → 0.1.5
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.
- package/LICENSE +21 -21
- package/README.md +43 -43
- package/dist/components/MindGraph/core/graphic/drag.js +15 -15
- package/dist/components/MindGraph/core/graphic/index.js +105 -105
- package/dist/components/MindGraph/core/helper/depth-first-walk-tree.js +4 -4
- package/dist/components/MindGraph/core/helper/descendant.js +3 -3
- package/dist/components/MindGraph/core/helper/get-layout-calc-children.js +6 -6
- package/dist/components/MindGraph/core/helper/judge-if-all-child-fold.js +4 -4
- package/dist/components/MindGraph/core/helper/judge-if-heir-and-fold.js +6 -6
- package/dist/components/MindGraph/core/helper/judge-if-visual-leaf.js +3 -3
- package/dist/components/MindGraph/core/index.d.ts +2 -6
- package/dist/components/MindGraph/core/index.js +26 -26
- package/dist/components/MindGraph/core/process/layout/structured/get-node-cross-boundary.js +7 -7
- package/dist/components/MindGraph/core/process/layout/type.js +20 -20
- package/dist/components/MindGraph/core/process/visible.js +3 -3
- package/dist/components/MindGraph/react/component/index.module.less +71 -71
- package/dist/components/MindGraph/react/scrollbar/axis/index.module.less +47 -47
- package/dist/components/SectionTitleBar/index.less +31 -31
- package/dist/components/SliderVerify/style.module.less +119 -119
- package/dist/components/StyledQueryFilter/index.less +26 -34
- package/dist/components/StyledTable/index.less +17 -17
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/useTabsTablePagination/index.d.ts +11 -12
- package/dist/hooks/useTabsTablePagination/index.js +29 -12
- package/dist/utils/format/index.js +10 -10
- package/package.json +4 -2
|
@@ -1,119 +1,119 @@
|
|
|
1
|
-
.slider {
|
|
2
|
-
background-color: #fff;
|
|
3
|
-
width: 278px;
|
|
4
|
-
z-index: 999;
|
|
5
|
-
box-sizing: border-box;
|
|
6
|
-
padding: 9px;
|
|
7
|
-
border-radius: 6px;
|
|
8
|
-
box-shadow: 0 0 11px 0 #999;
|
|
9
|
-
user-select: none;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.slider .content {
|
|
13
|
-
width: 100%;
|
|
14
|
-
height: 159px;
|
|
15
|
-
position: relative;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.bg-img-div {
|
|
19
|
-
width: 100%;
|
|
20
|
-
height: 100%;
|
|
21
|
-
position: absolute;
|
|
22
|
-
transform: translate(0, 0);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.slider-img-div {
|
|
26
|
-
height: 100%;
|
|
27
|
-
position: absolute;
|
|
28
|
-
transform: translate(0, 0);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.bg-img-div img {
|
|
32
|
-
width: 100%;
|
|
33
|
-
-webkit-user-drag: none;
|
|
34
|
-
-khtml-user-drag: none;
|
|
35
|
-
-moz-user-drag: none;
|
|
36
|
-
-o-user-drag: none;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.slider-img-div img {
|
|
40
|
-
height: 100%;
|
|
41
|
-
-webkit-user-drag: none;
|
|
42
|
-
-khtml-user-drag: none;
|
|
43
|
-
-moz-user-drag: none;
|
|
44
|
-
-o-user-drag: none;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.slider .slider-move {
|
|
48
|
-
width: 100%;
|
|
49
|
-
margin: 11px 0;
|
|
50
|
-
position: relative;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.slider .bottom {
|
|
54
|
-
width: 100%;
|
|
55
|
-
display: flex;
|
|
56
|
-
justify-content: flex-end;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.refresh-btn,
|
|
60
|
-
.close-btn {
|
|
61
|
-
display: inline-block;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.slider-move .slider-move-track {
|
|
65
|
-
line-height: 32px;
|
|
66
|
-
font-size: 14px;
|
|
67
|
-
text-align: center;
|
|
68
|
-
white-space: nowrap;
|
|
69
|
-
color: #88949d;
|
|
70
|
-
user-select: none;
|
|
71
|
-
border-radius: 20px;
|
|
72
|
-
background: #dfe1e2;
|
|
73
|
-
box-shadow: inset 0 0 4px 0 rgba(0, 0, 0, 15%);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.slider-move .slider-move-btn {
|
|
77
|
-
transform: translate(0, 0);
|
|
78
|
-
position: absolute;
|
|
79
|
-
top: -8px;
|
|
80
|
-
left: 0;
|
|
81
|
-
width: 48px;
|
|
82
|
-
height: 48px;
|
|
83
|
-
-webkit-user-drag: none;
|
|
84
|
-
-khtml-user-drag: none;
|
|
85
|
-
-moz-user-drag: none;
|
|
86
|
-
-o-user-drag: none;
|
|
87
|
-
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 30%), inset 0 0 6px 0 rgba(0, 0, 0, 5%);
|
|
88
|
-
background-color: white;
|
|
89
|
-
border-radius: 50%;
|
|
90
|
-
display: flex;
|
|
91
|
-
justify-content: center;
|
|
92
|
-
align-items: center;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.slider-move .slider-move-btn-img {
|
|
96
|
-
-webkit-user-drag: none;
|
|
97
|
-
-khtml-user-drag: none;
|
|
98
|
-
-moz-user-drag: none;
|
|
99
|
-
-o-user-drag: none;
|
|
100
|
-
display: flex;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.slider-move-btn:hover,
|
|
104
|
-
.close-btn:hover,
|
|
105
|
-
.refresh-btn:hover {
|
|
106
|
-
cursor: pointer;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.bottom .close-btn {
|
|
110
|
-
width: 20px;
|
|
111
|
-
height: 20px;
|
|
112
|
-
margin: 5px;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.bottom .refresh-btn {
|
|
116
|
-
width: 20px;
|
|
117
|
-
height: 20px;
|
|
118
|
-
margin: 5px;
|
|
119
|
-
}
|
|
1
|
+
.slider {
|
|
2
|
+
background-color: #fff;
|
|
3
|
+
width: 278px;
|
|
4
|
+
z-index: 999;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
padding: 9px;
|
|
7
|
+
border-radius: 6px;
|
|
8
|
+
box-shadow: 0 0 11px 0 #999;
|
|
9
|
+
user-select: none;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.slider .content {
|
|
13
|
+
width: 100%;
|
|
14
|
+
height: 159px;
|
|
15
|
+
position: relative;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.bg-img-div {
|
|
19
|
+
width: 100%;
|
|
20
|
+
height: 100%;
|
|
21
|
+
position: absolute;
|
|
22
|
+
transform: translate(0, 0);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.slider-img-div {
|
|
26
|
+
height: 100%;
|
|
27
|
+
position: absolute;
|
|
28
|
+
transform: translate(0, 0);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.bg-img-div img {
|
|
32
|
+
width: 100%;
|
|
33
|
+
-webkit-user-drag: none;
|
|
34
|
+
-khtml-user-drag: none;
|
|
35
|
+
-moz-user-drag: none;
|
|
36
|
+
-o-user-drag: none;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.slider-img-div img {
|
|
40
|
+
height: 100%;
|
|
41
|
+
-webkit-user-drag: none;
|
|
42
|
+
-khtml-user-drag: none;
|
|
43
|
+
-moz-user-drag: none;
|
|
44
|
+
-o-user-drag: none;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.slider .slider-move {
|
|
48
|
+
width: 100%;
|
|
49
|
+
margin: 11px 0;
|
|
50
|
+
position: relative;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.slider .bottom {
|
|
54
|
+
width: 100%;
|
|
55
|
+
display: flex;
|
|
56
|
+
justify-content: flex-end;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.refresh-btn,
|
|
60
|
+
.close-btn {
|
|
61
|
+
display: inline-block;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.slider-move .slider-move-track {
|
|
65
|
+
line-height: 32px;
|
|
66
|
+
font-size: 14px;
|
|
67
|
+
text-align: center;
|
|
68
|
+
white-space: nowrap;
|
|
69
|
+
color: #88949d;
|
|
70
|
+
user-select: none;
|
|
71
|
+
border-radius: 20px;
|
|
72
|
+
background: #dfe1e2;
|
|
73
|
+
box-shadow: inset 0 0 4px 0 rgba(0, 0, 0, 15%);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.slider-move .slider-move-btn {
|
|
77
|
+
transform: translate(0, 0);
|
|
78
|
+
position: absolute;
|
|
79
|
+
top: -8px;
|
|
80
|
+
left: 0;
|
|
81
|
+
width: 48px;
|
|
82
|
+
height: 48px;
|
|
83
|
+
-webkit-user-drag: none;
|
|
84
|
+
-khtml-user-drag: none;
|
|
85
|
+
-moz-user-drag: none;
|
|
86
|
+
-o-user-drag: none;
|
|
87
|
+
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 30%), inset 0 0 6px 0 rgba(0, 0, 0, 5%);
|
|
88
|
+
background-color: white;
|
|
89
|
+
border-radius: 50%;
|
|
90
|
+
display: flex;
|
|
91
|
+
justify-content: center;
|
|
92
|
+
align-items: center;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.slider-move .slider-move-btn-img {
|
|
96
|
+
-webkit-user-drag: none;
|
|
97
|
+
-khtml-user-drag: none;
|
|
98
|
+
-moz-user-drag: none;
|
|
99
|
+
-o-user-drag: none;
|
|
100
|
+
display: flex;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.slider-move-btn:hover,
|
|
104
|
+
.close-btn:hover,
|
|
105
|
+
.refresh-btn:hover {
|
|
106
|
+
cursor: pointer;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.bottom .close-btn {
|
|
110
|
+
width: 20px;
|
|
111
|
+
height: 20px;
|
|
112
|
+
margin: 5px;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.bottom .refresh-btn {
|
|
116
|
+
width: 20px;
|
|
117
|
+
height: 20px;
|
|
118
|
+
margin: 5px;
|
|
119
|
+
}
|
|
@@ -1,34 +1,26 @@
|
|
|
1
|
-
.custom-styled-query-filter {
|
|
2
|
-
display: flex;
|
|
3
|
-
justify-content: space-between;
|
|
4
|
-
column-gap: 16px;
|
|
5
|
-
|
|
6
|
-
&__form {
|
|
7
|
-
flex: 1;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
&__right {
|
|
11
|
-
display: flex;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
justify-content: space-between;
|
|
14
|
-
align-items: flex-end;
|
|
15
|
-
|
|
16
|
-
.ant-btn-link {
|
|
17
|
-
padding-right: 0;
|
|
18
|
-
margin-bottom: 28px;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
&__submitter {
|
|
23
|
-
display: flex;
|
|
24
|
-
column-gap: 8px;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.ant-form-item-no-colon {
|
|
28
|
-
margin-right: 4px;
|
|
29
|
-
|
|
30
|
-
&::after {
|
|
31
|
-
display: none;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
1
|
+
.custom-styled-query-filter {
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: space-between;
|
|
4
|
+
column-gap: 16px;
|
|
5
|
+
|
|
6
|
+
&__form {
|
|
7
|
+
flex: 1;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&__right {
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
justify-content: space-between;
|
|
14
|
+
align-items: flex-end;
|
|
15
|
+
|
|
16
|
+
.ant-btn-link {
|
|
17
|
+
padding-right: 0;
|
|
18
|
+
margin-bottom: 28px;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&__submitter {
|
|
23
|
+
display: flex;
|
|
24
|
+
column-gap: 8px;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
.styled-table-row {
|
|
2
|
-
td {
|
|
3
|
-
padding: 7.5px 16px !important;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
&:hover {
|
|
7
|
-
td {
|
|
8
|
-
background-color: #f0f0f0 !important;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.styled-table-zebra-stripe {
|
|
14
|
-
td {
|
|
15
|
-
background: #f9f9f9 !important;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
1
|
+
.styled-table-row {
|
|
2
|
+
td {
|
|
3
|
+
padding: 7.5px 16px !important;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
&:hover {
|
|
7
|
+
td {
|
|
8
|
+
background-color: #f0f0f0 !important;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.styled-table-zebra-stripe {
|
|
14
|
+
td {
|
|
15
|
+
background: #f9f9f9 !important;
|
|
16
|
+
}
|
|
17
|
+
}
|
package/dist/hooks/index.d.ts
CHANGED
package/dist/hooks/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { Service } from 'ahooks/lib/usePagination/types';
|
|
1
|
+
import { Data, Params, Service } from 'ahooks/lib/usePagination/types';
|
|
2
2
|
import { TUseEnhancePaginationOptions } from '../useEnhancePagination';
|
|
3
|
-
type
|
|
3
|
+
export type TUseTabsTablePaginationParams<TData extends Data, TParams extends Params> = {
|
|
4
4
|
defaultTabKey: any;
|
|
5
5
|
tabKeyAlias?: string;
|
|
6
6
|
tabKeyMaps?: {
|
|
7
7
|
[key: string]: any[];
|
|
8
8
|
};
|
|
9
|
-
service: Service<
|
|
10
|
-
options?: TUseEnhancePaginationOptions<
|
|
9
|
+
service: Service<TData, TParams>;
|
|
10
|
+
options?: TUseEnhancePaginationOptions<TData, TParams>;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export declare function useTabsTablePagination<TData extends Data, TParams extends Params>(params: TUseTabsTablePaginationParams<TData, TParams>): {
|
|
13
13
|
processQueryFilterOnReset: () => void;
|
|
14
14
|
onChangeTab: (activeKey: string) => void;
|
|
15
15
|
filterConditions: any;
|
|
@@ -23,15 +23,14 @@ export default function useTabsTablePagination(params: TPaginationHookParams): {
|
|
|
23
23
|
changePageSize: (pageSize: number) => void;
|
|
24
24
|
};
|
|
25
25
|
loading: boolean;
|
|
26
|
-
data?:
|
|
26
|
+
data?: TData | undefined;
|
|
27
27
|
error?: Error | undefined;
|
|
28
|
-
params: [] |
|
|
28
|
+
params: [] | TParams;
|
|
29
29
|
cancel: () => void;
|
|
30
30
|
refresh: () => void;
|
|
31
|
-
refreshAsync: () => Promise<
|
|
32
|
-
run: (
|
|
33
|
-
runAsync: (
|
|
34
|
-
mutate: (data?:
|
|
31
|
+
refreshAsync: () => Promise<TData>;
|
|
32
|
+
run: (...params: TParams) => void;
|
|
33
|
+
runAsync: (...params: TParams) => Promise<TData>;
|
|
34
|
+
mutate: (data?: TData | ((oldData?: TData | undefined) => TData | undefined) | undefined) => void;
|
|
35
35
|
listData: any[];
|
|
36
36
|
};
|
|
37
|
-
export {};
|
|
@@ -1,9 +1,14 @@
|
|
|
1
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
2
|
var _excluded = ["current", "pageSize"];
|
|
3
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
4
|
+
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."); }
|
|
5
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
3
6
|
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
7
|
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
8
|
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; }
|
|
6
9
|
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; }
|
|
10
|
+
function _toArray(arr) { return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest(); }
|
|
11
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
7
12
|
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
13
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
9
14
|
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); }
|
|
@@ -14,12 +19,12 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
14
19
|
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; } }
|
|
15
20
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
21
|
import { isNullOrUndefined } from "../../utils";
|
|
17
|
-
import { useState } from 'react';
|
|
22
|
+
import { useCallback, useState } from 'react';
|
|
18
23
|
import { useEnhancePagination } from "../useEnhancePagination";
|
|
19
24
|
var shortCircuitOperation = function shortCircuitOperation(a, b) {
|
|
20
25
|
return isNullOrUndefined(a) ? b : a;
|
|
21
26
|
};
|
|
22
|
-
export
|
|
27
|
+
export function useTabsTablePagination(params) {
|
|
23
28
|
var defaultTabKey = params.defaultTabKey,
|
|
24
29
|
_params$tabKeyAlias = params.tabKeyAlias,
|
|
25
30
|
tabKeyAlias = _params$tabKeyAlias === void 0 ? 'tabState' : _params$tabKeyAlias,
|
|
@@ -33,18 +38,26 @@ export default function useTabsTablePagination(params) {
|
|
|
33
38
|
_useState2 = _slicedToArray(_useState, 2),
|
|
34
39
|
filterConditions = _useState2[0],
|
|
35
40
|
setFilterConditions = _useState2[1];
|
|
36
|
-
var paginationHookRes = useEnhancePagination(function (
|
|
37
|
-
var
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
var paginationHookRes = useEnhancePagination(function () {
|
|
42
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
43
|
+
args[_key] = arguments[_key];
|
|
44
|
+
}
|
|
45
|
+
var _ref = args !== null && args !== void 0 ? args : [],
|
|
46
|
+
_ref2 = _toArray(_ref),
|
|
47
|
+
params = _ref2[0],
|
|
48
|
+
otherParams = _ref2.slice(1);
|
|
49
|
+
var _params$current = params.current,
|
|
50
|
+
current = _params$current === void 0 ? 1 : _params$current,
|
|
51
|
+
_params$pageSize = params.pageSize,
|
|
52
|
+
pageSize = _params$pageSize === void 0 ? 10 : _params$pageSize,
|
|
53
|
+
restParams = _objectWithoutProperties(params, _excluded);
|
|
42
54
|
var newConditions = _objectSpread(_objectSpread({}, restParams), {}, _defineProperty({
|
|
43
55
|
page: current,
|
|
44
56
|
limit: pageSize
|
|
45
57
|
}, tabKeyAlias, getTabValue(shortCircuitOperation(restParams === null || restParams === void 0 ? void 0 : restParams[tabKeyAlias], filterConditions === null || filterConditions === void 0 ? void 0 : filterConditions[tabKeyAlias]))));
|
|
46
58
|
setFilterConditions(newConditions);
|
|
47
|
-
|
|
59
|
+
var finalParams = [newConditions].concat(_toConsumableArray(otherParams));
|
|
60
|
+
return service.apply(void 0, _toConsumableArray(finalParams));
|
|
48
61
|
}, options);
|
|
49
62
|
var processQueryFilterOnReset = function processQueryFilterOnReset() {
|
|
50
63
|
setFilterConditions(_defineProperty({
|
|
@@ -52,15 +65,19 @@ export default function useTabsTablePagination(params) {
|
|
|
52
65
|
limit: 10
|
|
53
66
|
}, tabKeyAlias, getTabValue(filterConditions === null || filterConditions === void 0 ? void 0 : filterConditions[tabKeyAlias])));
|
|
54
67
|
};
|
|
55
|
-
var onChangeTab = function
|
|
68
|
+
var onChangeTab = useCallback(function (activeKey) {
|
|
56
69
|
var _paginationHookRes$ru;
|
|
57
70
|
var newFilterConditions = _objectSpread(_objectSpread({}, filterConditions), {}, _defineProperty({
|
|
58
71
|
page: 1,
|
|
59
72
|
limit: 10
|
|
60
73
|
}, tabKeyAlias, getTabValue(activeKey)));
|
|
61
74
|
setFilterConditions(newFilterConditions);
|
|
62
|
-
|
|
63
|
-
|
|
75
|
+
var _paginationHookRes$pa = _toArray(paginationHookRes.params),
|
|
76
|
+
_ = _paginationHookRes$pa[0],
|
|
77
|
+
otherParams = _paginationHookRes$pa.slice(1);
|
|
78
|
+
var finalParams = [newFilterConditions].concat(_toConsumableArray(otherParams));
|
|
79
|
+
paginationHookRes === null || paginationHookRes === void 0 || (_paginationHookRes$ru = paginationHookRes.run) === null || _paginationHookRes$ru === void 0 || _paginationHookRes$ru.call.apply(_paginationHookRes$ru, [paginationHookRes].concat(_toConsumableArray(finalParams)));
|
|
80
|
+
}, [paginationHookRes.params]);
|
|
64
81
|
return _objectSpread(_objectSpread({}, paginationHookRes), {}, {
|
|
65
82
|
processQueryFilterOnReset: processQueryFilterOnReset,
|
|
66
83
|
onChangeTab: onChangeTab,
|
|
@@ -14,8 +14,8 @@ export function isNullOrUndefined(target) {
|
|
|
14
14
|
return target === null || target === undefined;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
/**
|
|
18
|
-
* 给对象第一层的字符串属性值做 trim
|
|
17
|
+
/**
|
|
18
|
+
* 给对象第一层的字符串属性值做 trim
|
|
19
19
|
*/
|
|
20
20
|
export function trimObjectValuesFirstLayer(obj) {
|
|
21
21
|
var result = {};
|
|
@@ -26,10 +26,10 @@ export function trimObjectValuesFirstLayer(obj) {
|
|
|
26
26
|
}
|
|
27
27
|
return result;
|
|
28
28
|
}
|
|
29
|
-
/**
|
|
30
|
-
* 表格序号
|
|
31
|
-
* @param TableRiwNoType
|
|
32
|
-
* @returns
|
|
29
|
+
/**
|
|
30
|
+
* 表格序号
|
|
31
|
+
* @param TableRiwNoType
|
|
32
|
+
* @returns
|
|
33
33
|
*/
|
|
34
34
|
export function computedTableRowSerialNo(_ref) {
|
|
35
35
|
var pagination = _ref.pagination,
|
|
@@ -43,10 +43,10 @@ export function computedTableRowSerialNo(_ref) {
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
/**
|
|
47
|
-
* 对中国手机号进行加密中间四位。
|
|
48
|
-
* @param phoneNumber - 需要加密的手机号
|
|
49
|
-
* @returns 加密后的手机号
|
|
46
|
+
/**
|
|
47
|
+
* 对中国手机号进行加密中间四位。
|
|
48
|
+
* @param phoneNumber - 需要加密的手机号
|
|
49
|
+
* @returns 加密后的手机号
|
|
50
50
|
*/
|
|
51
51
|
export function encryptPhoneNumber(phoneNumber) {
|
|
52
52
|
// 将中间四位替换为星号
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ebaoferc",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "A react library developed with dumi",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"scripts": {
|
|
12
|
-
"build": "father build",
|
|
12
|
+
"build": "node checkProject && father build",
|
|
13
13
|
"build:watch": "father dev",
|
|
14
14
|
"dev": "dumi dev",
|
|
15
15
|
"docs:build": "dumi build",
|
|
@@ -63,10 +63,12 @@
|
|
|
63
63
|
"ahooks": "^3.7.10",
|
|
64
64
|
"antd": "^5.17.0",
|
|
65
65
|
"classnames": "^2.5.1",
|
|
66
|
+
"connect-history-api-fallback": "^2.0.0",
|
|
66
67
|
"cross-env": "^7.0.3",
|
|
67
68
|
"dayjs": "^1.11.10",
|
|
68
69
|
"dumi": "^2.3.0",
|
|
69
70
|
"eslint": "^8.23.0",
|
|
71
|
+
"express": "^4.19.2",
|
|
70
72
|
"father": "^4.1.0",
|
|
71
73
|
"husky": "^8.0.1",
|
|
72
74
|
"lint-staged": "^13.0.3",
|