@hw-component/table 1.10.12 → 1.10.13
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/.eslintcache +1 -1
- package/es/EditTable/hooks.d.ts +1 -1
- package/es/EditTable/hooks.js +4 -2
- package/es/EditTable/index.js +3 -2
- package/es/index.css +28 -28
- package/lib/EditTable/hooks.d.ts +1 -1
- package/lib/EditTable/hooks.js +4 -2
- package/lib/EditTable/index.js +3 -2
- package/lib/index.css +28 -28
- package/package.json +1 -1
- package/src/components/EditTable/hooks.ts +5 -4
- package/src/components/EditTable/index.tsx +2 -1
- package/src/components/HTableBody/hooks/useColData.tsx +10 -8
- package/src/components/index.less +52 -52
- package/src/components/modal.ts +2 -2
- package/src/pages/EditTable/index.tsx +50 -57
- package/src/pages/Table/index.tsx +2 -2
package/es/index.css
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
.ant-hw-table-content .ant-hw-table-body {
|
|
2
|
-
padding-top:
|
|
3
|
-
border-top-left-radius:
|
|
4
|
-
border-top-right-radius:
|
|
2
|
+
padding-top: 0;
|
|
3
|
+
border-top-left-radius: 0;
|
|
4
|
+
border-top-right-radius: 0;
|
|
5
5
|
}
|
|
6
6
|
.ant-hw-table-content .ant-hw-table-header {
|
|
7
|
-
border-bottom-
|
|
8
|
-
border-bottom-
|
|
7
|
+
border-bottom-right-radius: 0 !important;
|
|
8
|
+
border-bottom-left-radius: 0 !important;
|
|
9
9
|
}
|
|
10
10
|
.ant-hw-table-body {
|
|
11
|
-
background-color: #fff;
|
|
12
11
|
position: relative;
|
|
12
|
+
padding-top: 16px;
|
|
13
13
|
padding-right: 20px;
|
|
14
14
|
padding-left: 20px;
|
|
15
|
-
|
|
15
|
+
background-color: #fff;
|
|
16
16
|
border-radius: 4px;
|
|
17
17
|
}
|
|
18
18
|
.ant-hw-table-body .ant-hw-table-pagination {
|
|
19
|
+
margin-right: -20px;
|
|
20
|
+
margin-left: -20px;
|
|
19
21
|
padding: 12px 24px;
|
|
20
|
-
background-color: #
|
|
21
|
-
border-bottom-left-radius: 4px;
|
|
22
|
+
background-color: #fff;
|
|
22
23
|
border-bottom-right-radius: 4px;
|
|
23
|
-
|
|
24
|
-
margin-right: -20px;
|
|
24
|
+
border-bottom-left-radius: 4px;
|
|
25
25
|
}
|
|
26
26
|
.ant-hw-table-body .ant-hw-table-pagination .ant-select {
|
|
27
27
|
width: auto;
|
|
@@ -36,25 +36,25 @@
|
|
|
36
36
|
padding: 0;
|
|
37
37
|
}
|
|
38
38
|
.ant-hw-table-pagination {
|
|
39
|
+
position: relative;
|
|
39
40
|
padding: 12px 24px;
|
|
41
|
+
background-color: #fff;
|
|
40
42
|
border-radius: 4px;
|
|
41
|
-
background-color: #ffffff;
|
|
42
|
-
position: relative;
|
|
43
43
|
}
|
|
44
44
|
.ant-hw-top-btn {
|
|
45
45
|
position: absolute;
|
|
46
46
|
right: 10px;
|
|
47
47
|
bottom: 54px;
|
|
48
48
|
z-index: 9;
|
|
49
|
-
cursor: pointer;
|
|
50
49
|
width: 48px;
|
|
51
50
|
height: 48px;
|
|
52
51
|
background: url("./GoTop/goTop.png") no-repeat;
|
|
53
52
|
background-size: 100%;
|
|
53
|
+
cursor: pointer;
|
|
54
54
|
}
|
|
55
55
|
.ant-hw-table-header {
|
|
56
|
-
border-radius: 4px !important;
|
|
57
56
|
padding-bottom: 0;
|
|
57
|
+
border-radius: 4px !important;
|
|
58
58
|
}
|
|
59
59
|
.ant-hw-table-header .ant-hw-table-header-item-hide {
|
|
60
60
|
display: none;
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
}
|
|
75
75
|
.ant-hw-table-body-option-setting-title {
|
|
76
76
|
width: 198px;
|
|
77
|
-
margin:
|
|
77
|
+
margin: 0 -16px;
|
|
78
78
|
padding: 6px 8px;
|
|
79
79
|
}
|
|
80
80
|
.ant-hw-table-body-option-setting-content-title {
|
|
@@ -84,8 +84,8 @@
|
|
|
84
84
|
display: flex;
|
|
85
85
|
}
|
|
86
86
|
.ant-hw-table-op-tree-content {
|
|
87
|
-
padding: 6px 6px 6px 0;
|
|
88
87
|
width: 100%;
|
|
88
|
+
padding: 6px 6px 6px 0;
|
|
89
89
|
}
|
|
90
90
|
.ant-hw-table-body-option-tree .ant-tree-treenode {
|
|
91
91
|
width: 100%;
|
|
@@ -113,15 +113,15 @@
|
|
|
113
113
|
cursor: pointer;
|
|
114
114
|
}
|
|
115
115
|
.ant-hw-table-header-title-box {
|
|
116
|
-
|
|
117
|
-
-webkit-flex: 1;
|
|
118
|
-
-ms-flex: 1;
|
|
119
|
-
flex: 1;
|
|
116
|
+
position: relative;
|
|
120
117
|
display: -webkit-box;
|
|
121
118
|
display: -webkit-flex;
|
|
122
119
|
display: -ms-flexbox;
|
|
123
120
|
display: flex;
|
|
124
|
-
|
|
121
|
+
-webkit-box-flex: 1;
|
|
122
|
+
-webkit-flex: 1;
|
|
123
|
+
-ms-flex: 1;
|
|
124
|
+
flex: 1;
|
|
125
125
|
box-sizing: border-box;
|
|
126
126
|
margin: -10px 0;
|
|
127
127
|
padding: 10px 0;
|
|
@@ -134,16 +134,15 @@
|
|
|
134
134
|
display: -webkit-flex;
|
|
135
135
|
display: -ms-flexbox;
|
|
136
136
|
display: flex;
|
|
137
|
+
-webkit-align-content: center;
|
|
138
|
+
-ms-flex-line-pack: center;
|
|
139
|
+
align-content: center;
|
|
137
140
|
-webkit-box-pack: justify;
|
|
138
141
|
-webkit-justify-content: space-between;
|
|
139
142
|
-ms-flex-pack: justify;
|
|
140
143
|
justify-content: space-between;
|
|
141
|
-
-webkit-align-content: center;
|
|
142
|
-
-ms-flex-line-pack: center;
|
|
143
|
-
align-content: center;
|
|
144
144
|
}
|
|
145
145
|
.ant-hw-table-header-right-node {
|
|
146
|
-
padding-left: 12px;
|
|
147
146
|
display: -webkit-box;
|
|
148
147
|
display: -webkit-flex;
|
|
149
148
|
display: -ms-flexbox;
|
|
@@ -152,6 +151,7 @@
|
|
|
152
151
|
-webkit-align-items: center;
|
|
153
152
|
-ms-flex-align: center;
|
|
154
153
|
align-items: center;
|
|
154
|
+
padding-left: 12px;
|
|
155
155
|
}
|
|
156
156
|
.ant-hw-table-render-copy {
|
|
157
157
|
margin-bottom: 0 !important;
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
.ant-hw-table-render-text-basic {
|
|
162
162
|
width: 100%;
|
|
163
163
|
}
|
|
164
|
-
.ant-hw-table-col-hr
|
|
164
|
+
.ant-hw-table-col-hr::after {
|
|
165
165
|
position: absolute;
|
|
166
166
|
top: 50% !important;
|
|
167
167
|
left: 0 !important;
|
|
@@ -173,5 +173,5 @@
|
|
|
173
173
|
transform: translateY(-50%) !important;
|
|
174
174
|
-webkit-transition: background-color 0.3s;
|
|
175
175
|
transition: background-color 0.3s;
|
|
176
|
-
content:
|
|
176
|
+
content: "";
|
|
177
177
|
}
|
package/lib/EditTable/hooks.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { HEditTableProps } from "./modal";
|
|
|
2
2
|
import { MutableRefObject } from "react";
|
|
3
3
|
import type { ActionType } from "@ant-design/pro-table";
|
|
4
4
|
import { EditableFormInstance } from "@ant-design/pro-table/lib/components/EditableTable";
|
|
5
|
-
export declare const useListRequest: ({ request, dataSource }: HEditTableProps) => import("@ahooksjs/use-request/lib/types").BaseResult<any, [params?: any]>;
|
|
5
|
+
export declare const useListRequest: ({ request, dataSource, manual }: HEditTableProps) => import("@ahooksjs/use-request/lib/types").BaseResult<any, [params?: any]>;
|
|
6
6
|
export declare const useCuRef: ({ actionRef, editableFormRef }: HEditTableProps) => {
|
|
7
7
|
cuActionRef: MutableRefObject<ActionType>;
|
|
8
8
|
cuEditableFormRef: MutableRefObject<EditableFormInstance>;
|
package/lib/EditTable/hooks.js
CHANGED
|
@@ -21,7 +21,9 @@ function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymb
|
|
|
21
21
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
22
22
|
var useListRequest = function useListRequest(_ref) {
|
|
23
23
|
var request = _ref.request,
|
|
24
|
-
dataSource = _ref.dataSource
|
|
24
|
+
dataSource = _ref.dataSource,
|
|
25
|
+
manual = _ref.manual;
|
|
26
|
+
var relManual = request ? manual : false;
|
|
25
27
|
var saveParams = React.useMemo(function () {
|
|
26
28
|
return {
|
|
27
29
|
params: {
|
|
@@ -59,7 +61,7 @@ var useListRequest = function useListRequest(_ref) {
|
|
|
59
61
|
}
|
|
60
62
|
}, _callee);
|
|
61
63
|
})), {
|
|
62
|
-
manual:
|
|
64
|
+
manual: relManual,
|
|
63
65
|
refreshDeps: [dataSource]
|
|
64
66
|
});
|
|
65
67
|
};
|
package/lib/EditTable/index.js
CHANGED
|
@@ -54,7 +54,8 @@ var HEditTable = (function (_ref) {
|
|
|
54
54
|
var tableBody = index.useClassName("hw-table-body");
|
|
55
55
|
var _useListRequest = hooks.useListRequest({
|
|
56
56
|
request: request,
|
|
57
|
-
dataSource: dataSource
|
|
57
|
+
dataSource: dataSource,
|
|
58
|
+
manual: manual
|
|
58
59
|
}),
|
|
59
60
|
loading = _useListRequest.loading,
|
|
60
61
|
data = _useListRequest.data,
|
|
@@ -96,7 +97,7 @@ var HEditTable = (function (_ref) {
|
|
|
96
97
|
loading: loading,
|
|
97
98
|
rowKey: rowKey,
|
|
98
99
|
editableFormRef: cuEditableFormRef,
|
|
99
|
-
manualRequest:
|
|
100
|
+
manualRequest: true,
|
|
100
101
|
request: run,
|
|
101
102
|
actionRef: cuActionRef,
|
|
102
103
|
value: values,
|
package/lib/index.css
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
.ant-hw-table-content .ant-hw-table-body {
|
|
2
|
-
padding-top:
|
|
3
|
-
border-top-left-radius:
|
|
4
|
-
border-top-right-radius:
|
|
2
|
+
padding-top: 0;
|
|
3
|
+
border-top-left-radius: 0;
|
|
4
|
+
border-top-right-radius: 0;
|
|
5
5
|
}
|
|
6
6
|
.ant-hw-table-content .ant-hw-table-header {
|
|
7
|
-
border-bottom-
|
|
8
|
-
border-bottom-
|
|
7
|
+
border-bottom-right-radius: 0 !important;
|
|
8
|
+
border-bottom-left-radius: 0 !important;
|
|
9
9
|
}
|
|
10
10
|
.ant-hw-table-body {
|
|
11
|
-
background-color: #fff;
|
|
12
11
|
position: relative;
|
|
12
|
+
padding-top: 16px;
|
|
13
13
|
padding-right: 20px;
|
|
14
14
|
padding-left: 20px;
|
|
15
|
-
|
|
15
|
+
background-color: #fff;
|
|
16
16
|
border-radius: 4px;
|
|
17
17
|
}
|
|
18
18
|
.ant-hw-table-body .ant-hw-table-pagination {
|
|
19
|
+
margin-right: -20px;
|
|
20
|
+
margin-left: -20px;
|
|
19
21
|
padding: 12px 24px;
|
|
20
|
-
background-color: #
|
|
21
|
-
border-bottom-left-radius: 4px;
|
|
22
|
+
background-color: #fff;
|
|
22
23
|
border-bottom-right-radius: 4px;
|
|
23
|
-
|
|
24
|
-
margin-right: -20px;
|
|
24
|
+
border-bottom-left-radius: 4px;
|
|
25
25
|
}
|
|
26
26
|
.ant-hw-table-body .ant-hw-table-pagination .ant-select {
|
|
27
27
|
width: auto;
|
|
@@ -36,25 +36,25 @@
|
|
|
36
36
|
padding: 0;
|
|
37
37
|
}
|
|
38
38
|
.ant-hw-table-pagination {
|
|
39
|
+
position: relative;
|
|
39
40
|
padding: 12px 24px;
|
|
41
|
+
background-color: #fff;
|
|
40
42
|
border-radius: 4px;
|
|
41
|
-
background-color: #ffffff;
|
|
42
|
-
position: relative;
|
|
43
43
|
}
|
|
44
44
|
.ant-hw-top-btn {
|
|
45
45
|
position: absolute;
|
|
46
46
|
right: 10px;
|
|
47
47
|
bottom: 54px;
|
|
48
48
|
z-index: 9;
|
|
49
|
-
cursor: pointer;
|
|
50
49
|
width: 48px;
|
|
51
50
|
height: 48px;
|
|
52
51
|
background: url("./GoTop/goTop.png") no-repeat;
|
|
53
52
|
background-size: 100%;
|
|
53
|
+
cursor: pointer;
|
|
54
54
|
}
|
|
55
55
|
.ant-hw-table-header {
|
|
56
|
-
border-radius: 4px !important;
|
|
57
56
|
padding-bottom: 0;
|
|
57
|
+
border-radius: 4px !important;
|
|
58
58
|
}
|
|
59
59
|
.ant-hw-table-header .ant-hw-table-header-item-hide {
|
|
60
60
|
display: none;
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
}
|
|
75
75
|
.ant-hw-table-body-option-setting-title {
|
|
76
76
|
width: 198px;
|
|
77
|
-
margin:
|
|
77
|
+
margin: 0 -16px;
|
|
78
78
|
padding: 6px 8px;
|
|
79
79
|
}
|
|
80
80
|
.ant-hw-table-body-option-setting-content-title {
|
|
@@ -84,8 +84,8 @@
|
|
|
84
84
|
display: flex;
|
|
85
85
|
}
|
|
86
86
|
.ant-hw-table-op-tree-content {
|
|
87
|
-
padding: 6px 6px 6px 0;
|
|
88
87
|
width: 100%;
|
|
88
|
+
padding: 6px 6px 6px 0;
|
|
89
89
|
}
|
|
90
90
|
.ant-hw-table-body-option-tree .ant-tree-treenode {
|
|
91
91
|
width: 100%;
|
|
@@ -113,15 +113,15 @@
|
|
|
113
113
|
cursor: pointer;
|
|
114
114
|
}
|
|
115
115
|
.ant-hw-table-header-title-box {
|
|
116
|
-
|
|
117
|
-
-webkit-flex: 1;
|
|
118
|
-
-ms-flex: 1;
|
|
119
|
-
flex: 1;
|
|
116
|
+
position: relative;
|
|
120
117
|
display: -webkit-box;
|
|
121
118
|
display: -webkit-flex;
|
|
122
119
|
display: -ms-flexbox;
|
|
123
120
|
display: flex;
|
|
124
|
-
|
|
121
|
+
-webkit-box-flex: 1;
|
|
122
|
+
-webkit-flex: 1;
|
|
123
|
+
-ms-flex: 1;
|
|
124
|
+
flex: 1;
|
|
125
125
|
box-sizing: border-box;
|
|
126
126
|
margin: -10px 0;
|
|
127
127
|
padding: 10px 0;
|
|
@@ -134,16 +134,15 @@
|
|
|
134
134
|
display: -webkit-flex;
|
|
135
135
|
display: -ms-flexbox;
|
|
136
136
|
display: flex;
|
|
137
|
+
-webkit-align-content: center;
|
|
138
|
+
-ms-flex-line-pack: center;
|
|
139
|
+
align-content: center;
|
|
137
140
|
-webkit-box-pack: justify;
|
|
138
141
|
-webkit-justify-content: space-between;
|
|
139
142
|
-ms-flex-pack: justify;
|
|
140
143
|
justify-content: space-between;
|
|
141
|
-
-webkit-align-content: center;
|
|
142
|
-
-ms-flex-line-pack: center;
|
|
143
|
-
align-content: center;
|
|
144
144
|
}
|
|
145
145
|
.ant-hw-table-header-right-node {
|
|
146
|
-
padding-left: 12px;
|
|
147
146
|
display: -webkit-box;
|
|
148
147
|
display: -webkit-flex;
|
|
149
148
|
display: -ms-flexbox;
|
|
@@ -152,6 +151,7 @@
|
|
|
152
151
|
-webkit-align-items: center;
|
|
153
152
|
-ms-flex-align: center;
|
|
154
153
|
align-items: center;
|
|
154
|
+
padding-left: 12px;
|
|
155
155
|
}
|
|
156
156
|
.ant-hw-table-render-copy {
|
|
157
157
|
margin-bottom: 0 !important;
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
.ant-hw-table-render-text-basic {
|
|
162
162
|
width: 100%;
|
|
163
163
|
}
|
|
164
|
-
.ant-hw-table-col-hr
|
|
164
|
+
.ant-hw-table-col-hr::after {
|
|
165
165
|
position: absolute;
|
|
166
166
|
top: 50% !important;
|
|
167
167
|
left: 0 !important;
|
|
@@ -173,5 +173,5 @@
|
|
|
173
173
|
transform: translateY(-50%) !important;
|
|
174
174
|
-webkit-transition: background-color 0.3s;
|
|
175
175
|
transition: background-color 0.3s;
|
|
176
|
-
content:
|
|
176
|
+
content: "";
|
|
177
177
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { useRequest } from "ahooks";
|
|
2
2
|
import { HEditTableProps } from "./modal";
|
|
3
|
-
import {
|
|
3
|
+
import {MutableRefObject, useEffect, useMemo, useRef} from "react";
|
|
4
4
|
import type { ActionType } from "@ant-design/pro-table";
|
|
5
5
|
import { EditableFormInstance } from "@ant-design/pro-table/lib/components/EditableTable";
|
|
6
6
|
import config from "../render/config";
|
|
7
7
|
|
|
8
|
-
export const useListRequest = ({ request, dataSource }: HEditTableProps) => {
|
|
8
|
+
export const useListRequest = ({ request, dataSource ,manual}: HEditTableProps) => {
|
|
9
|
+
const relManual=request?manual:false;
|
|
9
10
|
const saveParams = useMemo(() => {
|
|
10
11
|
return {
|
|
11
12
|
params: {
|
|
@@ -14,7 +15,7 @@ export const useListRequest = ({ request, dataSource }: HEditTableProps) => {
|
|
|
14
15
|
},
|
|
15
16
|
};
|
|
16
17
|
}, []);
|
|
17
|
-
return
|
|
18
|
+
return useRequest(
|
|
18
19
|
async (params = {}) => {
|
|
19
20
|
const newParams = {
|
|
20
21
|
...saveParams.params,
|
|
@@ -29,7 +30,7 @@ export const useListRequest = ({ request, dataSource }: HEditTableProps) => {
|
|
|
29
30
|
}
|
|
30
31
|
return dataSource;
|
|
31
32
|
},
|
|
32
|
-
{ manual:
|
|
33
|
+
{ manual: relManual,refreshDeps:[dataSource]}
|
|
33
34
|
);
|
|
34
35
|
};
|
|
35
36
|
|
|
@@ -34,6 +34,7 @@ export default ({
|
|
|
34
34
|
const { loading, data, error, run } = useListRequest({
|
|
35
35
|
request,
|
|
36
36
|
dataSource,
|
|
37
|
+
manual,
|
|
37
38
|
});
|
|
38
39
|
const {
|
|
39
40
|
emptyRender: tableEmptyRender = emptyDefaultRender,
|
|
@@ -65,7 +66,7 @@ export default ({
|
|
|
65
66
|
loading={loading}
|
|
66
67
|
rowKey={rowKey}
|
|
67
68
|
editableFormRef={cuEditableFormRef}
|
|
68
|
-
manualRequest={
|
|
69
|
+
manualRequest={true}
|
|
69
70
|
request={run}
|
|
70
71
|
actionRef={cuActionRef}
|
|
71
72
|
value={values}
|
|
@@ -39,14 +39,14 @@ export const useCols = ({
|
|
|
39
39
|
const childLen = children.length;
|
|
40
40
|
return !childLen && !!lastChildLen ? trClassname : "";
|
|
41
41
|
};
|
|
42
|
-
const colChild=(children?: ConfigItemModal[])=>{
|
|
43
|
-
if (!children){
|
|
42
|
+
const colChild = (children?: ConfigItemModal[]) => {
|
|
43
|
+
if (!children) {
|
|
44
44
|
return children;
|
|
45
45
|
}
|
|
46
|
-
return
|
|
47
|
-
|
|
46
|
+
return children.map((item) => {
|
|
47
|
+
return itemProvider(item);
|
|
48
48
|
});
|
|
49
|
-
}
|
|
49
|
+
};
|
|
50
50
|
function itemProvider(item: ConfigItemModal, lastItem?: ConfigItemModal) {
|
|
51
51
|
const { children: lastChildren = [] } = lastItem || {};
|
|
52
52
|
const {
|
|
@@ -56,7 +56,9 @@ export const useCols = ({
|
|
|
56
56
|
children = [],
|
|
57
57
|
} = item;
|
|
58
58
|
|
|
59
|
-
const trClassName = bordered
|
|
59
|
+
const trClassName = bordered
|
|
60
|
+
? ""
|
|
61
|
+
: itemClassNameMk(children as any[], lastChildren as any[]);
|
|
60
62
|
const itemType = valueType as string;
|
|
61
63
|
if (textTypes.indexOf(itemType) !== -1) {
|
|
62
64
|
const { ellipsis } = valueTypeProps;
|
|
@@ -65,7 +67,7 @@ export const useCols = ({
|
|
|
65
67
|
ellipsis: ellipsis,
|
|
66
68
|
className: `${className} ${trClassName}`,
|
|
67
69
|
render: configRender(item, table as HTableInstance, valueTypeConfig),
|
|
68
|
-
children:colChild(children)
|
|
70
|
+
children: colChild(children),
|
|
69
71
|
};
|
|
70
72
|
}
|
|
71
73
|
|
|
@@ -73,7 +75,7 @@ export const useCols = ({
|
|
|
73
75
|
...item,
|
|
74
76
|
className: `${className} ${trClassName}`,
|
|
75
77
|
render: configRender(item, table as HTableInstance, valueTypeConfig),
|
|
76
|
-
children:colChild(children)
|
|
78
|
+
children: colChild(children),
|
|
77
79
|
};
|
|
78
80
|
}
|
|
79
81
|
|
|
@@ -1,77 +1,79 @@
|
|
|
1
1
|
@import "./styles/local.less";
|
|
2
2
|
.@{ant-prefix}-hw-table-content {
|
|
3
3
|
.@{ant-prefix}-hw-table-body {
|
|
4
|
-
|
|
5
|
-
border-top-left-radius:
|
|
6
|
-
border-top-right-radius:
|
|
4
|
+
padding-top: 0;
|
|
5
|
+
border-top-left-radius: 0;
|
|
6
|
+
border-top-right-radius: 0;
|
|
7
7
|
}
|
|
8
8
|
.@{ant-prefix}-hw-table-header {
|
|
9
|
-
border-bottom-
|
|
10
|
-
border-bottom-
|
|
9
|
+
border-bottom-right-radius: 0 !important;
|
|
10
|
+
border-bottom-left-radius: 0 !important;
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
.@{ant-prefix}-hw-table-body {
|
|
14
|
-
background-color: #fff;
|
|
15
14
|
position: relative;
|
|
15
|
+
padding-top: 16px;
|
|
16
16
|
padding-right: 20px;
|
|
17
17
|
padding-left: 20px;
|
|
18
|
-
|
|
18
|
+
background-color: #fff;
|
|
19
19
|
border-radius: 4px;
|
|
20
20
|
.@{ant-prefix}-hw-table-pagination {
|
|
21
|
+
margin-right: -20px;
|
|
22
|
+
margin-left: -20px;
|
|
21
23
|
padding: 12px 24px;
|
|
22
|
-
background-color
|
|
23
|
-
border-bottom-left-radius: 4px;
|
|
24
|
+
background-color: #fff;
|
|
24
25
|
border-bottom-right-radius: 4px;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
.@{ant-prefix}-select{
|
|
26
|
+
border-bottom-left-radius: 4px;
|
|
27
|
+
.@{ant-prefix}-select {
|
|
28
28
|
width: auto;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
.@{ant-prefix}-pro-card-body {
|
|
32
|
-
|
|
32
|
+
padding-bottom: 0;
|
|
33
33
|
}
|
|
34
34
|
.@{ant-prefix}-pro-table-list-toolbar-container {
|
|
35
|
-
|
|
35
|
+
padding-top: 0;
|
|
36
36
|
}
|
|
37
|
-
.@{ant-prefix}-pro-table
|
|
38
|
-
|
|
37
|
+
.@{ant-prefix}-pro-table
|
|
38
|
+
> .@{ant-prefix}-pro-card
|
|
39
|
+
> .@{ant-prefix}-pro-card-body {
|
|
40
|
+
padding: 0;
|
|
39
41
|
}
|
|
40
42
|
}
|
|
41
43
|
.@{ant-prefix}-hw-table-pagination {
|
|
44
|
+
position: relative;
|
|
42
45
|
padding: 12px 24px;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
position: relative;
|
|
46
|
+
background-color: #fff;
|
|
47
|
+
border-radius: 4px;
|
|
46
48
|
}
|
|
47
49
|
|
|
48
50
|
.@{ant-prefix}-hw-top-btn {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
51
|
+
position: absolute;
|
|
52
|
+
right: 10px;
|
|
53
|
+
bottom: 54px;
|
|
54
|
+
z-index: 9;
|
|
55
|
+
width: 48px;
|
|
56
|
+
height: 48px;
|
|
57
|
+
background: url("./GoTop/goTop.png") no-repeat;
|
|
58
|
+
background-size: 100%;
|
|
59
|
+
cursor: pointer;
|
|
58
60
|
}
|
|
59
61
|
.@{ant-prefix}-hw-table-header {
|
|
60
|
-
border-radius: 4px !important;
|
|
61
62
|
padding-bottom: 0;
|
|
63
|
+
border-radius: 4px !important;
|
|
62
64
|
.@{ant-prefix}-hw-table-header-item-hide {
|
|
63
65
|
display: none;
|
|
64
66
|
}
|
|
65
67
|
.@{ant-prefix}-card-body {
|
|
66
|
-
|
|
68
|
+
padding: 24px 20px;
|
|
67
69
|
}
|
|
68
70
|
.@{ant-prefix}-form-item {
|
|
69
|
-
|
|
71
|
+
margin-bottom: 16px;
|
|
70
72
|
}
|
|
71
73
|
}
|
|
72
74
|
|
|
73
75
|
.@{ant-prefix}-hw-table-body-option-icon {
|
|
74
|
-
|
|
76
|
+
font-size: 16px;
|
|
75
77
|
}
|
|
76
78
|
.@{ant-prefix}-hw-table-body-option-setting-content {
|
|
77
79
|
width: 198px;
|
|
@@ -79,19 +81,19 @@
|
|
|
79
81
|
}
|
|
80
82
|
.@{ant-prefix}-hw-table-body-option-setting-title {
|
|
81
83
|
width: 198px;
|
|
82
|
-
margin:
|
|
84
|
+
margin: 0 -16px;
|
|
83
85
|
padding: 6px 8px;
|
|
84
86
|
}
|
|
85
87
|
.@{ant-prefix}-hw-table-body-option-setting-content-title {
|
|
86
88
|
display: flex;
|
|
87
89
|
}
|
|
88
90
|
.@{ant-prefix}-hw-table-op-tree-content {
|
|
89
|
-
padding: 6px 6px 6px 0;
|
|
90
91
|
width: 100%;
|
|
92
|
+
padding: 6px 6px 6px 0;
|
|
91
93
|
}
|
|
92
94
|
.@{ant-prefix}-hw-table-body-option-tree {
|
|
93
|
-
.@{ant-prefix}-tree-treenode{
|
|
94
|
-
|
|
95
|
+
.@{ant-prefix}-tree-treenode {
|
|
96
|
+
width: 100%;
|
|
95
97
|
padding-left: 24px !important;
|
|
96
98
|
}
|
|
97
99
|
.@{ant-prefix}-tree-node-content-wrapper {
|
|
@@ -101,13 +103,13 @@
|
|
|
101
103
|
width: 0;
|
|
102
104
|
}
|
|
103
105
|
.@{ant-prefix}-tree-treenode-draggable {
|
|
104
|
-
|
|
106
|
+
padding-left: 0 !important;
|
|
105
107
|
}
|
|
106
108
|
}
|
|
107
109
|
.@{ant-prefix}-hw-table-pointer {
|
|
108
110
|
cursor: pointer;
|
|
109
|
-
&:hover{
|
|
110
|
-
color
|
|
111
|
+
&:hover {
|
|
112
|
+
color: #1890ff;
|
|
111
113
|
}
|
|
112
114
|
}
|
|
113
115
|
.@{ant-prefix}-hw-table-pointer-not-hover {
|
|
@@ -115,31 +117,31 @@
|
|
|
115
117
|
}
|
|
116
118
|
|
|
117
119
|
.@{ant-prefix}-hw-table-header-title-box {
|
|
118
|
-
flex: 1;
|
|
119
|
-
display: flex;
|
|
120
120
|
position: relative;
|
|
121
|
+
display: flex;
|
|
122
|
+
flex: 1;
|
|
121
123
|
box-sizing: border-box;
|
|
122
124
|
margin: -10px 0;
|
|
123
125
|
padding: 10px 0;
|
|
124
|
-
|
|
126
|
+
.@{ant-prefix}-hw-table-header-title-box-content {
|
|
125
127
|
white-space: nowrap;
|
|
126
|
-
|
|
128
|
+
}
|
|
127
129
|
}
|
|
128
130
|
.@{ant-prefix}-hw-table-header-title {
|
|
129
131
|
display: flex;
|
|
130
|
-
justify-content: space-between;
|
|
131
132
|
align-content: center;
|
|
133
|
+
justify-content: space-between;
|
|
132
134
|
}
|
|
133
135
|
.@{ant-prefix}-hw-table-header-right-node {
|
|
134
|
-
padding-left: 12px;
|
|
135
136
|
display: flex;
|
|
136
137
|
align-items: center;
|
|
138
|
+
padding-left: 12px;
|
|
137
139
|
}
|
|
138
140
|
|
|
139
141
|
.@{ant-prefix}-hw-table-render-copy {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
142
|
+
margin-bottom: 0 !important;
|
|
143
|
+
color: @primary-color !important;
|
|
144
|
+
cursor: pointer;
|
|
143
145
|
}
|
|
144
146
|
|
|
145
147
|
.@{ant-prefix}-hw-table-render-text-basic {
|
|
@@ -147,7 +149,7 @@
|
|
|
147
149
|
}
|
|
148
150
|
|
|
149
151
|
.@{ant-prefix}-hw-table-col-hr {
|
|
150
|
-
|
|
152
|
+
&::after {
|
|
151
153
|
position: absolute;
|
|
152
154
|
top: 50% !important;
|
|
153
155
|
left: 0 !important;
|
|
@@ -156,8 +158,6 @@
|
|
|
156
158
|
background-color: rgba(0, 0, 0, 0.06);
|
|
157
159
|
transform: translateY(-50%) !important;
|
|
158
160
|
transition: background-color 0.3s;
|
|
159
|
-
content:
|
|
161
|
+
content: "";
|
|
160
162
|
}
|
|
161
163
|
}
|
|
162
|
-
|
|
163
|
-
|
package/src/components/modal.ts
CHANGED
|
@@ -30,7 +30,7 @@ export interface ParamsModal extends Record<string, any> {
|
|
|
30
30
|
size?: number;
|
|
31
31
|
current?: number;
|
|
32
32
|
}
|
|
33
|
-
interface HColumns extends Omit<ProColumns, "render" | "title"|"children"> {
|
|
33
|
+
interface HColumns extends Omit<ProColumns, "render" | "title" | "children"> {
|
|
34
34
|
render?: (
|
|
35
35
|
dom: React.ReactNode,
|
|
36
36
|
data: any,
|
|
@@ -48,7 +48,7 @@ interface HColumns extends Omit<ProColumns, "render" | "title"|"children"> {
|
|
|
48
48
|
rowSelectionTitle?: boolean;
|
|
49
49
|
title?: string | React.ReactNode;
|
|
50
50
|
valueTypeProps?: Record<string, any>;
|
|
51
|
-
children?:ConfigItemModal[]
|
|
51
|
+
children?: ConfigItemModal[];
|
|
52
52
|
}
|
|
53
53
|
interface BcItemModal {
|
|
54
54
|
childrenDataIndex?: ConfigItemModal[] | string[];
|