@jiaozhiye/qm-design-react 1.4.0-beta.2 → 1.4.0-beta.4
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/lib/anchor/style/index.less +12 -1
- package/lib/countup/style/index.less +22 -22
- package/lib/divider/style/index.less +54 -54
- package/lib/form/src/form.d.ts +3 -0
- package/lib/form/src/types.d.ts +7 -0
- package/lib/form/src/utils.d.ts +3 -1
- package/lib/form/style/index.less +13 -8
- package/lib/index.esm.js +2 -2
- package/lib/index.full.js +1 -1
- package/lib/index.js +2 -2
- package/lib/locale/lang/en.d.ts +1 -0
- package/lib/locale/lang/en.js +2 -1
- package/lib/locale/lang/zh-cn.d.ts +1 -0
- package/lib/locale/lang/zh-cn.js +2 -1
- package/lib/print/style/index.less +175 -175
- package/lib/range-table-helper/style/index.less +1 -1
- package/lib/search-helper/style/index.less +1 -1
- package/lib/search-tree/style/index.less +1 -1
- package/lib/split/style/index.less +1 -1
- package/lib/style/compact.css +4 -3
- package/lib/style/compact.min.css +1 -1
- package/lib/style/index.css +13 -14
- package/lib/style/index.min.css +1 -1
- package/lib/style/mixins/reset.less +1 -2
- package/lib/style/themes/compact.less +297 -296
- package/lib/table/style/table.less +374 -374
- package/lib/tree-helper/style/index.less +1 -1
- package/lib/tree-table-helper/style/index.less +1 -1
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
@prefix-anchor: ~'@{qm-prefix}-anchor';
|
|
10
10
|
|
|
11
11
|
.@{prefix-anchor} {
|
|
12
|
-
.reset-
|
|
12
|
+
.reset-container;
|
|
13
13
|
display: flex;
|
|
14
14
|
flex-direction: row;
|
|
15
15
|
&__label {
|
|
@@ -55,7 +55,18 @@
|
|
|
55
55
|
// ------ size ------
|
|
56
56
|
// 40 32 24
|
|
57
57
|
&--lg {
|
|
58
|
+
.@{prefix-anchor}-nav {
|
|
59
|
+
&__item {
|
|
60
|
+
height: @--height-lg;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
58
63
|
}
|
|
59
64
|
&--sm {
|
|
65
|
+
.@{prefix-anchor}-nav {
|
|
66
|
+
&__item {
|
|
67
|
+
height: @--height-sm;
|
|
68
|
+
font-size: 13px;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
60
71
|
}
|
|
61
72
|
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: 焦质晔
|
|
3
|
-
* @Date: 2021-07-23 19:05:57
|
|
4
|
-
* @Last Modified by: 焦质晔
|
|
5
|
-
* @Last Modified time: 2021-08-01 21:58:46
|
|
6
|
-
*/
|
|
7
|
-
@import '../../style/common';
|
|
8
|
-
|
|
9
|
-
@prefix-countup: ~'@{qm-prefix}-countup';
|
|
10
|
-
|
|
11
|
-
.@{prefix-countup} {
|
|
12
|
-
.reset-
|
|
13
|
-
font-size: @--font-size-base;
|
|
14
|
-
// ------ size ------
|
|
15
|
-
// 40 32 24
|
|
16
|
-
&--lg {
|
|
17
|
-
font-size: @--font-size-base;
|
|
18
|
-
}
|
|
19
|
-
&--sm {
|
|
20
|
-
font-size: @--font-size-sm;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
1
|
+
/*
|
|
2
|
+
* @Author: 焦质晔
|
|
3
|
+
* @Date: 2021-07-23 19:05:57
|
|
4
|
+
* @Last Modified by: 焦质晔
|
|
5
|
+
* @Last Modified time: 2021-08-01 21:58:46
|
|
6
|
+
*/
|
|
7
|
+
@import '../../style/common';
|
|
8
|
+
|
|
9
|
+
@prefix-countup: ~'@{qm-prefix}-countup';
|
|
10
|
+
|
|
11
|
+
.@{prefix-countup} {
|
|
12
|
+
.reset-container;
|
|
13
|
+
font-size: @--font-size-base;
|
|
14
|
+
// ------ size ------
|
|
15
|
+
// 40 32 24
|
|
16
|
+
&--lg {
|
|
17
|
+
font-size: @--font-size-base;
|
|
18
|
+
}
|
|
19
|
+
&--sm {
|
|
20
|
+
font-size: @--font-size-sm;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: 焦质晔
|
|
3
|
-
* @Date: 2021-07-23 19:05:57
|
|
4
|
-
* @Last Modified by: 焦质晔
|
|
5
|
-
* @Last Modified time: 2021-08-21 20:34:44
|
|
6
|
-
*/
|
|
7
|
-
@import '../../style/common';
|
|
8
|
-
|
|
9
|
-
@prefix-divider: ~'@{qm-prefix}-divider';
|
|
10
|
-
|
|
11
|
-
.@{prefix-divider} {
|
|
12
|
-
.reset-
|
|
13
|
-
display: flex;
|
|
14
|
-
align-items: center;
|
|
15
|
-
padding: 0 @--padding-md;
|
|
16
|
-
height: @--height-md;
|
|
17
|
-
border: 1px solid @--border-color-base;
|
|
18
|
-
border-radius: @--border-radius-base;
|
|
19
|
-
background-color: @--background-color-cecondary;
|
|
20
|
-
position: relative;
|
|
21
|
-
&::before {
|
|
22
|
-
content: ' ';
|
|
23
|
-
position: absolute;
|
|
24
|
-
width: 6px;
|
|
25
|
-
left: -1px;
|
|
26
|
-
top: -1px;
|
|
27
|
-
bottom: -1px;
|
|
28
|
-
background-color: @--primary-color;
|
|
29
|
-
}
|
|
30
|
-
&__title {
|
|
31
|
-
margin-left: 5px;
|
|
32
|
-
}
|
|
33
|
-
&__extra {
|
|
34
|
-
.text-overflow-cut();
|
|
35
|
-
flex: 1;
|
|
36
|
-
margin-left: @--margin-md;
|
|
37
|
-
}
|
|
38
|
-
&__collapse {
|
|
39
|
-
margin-left: @--margin-md;
|
|
40
|
-
padding-left: 0;
|
|
41
|
-
padding-right: 0;
|
|
42
|
-
.anticon {
|
|
43
|
-
margin-left: 4px !important;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
// ------ size ------
|
|
47
|
-
// 40 32 24
|
|
48
|
-
&--lg {
|
|
49
|
-
height: @--height-lg;
|
|
50
|
-
}
|
|
51
|
-
&--sm {
|
|
52
|
-
height: @--height-sm;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
1
|
+
/*
|
|
2
|
+
* @Author: 焦质晔
|
|
3
|
+
* @Date: 2021-07-23 19:05:57
|
|
4
|
+
* @Last Modified by: 焦质晔
|
|
5
|
+
* @Last Modified time: 2021-08-21 20:34:44
|
|
6
|
+
*/
|
|
7
|
+
@import '../../style/common';
|
|
8
|
+
|
|
9
|
+
@prefix-divider: ~'@{qm-prefix}-divider';
|
|
10
|
+
|
|
11
|
+
.@{prefix-divider} {
|
|
12
|
+
.reset-container;
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
padding: 0 @--padding-md;
|
|
16
|
+
height: @--height-md;
|
|
17
|
+
border: 1px solid @--border-color-base;
|
|
18
|
+
border-radius: @--border-radius-base;
|
|
19
|
+
background-color: @--background-color-cecondary;
|
|
20
|
+
position: relative;
|
|
21
|
+
&::before {
|
|
22
|
+
content: ' ';
|
|
23
|
+
position: absolute;
|
|
24
|
+
width: 6px;
|
|
25
|
+
left: -1px;
|
|
26
|
+
top: -1px;
|
|
27
|
+
bottom: -1px;
|
|
28
|
+
background-color: @--primary-color;
|
|
29
|
+
}
|
|
30
|
+
&__title {
|
|
31
|
+
margin-left: 5px;
|
|
32
|
+
}
|
|
33
|
+
&__extra {
|
|
34
|
+
.text-overflow-cut();
|
|
35
|
+
flex: 1;
|
|
36
|
+
margin-left: @--margin-md;
|
|
37
|
+
}
|
|
38
|
+
&__collapse {
|
|
39
|
+
margin-left: @--margin-md;
|
|
40
|
+
padding-left: 0;
|
|
41
|
+
padding-right: 0;
|
|
42
|
+
.anticon {
|
|
43
|
+
margin-left: 4px !important;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
// ------ size ------
|
|
47
|
+
// 40 32 24
|
|
48
|
+
&--lg {
|
|
49
|
+
height: @--height-lg;
|
|
50
|
+
}
|
|
51
|
+
&--sm {
|
|
52
|
+
height: @--height-sm;
|
|
53
|
+
}
|
|
54
|
+
}
|
package/lib/form/src/form.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ declare class QmForm extends Component<IProps, IState> {
|
|
|
29
29
|
size: (props: any, propName: any, componentName: any) => void;
|
|
30
30
|
cols: import("prop-types").Requireable<number>;
|
|
31
31
|
customClass: import("prop-types").Requireable<string>;
|
|
32
|
+
compactMode: import("prop-types").Requireable<boolean>;
|
|
32
33
|
labelWidth: import("prop-types").Requireable<string | number>;
|
|
33
34
|
labelAlign: import("prop-types").Requireable<string>;
|
|
34
35
|
labelWrap: import("prop-types").Requireable<boolean>;
|
|
@@ -179,6 +180,7 @@ declare class QmForm extends Component<IProps, IState> {
|
|
|
179
180
|
}) => void;
|
|
180
181
|
set_fields_other(values: IFormData): void;
|
|
181
182
|
get_fields_other(fields?: string[]): IFormData;
|
|
183
|
+
openValidateInfo: (errorFields: any) => void;
|
|
182
184
|
scrollToField: (fieldName?: string) => void;
|
|
183
185
|
formValidate(): Promise<IFormData>;
|
|
184
186
|
SET_FIELDS_VALUE(values: IFormData): void;
|
|
@@ -190,6 +192,7 @@ declare class QmForm extends Component<IProps, IState> {
|
|
|
190
192
|
GET_FIELDS_TOUCHED(fields?: string[]): boolean;
|
|
191
193
|
SUBMIT_FORM(): Promise<void>;
|
|
192
194
|
RESET_FORM(): void;
|
|
195
|
+
CREATE_FOCUS(fieldName: string): void;
|
|
193
196
|
SET_FORM_ITEM(fieldName: string, option: Record<string, any>, forceUpdate?: boolean): void;
|
|
194
197
|
render(): JSX.Element;
|
|
195
198
|
}
|
package/lib/form/src/types.d.ts
CHANGED
|
@@ -206,6 +206,11 @@ export declare type IFormItem = {
|
|
|
206
206
|
textKey?: string;
|
|
207
207
|
callback?: (itemList: IRecord[]) => void;
|
|
208
208
|
};
|
|
209
|
+
asyncLoad?: IRequest & {
|
|
210
|
+
valueKey?: string;
|
|
211
|
+
textKey?: string;
|
|
212
|
+
callback?: (itemList: IRecord[]) => void;
|
|
213
|
+
};
|
|
209
214
|
upload?: {
|
|
210
215
|
action?: string;
|
|
211
216
|
headers?: IFetchHeader;
|
|
@@ -247,6 +252,7 @@ export declare type IFormProps = {
|
|
|
247
252
|
size?: ComponentSize;
|
|
248
253
|
cols?: number;
|
|
249
254
|
customClass?: string;
|
|
255
|
+
compactMode?: boolean;
|
|
250
256
|
labelWidth?: number | string;
|
|
251
257
|
labelAlign?: ILabelAlign;
|
|
252
258
|
labelWrap?: boolean;
|
|
@@ -281,6 +287,7 @@ export declare const propTypes: {
|
|
|
281
287
|
size: (props: any, propName: any, componentName: any) => void;
|
|
282
288
|
cols: PropTypes.Requireable<number>;
|
|
283
289
|
customClass: PropTypes.Requireable<string>;
|
|
290
|
+
compactMode: PropTypes.Requireable<boolean>;
|
|
284
291
|
labelWidth: PropTypes.Requireable<string | number>;
|
|
285
292
|
labelAlign: PropTypes.Requireable<string>;
|
|
286
293
|
labelWrap: PropTypes.Requireable<boolean>;
|
package/lib/form/src/utils.d.ts
CHANGED
|
@@ -7,7 +7,9 @@ export declare const isEmptyValue: (value: unknown) => boolean;
|
|
|
7
7
|
export declare const getSplitValue: (data: IRecord, path: string) => any;
|
|
8
8
|
export declare const setEchoRecord: (row: IRecord, alias: any, echoAlias: any) => void;
|
|
9
9
|
export declare const setEchoExtras: (row: IRecord, extras: any, echoExtras: any) => void;
|
|
10
|
-
export declare const deepMapList: (list: any[], valueKey: string, textKey: string) => IDict
|
|
10
|
+
export declare const deepMapList: (list: any[], valueKey: string, textKey: string) => (IDict & {
|
|
11
|
+
isLeaf?: boolean | undefined;
|
|
12
|
+
})[];
|
|
11
13
|
export declare const deepFind: (arr: any[], mark: string) => any;
|
|
12
14
|
export declare const deepFindValues: <T>(arr: T[], str: string, depth?: number) => T[];
|
|
13
15
|
export declare const deepGetPath: (arr: any[], value: string) => string[] | undefined;
|
|
@@ -129,9 +129,6 @@
|
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
|
-
&__only-show {
|
|
133
|
-
// ...
|
|
134
|
-
}
|
|
135
132
|
// ------ size ------
|
|
136
133
|
// 40 32 24
|
|
137
134
|
&--lg {
|
|
@@ -139,11 +136,6 @@
|
|
|
139
136
|
&--sm {
|
|
140
137
|
.ant-form-item {
|
|
141
138
|
margin-bottom: @--margin-md;
|
|
142
|
-
// label
|
|
143
|
-
.ant-form-item-label > label,
|
|
144
|
-
.ant-form-item-label .ant-form-item-tooltip {
|
|
145
|
-
font-size: @--font-size-sm;
|
|
146
|
-
}
|
|
147
139
|
// valigator
|
|
148
140
|
.ant-form-item-control {
|
|
149
141
|
// 待优化
|
|
@@ -154,6 +146,19 @@
|
|
|
154
146
|
}
|
|
155
147
|
}
|
|
156
148
|
}
|
|
149
|
+
&__only-show {
|
|
150
|
+
// ...
|
|
151
|
+
}
|
|
152
|
+
&__compact {
|
|
153
|
+
.ant-form-item {
|
|
154
|
+
margin-bottom: 4px;
|
|
155
|
+
.ant-form-item-control {
|
|
156
|
+
& > div:nth-last-of-type(1)[style*='nowrap'] {
|
|
157
|
+
display: none !important;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
157
162
|
}
|
|
158
163
|
|
|
159
164
|
.ant-picker-footer-extra {
|