uview-pro 0.5.18 → 0.6.0-beta.0
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 +25 -0
- package/components/u-divider/u-divider.vue +3 -2
- package/components/u-upload/types.ts +78 -9
- package/components/u-upload/u-upload.vue +1168 -230
- package/locale/lang/en-US.ts +8 -2
- package/locale/lang/zh-CN.ts +8 -2
- package/package.json +1 -1
- package/types/global.d.ts +25 -0
package/locale/lang/en-US.ts
CHANGED
|
@@ -6,7 +6,11 @@ export default {
|
|
|
6
6
|
cancelText: 'Cancel'
|
|
7
7
|
},
|
|
8
8
|
uUpload: {
|
|
9
|
-
uploadText: 'Select
|
|
9
|
+
uploadText: 'Select File',
|
|
10
|
+
uploadImage: 'Select Image',
|
|
11
|
+
uploadVideo: 'Select Video',
|
|
12
|
+
uploadFile: 'Select File',
|
|
13
|
+
uploadMedia: 'Select Media',
|
|
10
14
|
retry: 'Retry',
|
|
11
15
|
overSize: 'File size exceeds allowed limit',
|
|
12
16
|
overMaxCount: 'Exceeds maximum allowed number of files',
|
|
@@ -20,7 +24,9 @@ export default {
|
|
|
20
24
|
removeSuccess: 'Removed successfully',
|
|
21
25
|
previewFailed: 'Failed to preview image',
|
|
22
26
|
notAllowedExt: 'Files with {ext} format are not allowed',
|
|
23
|
-
noAction: 'Please configure upload address'
|
|
27
|
+
noAction: 'Please configure upload address',
|
|
28
|
+
fileNotSupported: 'File selection is not supported on this platform',
|
|
29
|
+
openFailed: 'Unable to open this file'
|
|
24
30
|
},
|
|
25
31
|
uVerificationCode: {
|
|
26
32
|
startText: 'Get Code',
|
package/locale/lang/zh-CN.ts
CHANGED
|
@@ -6,7 +6,11 @@ export default {
|
|
|
6
6
|
cancelText: '取消'
|
|
7
7
|
},
|
|
8
8
|
uUpload: {
|
|
9
|
-
uploadText: '
|
|
9
|
+
uploadText: '选择文件',
|
|
10
|
+
uploadImage: '选择图片',
|
|
11
|
+
uploadVideo: '选择视频',
|
|
12
|
+
uploadFile: '选择文件',
|
|
13
|
+
uploadMedia: '选择媒体',
|
|
10
14
|
retry: '点击重试',
|
|
11
15
|
overSize: '超出允许的文件大小',
|
|
12
16
|
overMaxCount: '超出最大允许的文件个数',
|
|
@@ -20,7 +24,9 @@ export default {
|
|
|
20
24
|
removeSuccess: '移除成功',
|
|
21
25
|
previewFailed: '预览图片失败',
|
|
22
26
|
notAllowedExt: '不允许选择{ext}格式的文件',
|
|
23
|
-
noAction: '请配置上传地址'
|
|
27
|
+
noAction: '请配置上传地址',
|
|
28
|
+
fileNotSupported: '当前平台暂不支持文件选择',
|
|
29
|
+
openFailed: '无法打开此文件'
|
|
24
30
|
},
|
|
25
31
|
uVerificationCode: {
|
|
26
32
|
startText: '获取验证码',
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "uview-pro",
|
|
3
3
|
"name": "uview-pro",
|
|
4
4
|
"displayName": "【支持鸿蒙】uView Pro|基于Vue3+TS的高质量UI组件库,支持多主题、暗黑模式、多语言",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.6.0-beta.0",
|
|
6
6
|
"description": "uView Pro是基于Vue3+TS的多平台UI框架,提供80+高质量组件、便捷工具和常用模板,支持多主题、暗黑模式、多语言,支持H5/APP/鸿蒙/小程序多端开发。已在鸿蒙应用商店上架,欢迎体验!",
|
|
7
7
|
"main": "index.ts",
|
|
8
8
|
"module": "index.ts",
|
package/types/global.d.ts
CHANGED
|
@@ -298,6 +298,31 @@ export type TagSize = 'default' | 'mini';
|
|
|
298
298
|
export type ToastPosition = 'top' | 'center' | 'bottom';
|
|
299
299
|
export type UploadSizeType = 'original' | 'compressed';
|
|
300
300
|
export type UploadSourceType = 'album' | 'camera';
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* 上传文件类型
|
|
304
|
+
* @description image-图片, video-视频, file-文件, media-媒体(图片+视频), all-所有文件
|
|
305
|
+
*/
|
|
306
|
+
export type UploadAcceptType = 'image' | 'video' | 'file' | 'media' | 'all';
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* 上传文件项
|
|
310
|
+
*/
|
|
311
|
+
export interface UploadFileItem {
|
|
312
|
+
url?: string;
|
|
313
|
+
path?: string;
|
|
314
|
+
name?: string;
|
|
315
|
+
size?: number;
|
|
316
|
+
type?: string;
|
|
317
|
+
fileType?: 'image' | 'video' | 'file';
|
|
318
|
+
progress?: number;
|
|
319
|
+
error?: boolean;
|
|
320
|
+
response?: any;
|
|
321
|
+
uploadTask?: any;
|
|
322
|
+
file?: any;
|
|
323
|
+
thumb?: string;
|
|
324
|
+
[key: string]: any;
|
|
325
|
+
}
|
|
301
326
|
// fab 组件 position
|
|
302
327
|
export type FabPosition =
|
|
303
328
|
| 'left-top'
|