beer-assembly-biz 1.1.3-alpha.3 → 1.1.3-alpha.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/UploadModals.d.ts +12 -0
- package/UploadModals.js +233 -0
- package/auth/AuthStyle01.d.ts +2 -2
- package/auth/AuthStyle01.js +1 -1
- package/auth/AuthStyle02.d.ts +2 -2
- package/auth/AuthStyle02.js +1 -1
- package/index.d.ts +5 -2
- package/index.js +5 -2
- package/layout/BackPageContainer.d.ts +1 -0
- package/layout/BackPageContainer.js +4 -1
- package/media/Media.d.ts +84 -0
- package/media/Media.js +241 -0
- package/media/MediaModals.d.ts +17 -0
- package/media/MediaModals.js +172 -461
- package/package.json +2 -1
- package/promises.d.ts +7 -1
- package/promises.js +19 -6
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Handler } from './type';
|
|
3
|
+
export type FileType = 'IMAGE' | 'GIT' | 'VIDEO' | 'DOCUMENT';
|
|
4
|
+
/**
|
|
5
|
+
* 文件上传模态框.
|
|
6
|
+
*/
|
|
7
|
+
export declare class UploadModals {
|
|
8
|
+
/**
|
|
9
|
+
* 弹出文件上传.
|
|
10
|
+
*/
|
|
11
|
+
static useUpload(fileType: FileType[], key?: string): [Handler<File[]>, ReactNode];
|
|
12
|
+
}
|
package/UploadModals.js
ADDED
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import React, { useRef, useState } from 'react';
|
|
2
|
+
import { Button, Checkbox, Modal, Space } from 'antd';
|
|
3
|
+
import { css } from '@emotion/css';
|
|
4
|
+
import ElementUtils from 'beer-network/elementUtils';
|
|
5
|
+
/**
|
|
6
|
+
* 文件上传模态框.
|
|
7
|
+
*/
|
|
8
|
+
export class UploadModals {
|
|
9
|
+
/**
|
|
10
|
+
* 弹出文件上传.
|
|
11
|
+
*/
|
|
12
|
+
static useUpload(fileType, key = 'DEFAULT') {
|
|
13
|
+
const [isOpenModal, setIsOpenModal] = useState(false);
|
|
14
|
+
const [isPop, setIsPop] = useState(false);
|
|
15
|
+
const callbackRef = useRef(undefined);
|
|
16
|
+
const getPopStatus = () => {
|
|
17
|
+
return localStorage.getItem('__UPLOAD_MODALS_' + key) !== '1';
|
|
18
|
+
};
|
|
19
|
+
const setPopStatus = (status) => {
|
|
20
|
+
if (status) {
|
|
21
|
+
localStorage.setItem('__UPLOAD_MODALS_' + key, '1');
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
const filterFile = (files) => {
|
|
25
|
+
if (files === null) {
|
|
26
|
+
return [];
|
|
27
|
+
}
|
|
28
|
+
const result = [];
|
|
29
|
+
for (let i = 0; i < files.length; i += 1) {
|
|
30
|
+
const file = files.item(i) ?? undefined;
|
|
31
|
+
if (file === undefined) {
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
const type = fileType.find(it => {
|
|
35
|
+
if (it === 'IMAGE' && ['image/png', 'image/jpeg', 'image/webp'].indexOf(file.type) > -1) {
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
const fileExtension = file.name.split('.')
|
|
39
|
+
?.pop()
|
|
40
|
+
?.toLowerCase() ?? 'none';
|
|
41
|
+
return it === 'VIDEO' && ['wmv', 'avi', '3gp', 'mov', 'mp4', 'flv', 'rmvb', 'mkv', 'm4v', 'x-flv'].indexOf(fileExtension) > -1;
|
|
42
|
+
});
|
|
43
|
+
if (type === undefined) {
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
let size = 0;
|
|
47
|
+
switch (type) {
|
|
48
|
+
case 'IMAGE':
|
|
49
|
+
size = 10 * 1024 * 1024;
|
|
50
|
+
break;
|
|
51
|
+
case 'VIDEO':
|
|
52
|
+
size = 300 * 1024 * 1024;
|
|
53
|
+
break;
|
|
54
|
+
default:
|
|
55
|
+
size = 50 * 1024 * 1024;
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
if (file.size > size) {
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
result.push(file);
|
|
62
|
+
}
|
|
63
|
+
return result;
|
|
64
|
+
};
|
|
65
|
+
const onSelectFile = async () => {
|
|
66
|
+
const fileList = await ElementUtils.selectFile(true);
|
|
67
|
+
await callbackRef.current?.(filterFile(fileList));
|
|
68
|
+
};
|
|
69
|
+
const onConfirm = async () => {
|
|
70
|
+
if (callbackRef.current) {
|
|
71
|
+
setPopStatus(isPop);
|
|
72
|
+
onSelectFile()
|
|
73
|
+
.then();
|
|
74
|
+
setIsOpenModal(false);
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
setIsOpenModal(false);
|
|
78
|
+
}
|
|
79
|
+
return true;
|
|
80
|
+
};
|
|
81
|
+
const handler = {
|
|
82
|
+
ok: (callback) => {
|
|
83
|
+
if (!getPopStatus()) {
|
|
84
|
+
onSelectFile()
|
|
85
|
+
.then();
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
setIsPop(false);
|
|
89
|
+
setIsOpenModal(true);
|
|
90
|
+
callbackRef.current = callback;
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
return [handler, React.createElement(React.Fragment, null,
|
|
94
|
+
React.createElement(Modal, { title: "\u6587\u4EF6\u4E0A\u4F20\u8981\u6C42", width: 360, open: isOpenModal, onCancel: () => setIsOpenModal(false), styles: {
|
|
95
|
+
content: {
|
|
96
|
+
padding: 0
|
|
97
|
+
},
|
|
98
|
+
header: {
|
|
99
|
+
paddingBlock: '16px 0',
|
|
100
|
+
paddingInline: 20,
|
|
101
|
+
marginInlineStart: 0,
|
|
102
|
+
marginBlockEnd: 0
|
|
103
|
+
},
|
|
104
|
+
wrapper: {
|
|
105
|
+
padding: 0
|
|
106
|
+
},
|
|
107
|
+
body: {
|
|
108
|
+
paddingInline: 20,
|
|
109
|
+
paddingBlockStart: 8,
|
|
110
|
+
paddingBlockEnd: 4
|
|
111
|
+
},
|
|
112
|
+
footer: {
|
|
113
|
+
margin: 0,
|
|
114
|
+
paddingBlockEnd: 12
|
|
115
|
+
}
|
|
116
|
+
}, footer: React.createElement(Space, { style: {
|
|
117
|
+
width: '100%',
|
|
118
|
+
boxSizing: 'border-box',
|
|
119
|
+
justifyContent: 'space-between',
|
|
120
|
+
paddingInline: 20,
|
|
121
|
+
paddingBlock: 4
|
|
122
|
+
} },
|
|
123
|
+
React.createElement(Checkbox, { checked: isPop, onChange: (e) => setIsPop(e.target.checked) }, "\u4E0B\u6B21\u4E0D\u5728\u5F39\u51FA"),
|
|
124
|
+
React.createElement(Space, { size: 12 },
|
|
125
|
+
React.createElement(Button, { type: "primary", onClick: onConfirm }, "\u786E\u5B9A"),
|
|
126
|
+
React.createElement(Button, { onClick: () => setIsOpenModal(false) }, "\u53D6\u6D88"))) },
|
|
127
|
+
React.createElement("div", { className: css `
|
|
128
|
+
.title {
|
|
129
|
+
font-weight: 500;
|
|
130
|
+
font-size: 14px;
|
|
131
|
+
margin: 12px 0 4px 0;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.title:first-child {
|
|
135
|
+
margin-top: 4px;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
ul {
|
|
139
|
+
margin: 0;
|
|
140
|
+
padding-left: 20px;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
li {
|
|
144
|
+
padding-block: 2px;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.desc {
|
|
148
|
+
margin: 4px 0;
|
|
149
|
+
font-size: 12px;
|
|
150
|
+
color: #444
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
code {
|
|
154
|
+
background: #EFEFEF;
|
|
155
|
+
padding: 2px 4px;
|
|
156
|
+
border-radius: 2px;
|
|
157
|
+
font-size: 12px;
|
|
158
|
+
}
|
|
159
|
+
` },
|
|
160
|
+
fileType.find(it => it === 'IMAGE') !== undefined ? React.createElement(React.Fragment, null,
|
|
161
|
+
fileType.length === 1 ? undefined : React.createElement("div", { className: "title" }, "\u56FE\u7247"),
|
|
162
|
+
React.createElement("ul", null,
|
|
163
|
+
React.createElement("li", null, "\u5355\u5F20\u5927\u5C0F\uFF1A\u226410M"),
|
|
164
|
+
React.createElement("li", null,
|
|
165
|
+
"\u683C\u5F0F\uFF1A",
|
|
166
|
+
React.createElement("code", null, "JPEG"),
|
|
167
|
+
"\u3001",
|
|
168
|
+
React.createElement("code", null, "JPG"),
|
|
169
|
+
"\u3001",
|
|
170
|
+
React.createElement("code", null, "PNG"),
|
|
171
|
+
"\u3001",
|
|
172
|
+
React.createElement("code", null, "WEBP")))) : undefined,
|
|
173
|
+
fileType.find(it => it === 'GIT') !== undefined ? React.createElement(React.Fragment, null,
|
|
174
|
+
fileType.length === 1 ? undefined : React.createElement("div", { className: "title" }, "\u52A8\u56FE\uFF08GIF\uFF09"),
|
|
175
|
+
React.createElement("ul", null,
|
|
176
|
+
React.createElement("li", null, "\u5355\u4E2A\u5927\u5C0F\uFF1A\u226410M"),
|
|
177
|
+
React.createElement("li", null,
|
|
178
|
+
"\u683C\u5F0F\uFF1A",
|
|
179
|
+
React.createElement("code", null, "GIF")))) : undefined,
|
|
180
|
+
fileType.find(it => it === 'VIDEO') !== undefined ? React.createElement(React.Fragment, null,
|
|
181
|
+
fileType.length === 1 ? undefined : React.createElement("div", { className: "title" }, "\u89C6\u9891"),
|
|
182
|
+
React.createElement("ul", null,
|
|
183
|
+
React.createElement("li", null, "\u5355\u4E2A\u5927\u5C0F\uFF1A\u2264300M"),
|
|
184
|
+
React.createElement("li", null, "\u65F6\u957F\uFF1A\u226410\u5206\u949F"),
|
|
185
|
+
React.createElement("li", null,
|
|
186
|
+
"\u683C\u5F0F\uFF1A",
|
|
187
|
+
React.createElement("code", null, "WMV"),
|
|
188
|
+
"\u3001",
|
|
189
|
+
React.createElement("code", null, "AVI"),
|
|
190
|
+
"\u3001",
|
|
191
|
+
React.createElement("code", null, "3GP"),
|
|
192
|
+
"\u3001",
|
|
193
|
+
React.createElement("code", null, "MOV"),
|
|
194
|
+
"\u3001",
|
|
195
|
+
React.createElement("code", null, "MP4"),
|
|
196
|
+
"\u3001",
|
|
197
|
+
React.createElement("code", null, "FLV"),
|
|
198
|
+
"\u3001",
|
|
199
|
+
React.createElement("code", null, "RMVB"),
|
|
200
|
+
"\u3001",
|
|
201
|
+
React.createElement("code", null, "MKV"),
|
|
202
|
+
"\u3001",
|
|
203
|
+
React.createElement("code", null, "M4V"),
|
|
204
|
+
"\u3001",
|
|
205
|
+
React.createElement("code", null, "X-FLV")))) : undefined,
|
|
206
|
+
fileType.find(it => it === 'DOCUMENT') !== undefined ? React.createElement(React.Fragment, null,
|
|
207
|
+
fileType.length === 1 ? undefined : React.createElement("div", { className: "title" }, "\u6587\u6863"),
|
|
208
|
+
React.createElement("ul", null,
|
|
209
|
+
React.createElement("li", null, "\u5355\u4E2A\u5927\u5C0F\uFF1A\u226430M"),
|
|
210
|
+
React.createElement("li", null,
|
|
211
|
+
"\u683C\u5F0F\uFF1A",
|
|
212
|
+
React.createElement("code", null, "PDF"),
|
|
213
|
+
"\u3001",
|
|
214
|
+
React.createElement("code", null, "DOC"),
|
|
215
|
+
"\u3001",
|
|
216
|
+
React.createElement("code", null, "DOCX"),
|
|
217
|
+
"\u3001",
|
|
218
|
+
React.createElement("code", null, "XLS"),
|
|
219
|
+
"\u3001",
|
|
220
|
+
React.createElement("code", null, "XLSX"),
|
|
221
|
+
"\u3001",
|
|
222
|
+
React.createElement("code", null, "PPT"),
|
|
223
|
+
"\u3001",
|
|
224
|
+
React.createElement("code", null, "PPTX"),
|
|
225
|
+
"\u3001",
|
|
226
|
+
React.createElement("code", null, "TXT")))) : undefined,
|
|
227
|
+
React.createElement("div", { style: { marginTop: 12 } },
|
|
228
|
+
React.createElement("div", { className: "desc" },
|
|
229
|
+
React.createElement("span", { style: { fontWeight: 500 } }, "\u4E25\u7981\u4E0A\u4F20\u5BFC\u6D41\u3001\u8FDD\u89C4\u6216\u8FDD\u7981\u5185\u5BB9"),
|
|
230
|
+
"\uFF0C\u8FDD\u8005\u5C06\u5C01\u7981\u8D26\u53F7\u5904\u7406\u3002"),
|
|
231
|
+
React.createElement("div", { className: "desc" }, "\u8BF7\u786E\u4FDD\u6587\u4EF6\u7B26\u5408\u683C\u5F0F\u53CA\u5927\u5C0F\u8981\u6C42\uFF0C\u5426\u5219\u53EF\u80FD\u4E0A\u4F20\u5931\u8D25\u3002")))))];
|
|
232
|
+
}
|
|
233
|
+
}
|
package/auth/AuthStyle01.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { Slider, SliderCodeToken } from '../slider/SliderCode';
|
|
3
|
-
export declare type
|
|
3
|
+
export declare type AuthStyle01Props = {
|
|
4
4
|
/**
|
|
5
5
|
* 主颜色.
|
|
6
6
|
*/
|
|
@@ -67,4 +67,4 @@ export declare type AuthStyleProps = {
|
|
|
67
67
|
*/
|
|
68
68
|
login?: (userInfo: any) => void;
|
|
69
69
|
};
|
|
70
|
-
export declare const
|
|
70
|
+
export declare const AuthStyle01: FC<AuthStyle01Props>;
|
package/auth/AuthStyle01.js
CHANGED
|
@@ -4,7 +4,7 @@ import { css } from '@emotion/css';
|
|
|
4
4
|
import { AuthPassword } from './AuthPassword';
|
|
5
5
|
import ImageBackground from '../images/assets_background_01.png';
|
|
6
6
|
import { Session } from './session';
|
|
7
|
-
export const
|
|
7
|
+
export const AuthStyle01 = (props) => {
|
|
8
8
|
const { token } = theme.useToken();
|
|
9
9
|
const [errorMessage, setErrorMessage] = useState('');
|
|
10
10
|
const onConfirmLogin = async (code, slider, params) => {
|
package/auth/AuthStyle02.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { Slider, SliderCodeToken } from '../slider/SliderCode';
|
|
3
|
-
export declare type
|
|
3
|
+
export declare type AuthStyle02Props = {
|
|
4
4
|
/**
|
|
5
5
|
* 主颜色.
|
|
6
6
|
*/
|
|
@@ -63,4 +63,4 @@ export declare type AuthStyleProps = {
|
|
|
63
63
|
*/
|
|
64
64
|
login?: (userInfo: any) => void;
|
|
65
65
|
};
|
|
66
|
-
export declare const
|
|
66
|
+
export declare const AuthStyle02: FC<AuthStyle02Props>;
|
package/auth/AuthStyle02.js
CHANGED
|
@@ -4,7 +4,7 @@ import { css } from '@emotion/css';
|
|
|
4
4
|
import ImageBackground from '../images/assets_background_01.png';
|
|
5
5
|
import { Session } from './session';
|
|
6
6
|
import { AuthPassword } from './AuthPassword';
|
|
7
|
-
export const
|
|
7
|
+
export const AuthStyle02 = (props) => {
|
|
8
8
|
const { token } = theme.useToken();
|
|
9
9
|
const [errorMessage, setErrorMessage] = useState('');
|
|
10
10
|
const onConfirmLogin = async (code, slider, params) => {
|
package/index.d.ts
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
export { AuthPassword, AuthPasswordProps } from './auth/AuthPassword';
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
2
|
+
export { AuthStyle01, AuthStyle01Props } from './auth/AuthStyle01';
|
|
3
|
+
export { AuthStyle02, AuthStyle02Props } from './auth/AuthStyle02';
|
|
4
4
|
export { Config } from './config';
|
|
5
5
|
export { ParentContext } from './content/ParentContext';
|
|
6
6
|
export { PermissionContext } from './content/PermissionContext';
|
|
7
7
|
export { AppLayout } from './layout/AppLayout';
|
|
8
8
|
export { BackPageContainer } from './layout/BackPageContainer';
|
|
9
9
|
export { MyPageContainer } from './layout/MyPageContainer';
|
|
10
|
+
export { MediaItem, DirectoryItem, Media, MediaProps } from './media/Media';
|
|
11
|
+
export { MediaModals } from './media/MediaModals';
|
|
10
12
|
export { Permission } from './permission/Permission';
|
|
11
13
|
export { AIEditor, AIEditorProps } from './rich/AIEditor';
|
|
12
14
|
export { Slider, SliderCode, SliderCodeToken } from './slider/SliderCode';
|
|
13
15
|
export { Promises, Async, NumberUtils, CascadeUtils, ArrayUtils, NavigateUtils } from './promises';
|
|
14
16
|
export { UserModals } from './UserModals';
|
|
17
|
+
export { UploadModals, FileType } from './UploadModals';
|
package/index.js
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
export { AuthPassword } from './auth/AuthPassword';
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
2
|
+
export { AuthStyle01 } from './auth/AuthStyle01';
|
|
3
|
+
export { AuthStyle02 } from './auth/AuthStyle02';
|
|
4
4
|
export { Config } from './config';
|
|
5
5
|
export { ParentContext } from './content/ParentContext';
|
|
6
6
|
export { PermissionContext } from './content/PermissionContext';
|
|
7
7
|
export { AppLayout } from './layout/AppLayout';
|
|
8
8
|
export { BackPageContainer } from './layout/BackPageContainer';
|
|
9
9
|
export { MyPageContainer } from './layout/MyPageContainer';
|
|
10
|
+
export { Media } from './media/Media';
|
|
11
|
+
export { MediaModals } from './media/MediaModals';
|
|
10
12
|
export { Permission } from './permission/Permission';
|
|
11
13
|
export { AIEditor } from './rich/AIEditor';
|
|
12
14
|
export { SliderCode } from './slider/SliderCode';
|
|
13
15
|
export { Promises, Async, NumberUtils, CascadeUtils, ArrayUtils, NavigateUtils } from './promises';
|
|
14
16
|
export { UserModals } from './UserModals';
|
|
17
|
+
export { UploadModals } from './UploadModals';
|
|
@@ -11,7 +11,10 @@ export const BackPageContainer = (props) => {
|
|
|
11
11
|
const navigate = useNavigate();
|
|
12
12
|
return React.createElement(React.Fragment, null,
|
|
13
13
|
React.createElement(PageContainer, { onBack: () => {
|
|
14
|
-
|
|
14
|
+
const defaultBack = () => {
|
|
15
|
+
return navigate(-1);
|
|
16
|
+
};
|
|
17
|
+
(props?.onBack ?? defaultBack)?.();
|
|
15
18
|
}, className: css `
|
|
16
19
|
.ant-page-header-heading {
|
|
17
20
|
padding-block-start: 0 !important;
|
package/media/Media.d.ts
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { CSSProperties, FC, Key } from 'react';
|
|
2
|
+
import { TreeDataNode } from 'antd';
|
|
3
|
+
export declare type MediaItem = {
|
|
4
|
+
/**
|
|
5
|
+
* 资源唯一标识.
|
|
6
|
+
*/
|
|
7
|
+
key: string;
|
|
8
|
+
/**
|
|
9
|
+
* 文件名称.
|
|
10
|
+
*/
|
|
11
|
+
fileName: string;
|
|
12
|
+
/**
|
|
13
|
+
* 文件长度.
|
|
14
|
+
*/
|
|
15
|
+
fileLength?: string;
|
|
16
|
+
/**
|
|
17
|
+
* 文件属性.
|
|
18
|
+
*/
|
|
19
|
+
attribute?: {
|
|
20
|
+
resolution?: string;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* 文件实际地址.
|
|
24
|
+
*/
|
|
25
|
+
url?: string;
|
|
26
|
+
/**
|
|
27
|
+
* 预览地址 缩略图.
|
|
28
|
+
*/
|
|
29
|
+
preview?: string;
|
|
30
|
+
};
|
|
31
|
+
export declare type DirectoryItem = {
|
|
32
|
+
/**
|
|
33
|
+
* 宽度 (控制是否显示省略号).
|
|
34
|
+
*/
|
|
35
|
+
width?: number;
|
|
36
|
+
children?: DirectoryItem[];
|
|
37
|
+
} & TreeDataNode;
|
|
38
|
+
export declare type MediaProps = {
|
|
39
|
+
/**
|
|
40
|
+
* 已选组件.
|
|
41
|
+
*/
|
|
42
|
+
value?: MediaItem[];
|
|
43
|
+
/**
|
|
44
|
+
* 样式.
|
|
45
|
+
*/
|
|
46
|
+
style?: CSSProperties;
|
|
47
|
+
/**
|
|
48
|
+
* 目录宽度.
|
|
49
|
+
*/
|
|
50
|
+
directoryWidth?: number;
|
|
51
|
+
/**
|
|
52
|
+
* 组件高度.
|
|
53
|
+
*/
|
|
54
|
+
height?: number;
|
|
55
|
+
/**
|
|
56
|
+
* 目录项.
|
|
57
|
+
*/
|
|
58
|
+
directoryItems?: DirectoryItem[];
|
|
59
|
+
/**
|
|
60
|
+
* 资源项.
|
|
61
|
+
*/
|
|
62
|
+
items?: MediaItem[];
|
|
63
|
+
/**
|
|
64
|
+
* 选择目录回执.
|
|
65
|
+
* @param key 目录ID.
|
|
66
|
+
* @param sortType 排序类型.
|
|
67
|
+
* @param callback 异步状态.
|
|
68
|
+
*/
|
|
69
|
+
onDirectoryChange?: (key: Key, sortType: string, callback: (status: boolean) => void) => void;
|
|
70
|
+
/**
|
|
71
|
+
* 选择资源发生变化.
|
|
72
|
+
* @param items 资源列表。
|
|
73
|
+
*/
|
|
74
|
+
onFileChange?: (items: MediaItem[]) => void;
|
|
75
|
+
/**
|
|
76
|
+
* 上传文件.
|
|
77
|
+
*/
|
|
78
|
+
onUpload?: () => void;
|
|
79
|
+
/**
|
|
80
|
+
* 最大长度.
|
|
81
|
+
*/
|
|
82
|
+
maxLength?: number;
|
|
83
|
+
};
|
|
84
|
+
export declare const Media: FC<MediaProps>;
|