@jiaozhiye/qm-design-react 1.7.44 → 1.7.46
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/antd/index.d.ts +4 -2
- package/lib/form/src/types.d.ts +1 -0
- package/lib/index.esm.js +1 -1
- package/lib/index.full.js +1 -1
- package/lib/index.js +1 -1
- package/lib/locale/lang/en.js +5 -5
- package/lib/locale/lang/zh-cn.js +5 -5
- package/lib/style/index.css +16 -3
- package/lib/style/index.min.css +1 -1
- package/lib/upload-file/src/upload-file.d.ts +5 -0
- package/lib/upload-file/style/index.less +37 -18
- package/lib/upload-img/src/upload-img.d.ts +3 -0
- package/package.json +1 -1
|
@@ -11,6 +11,8 @@ export interface UploadFile {
|
|
|
11
11
|
type IProps = Omit<UploadProps, 'onPreview'> & {
|
|
12
12
|
fileTypes?: string[];
|
|
13
13
|
fileSize?: number;
|
|
14
|
+
readOnly?: boolean;
|
|
15
|
+
fileDirection?: 'horizontal' | 'vertical';
|
|
14
16
|
button?: {
|
|
15
17
|
text?: string;
|
|
16
18
|
} & ButtonProps;
|
|
@@ -18,15 +20,18 @@ type IProps = Omit<UploadProps, 'onPreview'> & {
|
|
|
18
20
|
};
|
|
19
21
|
export type UploadFileProps = IProps;
|
|
20
22
|
declare class QmUploadFile extends Component<IProps> {
|
|
23
|
+
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
21
24
|
static defaultProps: {
|
|
22
25
|
name: string;
|
|
23
26
|
multiple: boolean;
|
|
27
|
+
fileDirection: string;
|
|
24
28
|
showUploadList: {
|
|
25
29
|
showPreviewIcon: boolean;
|
|
26
30
|
showDownloadIcon: boolean;
|
|
27
31
|
showRemoveIcon: boolean;
|
|
28
32
|
};
|
|
29
33
|
};
|
|
34
|
+
get $size(): any;
|
|
30
35
|
beforeUpload: (file: any, fileList: any) => Promise<any>;
|
|
31
36
|
downloadFile(url: string, fileName?: string): Promise<void>;
|
|
32
37
|
doDownload: (file: any) => Promise<void>;
|
|
@@ -1,18 +1,37 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: 焦质晔
|
|
3
|
-
* @Date: 2021-07-23 19:05:57
|
|
4
|
-
* @Last Modified by: 焦质晔
|
|
5
|
-
* @Last Modified time: 2023-10-18 09:35:59
|
|
6
|
-
*/
|
|
7
|
-
@import '../../style/common';
|
|
8
|
-
|
|
9
|
-
@prefix-upload-file: ~'@{qm-prefix}-upload-file';
|
|
10
|
-
|
|
11
|
-
.@{prefix-upload-file} {
|
|
12
|
-
|
|
13
|
-
.ant-upload-list-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
/*
|
|
2
|
+
* @Author: 焦质晔
|
|
3
|
+
* @Date: 2021-07-23 19:05:57
|
|
4
|
+
* @Last Modified by: 焦质晔
|
|
5
|
+
* @Last Modified time: 2023-10-18 09:35:59
|
|
6
|
+
*/
|
|
7
|
+
@import '../../style/common';
|
|
8
|
+
|
|
9
|
+
@prefix-upload-file: ~'@{qm-prefix}-upload-file';
|
|
10
|
+
|
|
11
|
+
.@{prefix-upload-file} {
|
|
12
|
+
.ant-upload-list {
|
|
13
|
+
.ant-upload-list-text-container {
|
|
14
|
+
max-width: 100%;
|
|
15
|
+
}
|
|
16
|
+
.ant-upload-list-item {
|
|
17
|
+
height: 30px;
|
|
18
|
+
margin: 0;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
&--horizontal {
|
|
22
|
+
.ant-upload-list {
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-wrap: wrap;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
&--lg {
|
|
28
|
+
.ant-upload-list .ant-upload-list-item {
|
|
29
|
+
height: 38px;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
&--sm {
|
|
33
|
+
.ant-upload-list .ant-upload-list-item {
|
|
34
|
+
height: 22px;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -14,6 +14,7 @@ type IProps = UploadProps & {
|
|
|
14
14
|
fileTypes?: string[];
|
|
15
15
|
fileSize?: number;
|
|
16
16
|
openCropper?: boolean;
|
|
17
|
+
readOnly?: boolean;
|
|
17
18
|
beforeCrop?: (file: UploadFile, fileList: UploadFile[]) => Promise<boolean>;
|
|
18
19
|
};
|
|
19
20
|
type IState = {
|
|
@@ -22,6 +23,7 @@ type IState = {
|
|
|
22
23
|
};
|
|
23
24
|
export type UploadImgProps = IProps;
|
|
24
25
|
declare class QmUploadImg extends Component<IProps, IState> {
|
|
26
|
+
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
25
27
|
static defaultProps: {
|
|
26
28
|
name: string;
|
|
27
29
|
multiple: boolean;
|
|
@@ -31,6 +33,7 @@ declare class QmUploadImg extends Component<IProps, IState> {
|
|
|
31
33
|
openCropper: boolean;
|
|
32
34
|
};
|
|
33
35
|
state: IState;
|
|
36
|
+
get $size(): any;
|
|
34
37
|
get showUploadButton(): boolean;
|
|
35
38
|
beforeUpload: (file: any, fileList: any) => Promise<any>;
|
|
36
39
|
handlePreview: (file: any) => void;
|