ls-pro-common 1.0.62 → 1.0.64
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/CHANGELOG.md +746 -746
- package/README.md +22 -22
- package/dist/common.css +101 -22
- package/dist/common.js +1 -1
- package/dist/common.min.css +101 -22
- package/dist/common.min.js +1 -1
- package/es/components/IconSelector.d.ts +2 -8
- package/es/components/IconSelector.js +114 -207
- package/es/components/ImageSelector.d.ts +3 -0
- package/es/components/ImageSelector.js +128 -24
- package/es/components/InputMultiLine.js +1 -1
- package/es/components/InputTable.d.ts +5 -0
- package/es/components/InputTable.js +26 -4
- package/es/components/common.less +176 -119
- package/es/hooks/useDtl/index.d.ts +13 -0
- package/es/hooks/useDtl/index.js +388 -235
- package/es/hooks/usePermission/index.d.ts +1 -0
- package/es/hooks/usePermission/index.js +23 -1
- package/es/hooks/useSingle/index.d.ts +1 -0
- package/es/hooks/useSingle/index.js +3 -1
- package/es/http/index.js +28 -12
- package/es/service/BaseService.d.ts +8 -0
- package/es/service/BaseService.js +69 -26
- package/es/typing.d.ts +4 -0
- package/es/utils/index.d.ts +49 -0
- package/es/utils/index.js +142 -1
- package/lib/components/IconSelector.d.ts +2 -8
- package/lib/components/IconSelector.js +112 -214
- package/lib/components/ImageSelector.d.ts +3 -0
- package/lib/components/ImageSelector.js +125 -24
- package/lib/components/InputMultiLine.js +1 -1
- package/lib/components/InputTable.d.ts +5 -0
- package/lib/components/InputTable.js +26 -4
- package/lib/components/common.less +176 -119
- package/lib/hooks/useDtl/index.d.ts +13 -0
- package/lib/hooks/useDtl/index.js +388 -235
- package/lib/hooks/usePermission/index.d.ts +1 -0
- package/lib/hooks/usePermission/index.js +23 -0
- package/lib/hooks/useSingle/index.d.ts +1 -0
- package/lib/hooks/useSingle/index.js +3 -1
- package/lib/http/index.js +27 -11
- package/lib/service/BaseService.d.ts +8 -0
- package/lib/service/BaseService.js +69 -26
- package/lib/typing.d.ts +4 -0
- package/lib/utils/index.d.ts +49 -0
- package/lib/utils/index.js +163 -3
- package/package.json +3 -4
|
@@ -1,161 +1,218 @@
|
|
|
1
1
|
body {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
2
|
+
--ant-primary-color : #4997E6;
|
|
3
|
+
--ant-primary-color-hover : #74b7f2;
|
|
4
|
+
--ant-primary-color-active : #3475bf;
|
|
5
|
+
--ant-primary-color-outline : rgba(73, 151, 230, 0.2);
|
|
6
|
+
--ant-primary-1 : #f0faff;
|
|
7
|
+
--ant-primary-2 : #f0f9ff;
|
|
8
|
+
--ant-primary-3 : #ccebff;
|
|
9
|
+
--ant-primary-4 : #a3d7ff;
|
|
10
|
+
--ant-primary-5 : #74b7f2;
|
|
11
|
+
--ant-primary-6 : #4997E6;
|
|
12
|
+
--ant-primary-7 : #3475bf;
|
|
13
|
+
--ant-primary-color-deprecated-pure : #e6f1fc;
|
|
14
|
+
--ant-primary-color-deprecated-l-35 : #e6f1fc;
|
|
15
|
+
--ant-primary-color-deprecated-l-20 : #a3caf2;
|
|
16
|
+
--ant-primary-color-deprecated-t-20 : #6daceb;
|
|
17
|
+
--ant-primary-color-deprecated-t-50 : #a4cbf3;
|
|
18
|
+
--ant-primary-color-deprecated-f-12 : rgba(73, 151, 230, 0.12);
|
|
19
|
+
--ant-primary-color-active-deprecated-f-30: rgba(240, 250, 255, 0.3);
|
|
20
|
+
--ant-primary-color-active-deprecated-d-02: #e6f7ff;
|
|
21
|
+
--ant-success-color : #52c41a;
|
|
22
|
+
--ant-success-color-hover : #73d13d;
|
|
23
|
+
--ant-success-color-active : #389e0d;
|
|
24
|
+
--ant-success-color-outline : rgba(82, 196, 26, 0.2);
|
|
25
|
+
--ant-success-color-deprecated-bg : #f6ffed;
|
|
26
|
+
--ant-success-color-deprecated-border : #b7eb8f;
|
|
27
|
+
--ant-error-color : #ff4d4f;
|
|
28
|
+
--ant-error-color-hover : #ff7875;
|
|
29
|
+
--ant-error-color-active : #d9363e;
|
|
30
|
+
--ant-error-color-outline : rgba(255, 77, 79, 0.2);
|
|
31
|
+
--ant-error-color-deprecated-bg : #fff2f0;
|
|
32
|
+
--ant-error-color-deprecated-border : #ffccc7;
|
|
33
|
+
--ant-warning-color : #faad14;
|
|
34
|
+
--ant-warning-color-hover : #ffc53d;
|
|
35
|
+
--ant-warning-color-active : #d48806;
|
|
36
|
+
--ant-warning-color-outline : rgba(250, 173, 20, 0.2);
|
|
37
|
+
--ant-warning-color-deprecated-bg : #fffbe6;
|
|
38
|
+
--ant-warning-color-deprecated-border : #ffe58f;
|
|
39
|
+
--ant-info-color : #4997E6;
|
|
40
|
+
--ant-info-color-deprecated-bg : #f0faff;
|
|
41
|
+
--ant-info-color-deprecated-border : #ccebff;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
.dtl-layout {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
45
|
+
position : absolute;
|
|
46
|
+
top : 0;
|
|
47
|
+
left : 0;
|
|
48
|
+
right : 0;
|
|
49
|
+
bottom : 0;
|
|
50
|
+
background : white;
|
|
51
|
+
display : flex;
|
|
52
|
+
flex-direction: column;
|
|
53
|
+
z-index : 50;
|
|
54
|
+
|
|
55
|
+
.dtl-header {
|
|
56
|
+
display : flex;
|
|
57
|
+
justify-items: center;
|
|
58
|
+
padding : 5px 14px;
|
|
59
|
+
border-bottom: 1px solid #f0f0f0;
|
|
60
|
+
|
|
61
|
+
.dtl-title {
|
|
62
|
+
font-size: 14pt;
|
|
63
|
+
}
|
|
64
64
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
.dtl-btns {
|
|
66
|
+
flex : 1;
|
|
67
|
+
text-align: right;
|
|
68
68
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
69
|
+
button+button {
|
|
70
|
+
margin-left: 8px;
|
|
71
|
+
}
|
|
73
72
|
}
|
|
73
|
+
}
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
75
|
+
.dtl-body {
|
|
76
|
+
height : 0;
|
|
77
|
+
flex : 1;
|
|
78
|
+
overflow: auto;
|
|
79
|
+
padding : 12px;
|
|
80
|
+
}
|
|
81
81
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
.dtl-flex {
|
|
83
|
+
display : flex;
|
|
84
|
+
flex-direction: column;
|
|
85
|
+
}
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
.flex {
|
|
89
|
-
|
|
89
|
+
flex: 1;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
.flex-column {
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
display : flex;
|
|
94
|
+
flex-direction: column;
|
|
95
95
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
.flex {
|
|
97
|
+
height: 0;
|
|
98
|
+
}
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
.flex-row {
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
display : flex;
|
|
103
|
+
flex-direction: row;
|
|
104
104
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
105
|
+
.flex {
|
|
106
|
+
width: 0;
|
|
107
|
+
}
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
.page404 {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
111
|
+
width : 100%;
|
|
112
|
+
height : 100%;
|
|
113
|
+
text-align : center;
|
|
114
|
+
padding-top : 10%;
|
|
115
|
+
font-size : 15px;
|
|
116
|
+
font-weight : 600;
|
|
117
|
+
color : gray;
|
|
118
|
+
background-color: #fff;
|
|
119
|
+
|
|
120
|
+
img {
|
|
121
|
+
vertical-align: bottom;
|
|
122
|
+
padding-right : 5px;
|
|
123
|
+
}
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
.loading {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
127
|
+
height : 100%;
|
|
128
|
+
width : 100%;
|
|
129
|
+
text-align : center;
|
|
130
|
+
padding-top: 20%;
|
|
131
|
+
background : #fff;
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
.ant-btn {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
135
|
+
border-radius: 4px;
|
|
136
|
+
border-color : var(--ant-primary-color);
|
|
137
|
+
color : var(--ant-primary-color);
|
|
138
|
+
|
|
139
|
+
&:active {
|
|
140
|
+
border-color: var(--ant-primary-color-hover);
|
|
141
|
+
color : var(--ant-primary-color-hover);
|
|
142
|
+
}
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
.ant-btn-primary {
|
|
146
|
-
|
|
146
|
+
color: #fff;
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
.ant-btn-dangerous {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
150
|
+
color : var(--ant-error-color);
|
|
151
|
+
border-color: var(--ant-error-color);
|
|
152
|
+
background : #fff;
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
a {
|
|
156
|
-
|
|
156
|
+
color: var(--ant-primary-color);
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
a:hover {
|
|
160
|
-
|
|
160
|
+
color: var(--ant-primary-5);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.image-selector,
|
|
164
|
+
.icon-selector {
|
|
165
|
+
.img-upload {
|
|
166
|
+
width : 40px;
|
|
167
|
+
height: 40px;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.ant-upload-select {
|
|
171
|
+
|
|
172
|
+
.img-wrapper {
|
|
173
|
+
position: relative;
|
|
174
|
+
|
|
175
|
+
.clear-btn {
|
|
176
|
+
position : absolute;
|
|
177
|
+
left : 0;
|
|
178
|
+
top : 0;
|
|
179
|
+
width : 100%;
|
|
180
|
+
height : 100%;
|
|
181
|
+
background : rgba(199, 202, 212, 0.9);
|
|
182
|
+
display : flex;
|
|
183
|
+
align-items : flex-start;
|
|
184
|
+
padding : 4px;
|
|
185
|
+
color : #1f4265;
|
|
186
|
+
justify-content: end;
|
|
187
|
+
display : none;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
&:hover {
|
|
191
|
+
.clear-btn {
|
|
192
|
+
display: flex;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.img-preview {
|
|
197
|
+
max-width : 150px;
|
|
198
|
+
max-height: 150px;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
.img-choose {
|
|
206
|
+
margin: 8px 0;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.img-desc {
|
|
210
|
+
color: rgba(69, 77, 100, 0.7)
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.ant-modal-body {
|
|
214
|
+
padding : 8px;
|
|
215
|
+
max-height: calc(100vh - 180px);
|
|
216
|
+
overflow-y: auto;
|
|
217
|
+
}
|
|
161
218
|
}
|
|
@@ -3,10 +3,22 @@ import type { exportParam } from 'ls-pro-table/lib/components/Export';
|
|
|
3
3
|
import type { ProFormInstance } from 'ls-pro-form';
|
|
4
4
|
import type { SingleParamType } from '../useSingle';
|
|
5
5
|
export declare type DtlParamType = SingleParamType & {
|
|
6
|
+
/**重置主表对象方法 */
|
|
7
|
+
setMaster?: (item: any) => void;
|
|
8
|
+
/**@name 主表主键字段 */
|
|
6
9
|
mstKeyField: string;
|
|
10
|
+
/**@name 从表服务 */
|
|
7
11
|
dtlService: any;
|
|
12
|
+
/**@name 从表关联字段 */
|
|
8
13
|
relationField: string;
|
|
14
|
+
/**@name 从表新增行时默认值 */
|
|
9
15
|
dtlItem: any;
|
|
16
|
+
/**@name 从表名,主从表一起保存时必传参 */
|
|
17
|
+
dtlName?: string;
|
|
18
|
+
/**@name 单据类型,主从表一起保存时必传参 */
|
|
19
|
+
billType?: string;
|
|
20
|
+
/**@name 动态编码规则字段,主从表一起保存传参 */
|
|
21
|
+
codeRuleDynamicField?: string;
|
|
10
22
|
};
|
|
11
23
|
declare function useDtl(dtlParam: DtlParamType): {
|
|
12
24
|
formRef: import("react").MutableRefObject<ProFormInstance<any> | undefined>;
|
|
@@ -25,6 +37,7 @@ declare function useDtl(dtlParam: DtlParamType): {
|
|
|
25
37
|
onAddDtl: (item?: any) => Promise<boolean>;
|
|
26
38
|
onEditDtl: (item?: any) => Promise<boolean>;
|
|
27
39
|
onSaveMst: (values: any) => Promise<boolean>;
|
|
40
|
+
onSaveMstDtl: (isDelete?: boolean) => Promise<boolean | undefined>;
|
|
28
41
|
onRemoveMst: () => Promise<boolean | undefined>;
|
|
29
42
|
onExportDtl: (url: string, param: exportParam) => Promise<boolean>;
|
|
30
43
|
isAudit: () => boolean;
|