giime 0.4.4 → 0.4.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/dist/index.css +64 -28
- package/es/api/materialApi/cross/getAdFileExist.d.ts +21 -0
- package/es/api/materialApi/cross/getAdFileExist.mjs +8 -0
- package/es/api/materialApi/cross/getAdFileExist.mjs.map +1 -0
- package/es/api/materialApi/cross/getOssAccessToken.d.ts +17 -0
- package/es/api/materialApi/cross/getOssAccessToken.mjs +8 -0
- package/es/api/materialApi/cross/getOssAccessToken.mjs.map +1 -0
- package/es/api/materialApi/cross/index.d.ts +2 -0
- package/es/api/materialApi/cross/index.mjs +3 -0
- package/es/api/materialApi/cross/index.mjs.map +1 -0
- package/es/api/materialApi/index.d.ts +1 -0
- package/es/api/materialApi/index.mjs +4 -0
- package/es/api/materialApi/index.mjs.map +1 -0
- package/es/api/materialApi/request.d.ts +2 -0
- package/es/api/materialApi/request.mjs +18 -0
- package/es/api/materialApi/request.mjs.map +1 -0
- package/es/api/utils/resetAxiosBaseUrl.mjs +0 -1
- package/es/api/utils/resetAxiosBaseUrl.mjs.map +1 -1
- package/es/components/index.mjs +2 -0
- package/es/components/index.mjs.map +1 -1
- package/es/components/src/business/index.d.ts +1 -0
- package/es/components/src/business/index.mjs +2 -0
- package/es/components/src/business/index.mjs.map +1 -1
- package/es/components/src/business/uploadMaterial/UploadMaterial.vue.d.ts +306 -0
- package/es/components/src/business/uploadMaterial/UploadMaterial.vue.mjs +9 -0
- package/es/components/src/business/uploadMaterial/UploadMaterial.vue.mjs.map +1 -0
- package/es/components/src/business/uploadMaterial/UploadMaterial.vue2.mjs +184 -0
- package/es/components/src/business/uploadMaterial/UploadMaterial.vue2.mjs.map +1 -0
- package/es/components/src/business/uploadMaterial/UploadMaterial.vue3.mjs +4 -0
- package/es/components/src/business/uploadMaterial/UploadMaterial.vue3.mjs.map +1 -0
- package/es/components/src/business/uploadMaterial/UploadMaterial.vue4.mjs +4 -0
- package/es/components/src/business/uploadMaterial/UploadMaterial.vue4.mjs.map +1 -0
- package/es/components/src/business/uploadMaterial/index.d.ts +308 -0
- package/es/components/src/business/uploadMaterial/index.mjs +9 -0
- package/es/components/src/business/uploadMaterial/index.mjs.map +1 -0
- package/es/components/src/business/uploadMaterial/uploadMaterial.d.ts +138 -0
- package/es/components/src/business/uploadMaterial/uploadMaterial.mjs +37 -0
- package/es/components/src/business/uploadMaterial/uploadMaterial.mjs.map +1 -0
- package/es/components/src/composite/dialogForm/DialogForm.vue.d.ts +1 -1
- package/es/components/src/composite/dialogForm/index.d.ts +4 -4
- package/es/components/src/composite/drawerForm/DrawerForm.vue.d.ts +1 -1
- package/es/components/src/composite/drawerForm/index.d.ts +4 -4
- package/es/components/src/composite/memoryForm/MemoryForm.vue.d.ts +1 -1
- package/es/components/src/composite/memoryForm/index.d.ts +4 -4
- package/es/components/src/plugins/message/index.mjs +1 -2
- package/es/components/src/plugins/message/index.mjs.map +1 -1
- package/es/components/src/plugins/message/method.mjs +1 -2
- package/es/components/src/plugins/message/method.mjs.map +1 -1
- package/es/giime/component.mjs +3 -1
- package/es/giime/component.mjs.map +1 -1
- package/es/giime/index.mjs +5 -1
- package/es/giime/index.mjs.map +1 -1
- package/es/giime/version.d.ts +1 -1
- package/es/giime/version.mjs +1 -1
- package/es/giime/version.mjs.map +1 -1
- package/es/hooks/base/useGlobalConfig/index.mjs +0 -1
- package/es/hooks/base/useGlobalConfig/index.mjs.map +1 -1
- package/es/hooks/store/useAliossStsToken/index.d.ts +16 -0
- package/es/hooks/store/useAliossStsToken/index.mjs +53 -0
- package/es/hooks/store/useAliossStsToken/index.mjs.map +1 -0
- package/es/hooks/store/useLangList/index.d.ts +1 -1
- package/es/index.css +64 -28
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.mjs +4 -1
- package/es/utils/index.mjs.map +1 -1
- package/es/utils/src/alioss.d.ts +14 -0
- package/es/utils/src/alioss.mjs +104 -0
- package/es/utils/src/alioss.mjs.map +1 -0
- package/es/utils/src/crypto/index.d.ts +2 -0
- package/es/utils/src/crypto/index.mjs +3 -0
- package/es/utils/src/crypto/index.mjs.map +1 -0
- package/es/utils/src/crypto/md5.d.ts +7 -0
- package/es/utils/src/crypto/md5.mjs +190 -0
- package/es/utils/src/crypto/md5.mjs.map +1 -0
- package/es/utils/src/crypto/sha1.d.ts +6 -0
- package/es/utils/src/crypto/sha1.mjs +193 -0
- package/es/utils/src/crypto/sha1.mjs.map +1 -0
- package/es/utils/src/is.d.ts +12 -0
- package/es/utils/src/is.mjs +9 -1
- package/es/utils/src/is.mjs.map +1 -1
- package/global.d.ts +1 -0
- package/lib/api/materialApi/cross/getAdFileExist.d.ts +21 -0
- package/lib/api/materialApi/cross/getAdFileExist.js +10 -0
- package/lib/api/materialApi/cross/getAdFileExist.js.map +1 -0
- package/lib/api/materialApi/cross/getOssAccessToken.d.ts +17 -0
- package/lib/api/materialApi/cross/getOssAccessToken.js +10 -0
- package/lib/api/materialApi/cross/getOssAccessToken.js.map +1 -0
- package/lib/api/materialApi/cross/index.d.ts +2 -0
- package/lib/api/materialApi/cross/index.js +10 -0
- package/lib/api/materialApi/cross/index.js.map +1 -0
- package/lib/api/materialApi/index.d.ts +1 -0
- package/lib/api/materialApi/index.js +11 -0
- package/lib/api/materialApi/index.js.map +1 -0
- package/lib/api/materialApi/request.d.ts +2 -0
- package/lib/api/materialApi/request.js +22 -0
- package/lib/api/materialApi/request.js.map +1 -0
- package/lib/api/utils/resetAxiosBaseUrl.js +0 -1
- package/lib/api/utils/resetAxiosBaseUrl.js.map +1 -1
- package/lib/components/index.js +60 -56
- package/lib/components/index.js.map +1 -1
- package/lib/components/src/business/index.d.ts +1 -0
- package/lib/components/src/business/index.js +4 -0
- package/lib/components/src/business/index.js.map +1 -1
- package/lib/components/src/business/uploadMaterial/UploadMaterial.vue.d.ts +306 -0
- package/lib/components/src/business/uploadMaterial/UploadMaterial.vue.js +13 -0
- package/lib/components/src/business/uploadMaterial/UploadMaterial.vue.js.map +1 -0
- package/lib/components/src/business/uploadMaterial/UploadMaterial.vue2.js +188 -0
- package/lib/components/src/business/uploadMaterial/UploadMaterial.vue2.js.map +1 -0
- package/lib/components/src/business/uploadMaterial/UploadMaterial.vue3.js +8 -0
- package/lib/components/src/business/uploadMaterial/UploadMaterial.vue3.js.map +1 -0
- package/lib/components/src/business/uploadMaterial/UploadMaterial.vue4.js +8 -0
- package/lib/components/src/business/uploadMaterial/UploadMaterial.vue4.js.map +1 -0
- package/lib/components/src/business/uploadMaterial/index.d.ts +308 -0
- package/lib/components/src/business/uploadMaterial/index.js +15 -0
- package/lib/components/src/business/uploadMaterial/index.js.map +1 -0
- package/lib/components/src/business/uploadMaterial/uploadMaterial.d.ts +138 -0
- package/lib/components/src/business/uploadMaterial/uploadMaterial.js +39 -0
- package/lib/components/src/business/uploadMaterial/uploadMaterial.js.map +1 -0
- package/lib/components/src/composite/dialogForm/DialogForm.vue.d.ts +1 -1
- package/lib/components/src/composite/dialogForm/index.d.ts +4 -4
- package/lib/components/src/composite/drawerForm/DrawerForm.vue.d.ts +1 -1
- package/lib/components/src/composite/drawerForm/index.d.ts +4 -4
- package/lib/components/src/composite/memoryForm/MemoryForm.vue.d.ts +1 -1
- package/lib/components/src/composite/memoryForm/index.d.ts +4 -4
- package/lib/components/src/plugins/message/index.js +1 -2
- package/lib/components/src/plugins/message/index.js.map +1 -1
- package/lib/components/src/plugins/message/method.js +1 -2
- package/lib/components/src/plugins/message/method.js.map +1 -1
- package/lib/giime/component.js +3 -1
- package/lib/giime/component.js.map +1 -1
- package/lib/giime/index.js +123 -102
- package/lib/giime/index.js.map +1 -1
- package/lib/giime/version.d.ts +1 -1
- package/lib/giime/version.js +1 -1
- package/lib/giime/version.js.map +1 -1
- package/lib/hooks/base/useGlobalConfig/index.js +0 -1
- package/lib/hooks/base/useGlobalConfig/index.js.map +1 -1
- package/lib/hooks/store/useAliossStsToken/index.d.ts +16 -0
- package/lib/hooks/store/useAliossStsToken/index.js +55 -0
- package/lib/hooks/store/useAliossStsToken/index.js.map +1 -0
- package/lib/hooks/store/useLangList/index.d.ts +1 -1
- package/lib/index.css +64 -28
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +18 -0
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/src/alioss.d.ts +14 -0
- package/lib/utils/src/alioss.js +107 -0
- package/lib/utils/src/alioss.js.map +1 -0
- package/lib/utils/src/crypto/index.d.ts +2 -0
- package/lib/utils/src/crypto/index.js +21 -0
- package/lib/utils/src/crypto/index.js.map +1 -0
- package/lib/utils/src/crypto/md5.d.ts +7 -0
- package/lib/utils/src/crypto/md5.js +198 -0
- package/lib/utils/src/crypto/md5.js.map +1 -0
- package/lib/utils/src/crypto/sha1.d.ts +6 -0
- package/lib/utils/src/crypto/sha1.js +200 -0
- package/lib/utils/src/crypto/sha1.js.map +1 -0
- package/lib/utils/src/is.d.ts +12 -0
- package/lib/utils/src/is.js +10 -0
- package/lib/utils/src/is.js.map +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
import type { UploadUserFile } from 'element-plus';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
fileList: import("vue").PropType<UploadUserFile[]>;
|
|
4
|
+
accept: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
autoUpload: {
|
|
9
|
+
type: BooleanConstructor;
|
|
10
|
+
default: boolean;
|
|
11
|
+
};
|
|
12
|
+
multiple: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
default: boolean;
|
|
15
|
+
};
|
|
16
|
+
seat: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
options: {
|
|
21
|
+
type: ObjectConstructor;
|
|
22
|
+
default: () => void;
|
|
23
|
+
};
|
|
24
|
+
fileName: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
beforeUpload: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (rawFile: import("element-plus").UploadRawFile) => import("element-plus/es/utils").Awaitable<boolean | void | Blob | File | null | undefined>) | (() => (rawFile: import("element-plus").UploadRawFile) => import("element-plus/es/utils").Awaitable<boolean | void | Blob | File | null | undefined>) | {
|
|
29
|
+
(): (rawFile: import("element-plus").UploadRawFile) => import("element-plus/es/utils").Awaitable<boolean | void | Blob | File | null | undefined>;
|
|
30
|
+
new (): any;
|
|
31
|
+
readonly prototype: any;
|
|
32
|
+
} | ((new (...args: any[]) => (rawFile: import("element-plus").UploadRawFile) => import("element-plus/es/utils").Awaitable<boolean | void | Blob | File | null | undefined>) | (() => (rawFile: import("element-plus").UploadRawFile) => import("element-plus/es/utils").Awaitable<boolean | void | Blob | File | null | undefined>) | {
|
|
33
|
+
(): (rawFile: import("element-plus").UploadRawFile) => import("element-plus/es/utils").Awaitable<boolean | void | Blob | File | null | undefined>;
|
|
34
|
+
new (): any;
|
|
35
|
+
readonly prototype: any;
|
|
36
|
+
})[], unknown, unknown, () => void, boolean>;
|
|
37
|
+
beforeRemove: {
|
|
38
|
+
readonly type: import("vue").PropType<(uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => import("element-plus/es/utils").Awaitable<boolean>>;
|
|
39
|
+
readonly required: false;
|
|
40
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
41
|
+
__epPropKey: true;
|
|
42
|
+
};
|
|
43
|
+
onRemove: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | (() => (uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | {
|
|
44
|
+
(): (uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void;
|
|
45
|
+
new (): any;
|
|
46
|
+
readonly prototype: any;
|
|
47
|
+
} | ((new (...args: any[]) => (uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | (() => (uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | {
|
|
48
|
+
(): (uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void;
|
|
49
|
+
new (): any;
|
|
50
|
+
readonly prototype: any;
|
|
51
|
+
})[], unknown, unknown, () => void, boolean>;
|
|
52
|
+
onChange: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | (() => (uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | {
|
|
53
|
+
(): (uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void;
|
|
54
|
+
new (): any;
|
|
55
|
+
readonly prototype: any;
|
|
56
|
+
} | ((new (...args: any[]) => (uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | (() => (uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | {
|
|
57
|
+
(): (uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void;
|
|
58
|
+
new (): any;
|
|
59
|
+
readonly prototype: any;
|
|
60
|
+
})[], unknown, unknown, () => void, boolean>;
|
|
61
|
+
onPreview: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (uploadFile: import("element-plus").UploadFile) => void) | (() => (uploadFile: import("element-plus").UploadFile) => void) | {
|
|
62
|
+
(): (uploadFile: import("element-plus").UploadFile) => void;
|
|
63
|
+
new (): any;
|
|
64
|
+
readonly prototype: any;
|
|
65
|
+
} | ((new (...args: any[]) => (uploadFile: import("element-plus").UploadFile) => void) | (() => (uploadFile: import("element-plus").UploadFile) => void) | {
|
|
66
|
+
(): (uploadFile: import("element-plus").UploadFile) => void;
|
|
67
|
+
new (): any;
|
|
68
|
+
readonly prototype: any;
|
|
69
|
+
})[], unknown, unknown, () => void, boolean>;
|
|
70
|
+
onSuccess: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (response: any, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | (() => (response: any, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | {
|
|
71
|
+
(): (response: any, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void;
|
|
72
|
+
new (): any;
|
|
73
|
+
readonly prototype: any;
|
|
74
|
+
} | ((new (...args: any[]) => (response: any, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | (() => (response: any, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | {
|
|
75
|
+
(): (response: any, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void;
|
|
76
|
+
new (): any;
|
|
77
|
+
readonly prototype: any;
|
|
78
|
+
})[], unknown, unknown, () => void, boolean>;
|
|
79
|
+
onProgress: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (evt: import("element-plus").UploadProgressEvent, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | (() => (evt: import("element-plus").UploadProgressEvent, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | {
|
|
80
|
+
(): (evt: import("element-plus").UploadProgressEvent, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void;
|
|
81
|
+
new (): any;
|
|
82
|
+
readonly prototype: any;
|
|
83
|
+
} | ((new (...args: any[]) => (evt: import("element-plus").UploadProgressEvent, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | (() => (evt: import("element-plus").UploadProgressEvent, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | {
|
|
84
|
+
(): (evt: import("element-plus").UploadProgressEvent, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void;
|
|
85
|
+
new (): any;
|
|
86
|
+
readonly prototype: any;
|
|
87
|
+
})[], unknown, unknown, () => void, boolean>;
|
|
88
|
+
onError: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (error: Error, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | (() => (error: Error, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | {
|
|
89
|
+
(): (error: Error, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void;
|
|
90
|
+
new (): any;
|
|
91
|
+
readonly prototype: any;
|
|
92
|
+
} | ((new (...args: any[]) => (error: Error, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | (() => (error: Error, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | {
|
|
93
|
+
(): (error: Error, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void;
|
|
94
|
+
new (): any;
|
|
95
|
+
readonly prototype: any;
|
|
96
|
+
})[], unknown, unknown, () => void, boolean>;
|
|
97
|
+
onExceed: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (files: File[], uploadFiles: UploadUserFile[]) => void) | (() => (files: File[], uploadFiles: UploadUserFile[]) => void) | {
|
|
98
|
+
(): (files: File[], uploadFiles: UploadUserFile[]) => void;
|
|
99
|
+
new (): any;
|
|
100
|
+
readonly prototype: any;
|
|
101
|
+
} | ((new (...args: any[]) => (files: File[], uploadFiles: UploadUserFile[]) => void) | (() => (files: File[], uploadFiles: UploadUserFile[]) => void) | {
|
|
102
|
+
(): (files: File[], uploadFiles: UploadUserFile[]) => void;
|
|
103
|
+
new (): any;
|
|
104
|
+
readonly prototype: any;
|
|
105
|
+
})[], unknown, unknown, () => void, boolean>;
|
|
106
|
+
crossorigin: {
|
|
107
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => "" | "anonymous" | "use-credentials") | (() => "" | "anonymous" | "use-credentials") | ((new (...args: any[]) => "" | "anonymous" | "use-credentials") | (() => "" | "anonymous" | "use-credentials"))[], unknown, unknown>>;
|
|
108
|
+
readonly required: false;
|
|
109
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
110
|
+
__epPropKey: true;
|
|
111
|
+
};
|
|
112
|
+
action: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "#", boolean>;
|
|
113
|
+
headers: {
|
|
114
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => Record<string, any> | Headers) | (() => Record<string, any> | Headers) | ((new (...args: any[]) => Record<string, any> | Headers) | (() => Record<string, any> | Headers))[], unknown, unknown>>;
|
|
115
|
+
readonly required: false;
|
|
116
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
117
|
+
__epPropKey: true;
|
|
118
|
+
};
|
|
119
|
+
method: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "post", boolean>;
|
|
120
|
+
data: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => ((rawFile: import("element-plus").UploadRawFile) => import("element-plus/es/utils").Awaitable<import("element-plus/es/utils").Mutable<Record<string, any>>>) | import("element-plus/es/utils").Mutable<Record<string, any>> | Promise<import("element-plus/es/utils").Mutable<Record<string, any>>>) | (() => ((rawFile: import("element-plus").UploadRawFile) => import("element-plus/es/utils").Awaitable<import("element-plus/es/utils").Mutable<Record<string, any>>>) | import("element-plus/es/utils").Awaitable<import("element-plus/es/utils").Mutable<Record<string, any>>>) | ((new (...args: any[]) => import("element-plus/es/utils").Mutable<Record<string, any>> | Promise<import("element-plus/es/utils").Mutable<Record<string, any>>> | ((rawFile: import("element-plus").UploadRawFile) => import("element-plus/es/utils").Awaitable<import("element-plus/es/utils").Mutable<Record<string, any>>>)) | (() => import("element-plus/es/utils").Awaitable<import("element-plus/es/utils").Mutable<Record<string, any>>> | ((rawFile: import("element-plus").UploadRawFile) => import("element-plus/es/utils").Awaitable<import("element-plus/es/utils").Mutable<Record<string, any>>>)))[], unknown, unknown, () => import("element-plus/es/utils").Mutable<{}>, boolean>;
|
|
121
|
+
name: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "file", boolean>;
|
|
122
|
+
drag: BooleanConstructor;
|
|
123
|
+
withCredentials: BooleanConstructor;
|
|
124
|
+
showFileList: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
125
|
+
listType: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "text" | "picture" | "picture-card", unknown, "text", boolean>;
|
|
126
|
+
httpRequest: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("element-plus").UploadRequestHandler) | (() => import("element-plus").UploadRequestHandler) | {
|
|
127
|
+
(): import("element-plus").UploadRequestHandler;
|
|
128
|
+
new (): any;
|
|
129
|
+
readonly prototype: any;
|
|
130
|
+
} | ((new (...args: any[]) => import("element-plus").UploadRequestHandler) | (() => import("element-plus").UploadRequestHandler) | {
|
|
131
|
+
(): import("element-plus").UploadRequestHandler;
|
|
132
|
+
new (): any;
|
|
133
|
+
readonly prototype: any;
|
|
134
|
+
})[], unknown, unknown, import("element-plus").UploadRequestHandler, boolean>;
|
|
135
|
+
disabled: BooleanConstructor;
|
|
136
|
+
limit: NumberConstructor;
|
|
137
|
+
}, {
|
|
138
|
+
onSubmit: () => void;
|
|
139
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
140
|
+
"update:fileList": (fileList: UploadUserFile[]) => void;
|
|
141
|
+
handleRemove: (file: UploadUserFile) => void;
|
|
142
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
143
|
+
fileList: import("vue").PropType<UploadUserFile[]>;
|
|
144
|
+
accept: {
|
|
145
|
+
type: StringConstructor;
|
|
146
|
+
default: string;
|
|
147
|
+
};
|
|
148
|
+
autoUpload: {
|
|
149
|
+
type: BooleanConstructor;
|
|
150
|
+
default: boolean;
|
|
151
|
+
};
|
|
152
|
+
multiple: {
|
|
153
|
+
type: BooleanConstructor;
|
|
154
|
+
default: boolean;
|
|
155
|
+
};
|
|
156
|
+
seat: {
|
|
157
|
+
type: StringConstructor;
|
|
158
|
+
default: string;
|
|
159
|
+
};
|
|
160
|
+
options: {
|
|
161
|
+
type: ObjectConstructor;
|
|
162
|
+
default: () => void;
|
|
163
|
+
};
|
|
164
|
+
fileName: {
|
|
165
|
+
type: StringConstructor;
|
|
166
|
+
default: string;
|
|
167
|
+
};
|
|
168
|
+
beforeUpload: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (rawFile: import("element-plus").UploadRawFile) => import("element-plus/es/utils").Awaitable<boolean | void | Blob | File | null | undefined>) | (() => (rawFile: import("element-plus").UploadRawFile) => import("element-plus/es/utils").Awaitable<boolean | void | Blob | File | null | undefined>) | {
|
|
169
|
+
(): (rawFile: import("element-plus").UploadRawFile) => import("element-plus/es/utils").Awaitable<boolean | void | Blob | File | null | undefined>;
|
|
170
|
+
new (): any;
|
|
171
|
+
readonly prototype: any;
|
|
172
|
+
} | ((new (...args: any[]) => (rawFile: import("element-plus").UploadRawFile) => import("element-plus/es/utils").Awaitable<boolean | void | Blob | File | null | undefined>) | (() => (rawFile: import("element-plus").UploadRawFile) => import("element-plus/es/utils").Awaitable<boolean | void | Blob | File | null | undefined>) | {
|
|
173
|
+
(): (rawFile: import("element-plus").UploadRawFile) => import("element-plus/es/utils").Awaitable<boolean | void | Blob | File | null | undefined>;
|
|
174
|
+
new (): any;
|
|
175
|
+
readonly prototype: any;
|
|
176
|
+
})[], unknown, unknown, () => void, boolean>;
|
|
177
|
+
beforeRemove: {
|
|
178
|
+
readonly type: import("vue").PropType<(uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => import("element-plus/es/utils").Awaitable<boolean>>;
|
|
179
|
+
readonly required: false;
|
|
180
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
181
|
+
__epPropKey: true;
|
|
182
|
+
};
|
|
183
|
+
onRemove: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | (() => (uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | {
|
|
184
|
+
(): (uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void;
|
|
185
|
+
new (): any;
|
|
186
|
+
readonly prototype: any;
|
|
187
|
+
} | ((new (...args: any[]) => (uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | (() => (uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | {
|
|
188
|
+
(): (uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void;
|
|
189
|
+
new (): any;
|
|
190
|
+
readonly prototype: any;
|
|
191
|
+
})[], unknown, unknown, () => void, boolean>;
|
|
192
|
+
onChange: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | (() => (uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | {
|
|
193
|
+
(): (uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void;
|
|
194
|
+
new (): any;
|
|
195
|
+
readonly prototype: any;
|
|
196
|
+
} | ((new (...args: any[]) => (uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | (() => (uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | {
|
|
197
|
+
(): (uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void;
|
|
198
|
+
new (): any;
|
|
199
|
+
readonly prototype: any;
|
|
200
|
+
})[], unknown, unknown, () => void, boolean>;
|
|
201
|
+
onPreview: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (uploadFile: import("element-plus").UploadFile) => void) | (() => (uploadFile: import("element-plus").UploadFile) => void) | {
|
|
202
|
+
(): (uploadFile: import("element-plus").UploadFile) => void;
|
|
203
|
+
new (): any;
|
|
204
|
+
readonly prototype: any;
|
|
205
|
+
} | ((new (...args: any[]) => (uploadFile: import("element-plus").UploadFile) => void) | (() => (uploadFile: import("element-plus").UploadFile) => void) | {
|
|
206
|
+
(): (uploadFile: import("element-plus").UploadFile) => void;
|
|
207
|
+
new (): any;
|
|
208
|
+
readonly prototype: any;
|
|
209
|
+
})[], unknown, unknown, () => void, boolean>;
|
|
210
|
+
onSuccess: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (response: any, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | (() => (response: any, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | {
|
|
211
|
+
(): (response: any, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void;
|
|
212
|
+
new (): any;
|
|
213
|
+
readonly prototype: any;
|
|
214
|
+
} | ((new (...args: any[]) => (response: any, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | (() => (response: any, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | {
|
|
215
|
+
(): (response: any, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void;
|
|
216
|
+
new (): any;
|
|
217
|
+
readonly prototype: any;
|
|
218
|
+
})[], unknown, unknown, () => void, boolean>;
|
|
219
|
+
onProgress: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (evt: import("element-plus").UploadProgressEvent, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | (() => (evt: import("element-plus").UploadProgressEvent, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | {
|
|
220
|
+
(): (evt: import("element-plus").UploadProgressEvent, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void;
|
|
221
|
+
new (): any;
|
|
222
|
+
readonly prototype: any;
|
|
223
|
+
} | ((new (...args: any[]) => (evt: import("element-plus").UploadProgressEvent, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | (() => (evt: import("element-plus").UploadProgressEvent, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | {
|
|
224
|
+
(): (evt: import("element-plus").UploadProgressEvent, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void;
|
|
225
|
+
new (): any;
|
|
226
|
+
readonly prototype: any;
|
|
227
|
+
})[], unknown, unknown, () => void, boolean>;
|
|
228
|
+
onError: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (error: Error, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | (() => (error: Error, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | {
|
|
229
|
+
(): (error: Error, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void;
|
|
230
|
+
new (): any;
|
|
231
|
+
readonly prototype: any;
|
|
232
|
+
} | ((new (...args: any[]) => (error: Error, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | (() => (error: Error, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void) | {
|
|
233
|
+
(): (error: Error, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void;
|
|
234
|
+
new (): any;
|
|
235
|
+
readonly prototype: any;
|
|
236
|
+
})[], unknown, unknown, () => void, boolean>;
|
|
237
|
+
onExceed: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (files: File[], uploadFiles: UploadUserFile[]) => void) | (() => (files: File[], uploadFiles: UploadUserFile[]) => void) | {
|
|
238
|
+
(): (files: File[], uploadFiles: UploadUserFile[]) => void;
|
|
239
|
+
new (): any;
|
|
240
|
+
readonly prototype: any;
|
|
241
|
+
} | ((new (...args: any[]) => (files: File[], uploadFiles: UploadUserFile[]) => void) | (() => (files: File[], uploadFiles: UploadUserFile[]) => void) | {
|
|
242
|
+
(): (files: File[], uploadFiles: UploadUserFile[]) => void;
|
|
243
|
+
new (): any;
|
|
244
|
+
readonly prototype: any;
|
|
245
|
+
})[], unknown, unknown, () => void, boolean>;
|
|
246
|
+
crossorigin: {
|
|
247
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => "" | "anonymous" | "use-credentials") | (() => "" | "anonymous" | "use-credentials") | ((new (...args: any[]) => "" | "anonymous" | "use-credentials") | (() => "" | "anonymous" | "use-credentials"))[], unknown, unknown>>;
|
|
248
|
+
readonly required: false;
|
|
249
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
250
|
+
__epPropKey: true;
|
|
251
|
+
};
|
|
252
|
+
action: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "#", boolean>;
|
|
253
|
+
headers: {
|
|
254
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => Record<string, any> | Headers) | (() => Record<string, any> | Headers) | ((new (...args: any[]) => Record<string, any> | Headers) | (() => Record<string, any> | Headers))[], unknown, unknown>>;
|
|
255
|
+
readonly required: false;
|
|
256
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
257
|
+
__epPropKey: true;
|
|
258
|
+
};
|
|
259
|
+
method: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "post", boolean>;
|
|
260
|
+
data: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => ((rawFile: import("element-plus").UploadRawFile) => import("element-plus/es/utils").Awaitable<import("element-plus/es/utils").Mutable<Record<string, any>>>) | import("element-plus/es/utils").Mutable<Record<string, any>> | Promise<import("element-plus/es/utils").Mutable<Record<string, any>>>) | (() => ((rawFile: import("element-plus").UploadRawFile) => import("element-plus/es/utils").Awaitable<import("element-plus/es/utils").Mutable<Record<string, any>>>) | import("element-plus/es/utils").Awaitable<import("element-plus/es/utils").Mutable<Record<string, any>>>) | ((new (...args: any[]) => import("element-plus/es/utils").Mutable<Record<string, any>> | Promise<import("element-plus/es/utils").Mutable<Record<string, any>>> | ((rawFile: import("element-plus").UploadRawFile) => import("element-plus/es/utils").Awaitable<import("element-plus/es/utils").Mutable<Record<string, any>>>)) | (() => import("element-plus/es/utils").Awaitable<import("element-plus/es/utils").Mutable<Record<string, any>>> | ((rawFile: import("element-plus").UploadRawFile) => import("element-plus/es/utils").Awaitable<import("element-plus/es/utils").Mutable<Record<string, any>>>)))[], unknown, unknown, () => import("element-plus/es/utils").Mutable<{}>, boolean>;
|
|
261
|
+
name: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "file", boolean>;
|
|
262
|
+
drag: BooleanConstructor;
|
|
263
|
+
withCredentials: BooleanConstructor;
|
|
264
|
+
showFileList: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
265
|
+
listType: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "text" | "picture" | "picture-card", unknown, "text", boolean>;
|
|
266
|
+
httpRequest: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("element-plus").UploadRequestHandler) | (() => import("element-plus").UploadRequestHandler) | {
|
|
267
|
+
(): import("element-plus").UploadRequestHandler;
|
|
268
|
+
new (): any;
|
|
269
|
+
readonly prototype: any;
|
|
270
|
+
} | ((new (...args: any[]) => import("element-plus").UploadRequestHandler) | (() => import("element-plus").UploadRequestHandler) | {
|
|
271
|
+
(): import("element-plus").UploadRequestHandler;
|
|
272
|
+
new (): any;
|
|
273
|
+
readonly prototype: any;
|
|
274
|
+
})[], unknown, unknown, import("element-plus").UploadRequestHandler, boolean>;
|
|
275
|
+
disabled: BooleanConstructor;
|
|
276
|
+
limit: NumberConstructor;
|
|
277
|
+
}>> & {
|
|
278
|
+
"onUpdate:fileList"?: ((fileList: UploadUserFile[]) => any) | undefined;
|
|
279
|
+
onHandleRemove?: ((file: UploadUserFile) => any) | undefined;
|
|
280
|
+
}, {
|
|
281
|
+
name: string;
|
|
282
|
+
drag: boolean;
|
|
283
|
+
multiple: boolean;
|
|
284
|
+
disabled: boolean;
|
|
285
|
+
options: Record<string, any>;
|
|
286
|
+
data: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => ((rawFile: import("element-plus").UploadRawFile) => import("element-plus/es/utils").Awaitable<import("element-plus/es/utils").Mutable<Record<string, any>>>) | import("element-plus/es/utils").Mutable<Record<string, any>> | Promise<import("element-plus/es/utils").Mutable<Record<string, any>>>) | (() => ((rawFile: import("element-plus").UploadRawFile) => import("element-plus/es/utils").Awaitable<import("element-plus/es/utils").Mutable<Record<string, any>>>) | import("element-plus/es/utils").Awaitable<import("element-plus/es/utils").Mutable<Record<string, any>>>) | ((new (...args: any[]) => import("element-plus/es/utils").Mutable<Record<string, any>> | Promise<import("element-plus/es/utils").Mutable<Record<string, any>>> | ((rawFile: import("element-plus").UploadRawFile) => import("element-plus/es/utils").Awaitable<import("element-plus/es/utils").Mutable<Record<string, any>>>)) | (() => import("element-plus/es/utils").Awaitable<import("element-plus/es/utils").Mutable<Record<string, any>>> | ((rawFile: import("element-plus").UploadRawFile) => import("element-plus/es/utils").Awaitable<import("element-plus/es/utils").Mutable<Record<string, any>>>)))[], unknown, unknown>;
|
|
287
|
+
method: string;
|
|
288
|
+
withCredentials: boolean;
|
|
289
|
+
onError: (error: Error, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void;
|
|
290
|
+
onChange: (uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void;
|
|
291
|
+
beforeUpload: (rawFile: import("element-plus").UploadRawFile) => import("element-plus/es/utils").Awaitable<boolean | void | Blob | File | null | undefined>;
|
|
292
|
+
onRemove: (uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void;
|
|
293
|
+
onPreview: (uploadFile: import("element-plus").UploadFile) => void;
|
|
294
|
+
onSuccess: (response: any, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void;
|
|
295
|
+
onProgress: (evt: import("element-plus").UploadProgressEvent, uploadFile: import("element-plus").UploadFile, uploadFiles: import("element-plus").UploadFiles) => void;
|
|
296
|
+
onExceed: (files: File[], uploadFiles: UploadUserFile[]) => void;
|
|
297
|
+
action: string;
|
|
298
|
+
showFileList: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
299
|
+
accept: string;
|
|
300
|
+
autoUpload: boolean;
|
|
301
|
+
listType: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "text" | "picture" | "picture-card", unknown>;
|
|
302
|
+
httpRequest: import("element-plus").UploadRequestHandler;
|
|
303
|
+
fileName: string;
|
|
304
|
+
seat: string;
|
|
305
|
+
}, {}>;
|
|
306
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import _sfc_main from './UploadMaterial.vue2.mjs';
|
|
2
|
+
import './UploadMaterial.vue3.mjs';
|
|
3
|
+
import './UploadMaterial.vue4.mjs';
|
|
4
|
+
import _export_sfc from '../../../../_virtual/_plugin-vue_export-helper.mjs';
|
|
5
|
+
|
|
6
|
+
var UploadMaterial = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-29f682ba"]]);
|
|
7
|
+
|
|
8
|
+
export { UploadMaterial as default };
|
|
9
|
+
//# sourceMappingURL=UploadMaterial.vue.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UploadMaterial.vue.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { pushScopeId, popScopeId, createElementVNode, createTextVNode, defineComponent, mergeModels, ref, useModel, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, unref, createCommentVNode } from 'vue';
|
|
2
|
+
import { isImageUrl, isVideoUrl } from '../../../../utils/src/is.mjs';
|
|
3
|
+
import { aliossPutFile } from '../../../../utils/src/alioss.mjs';
|
|
4
|
+
import { ZoomIn, Delete, UploadFilled } from '@element-plus/icons-vue';
|
|
5
|
+
import '../../plugins/index.mjs';
|
|
6
|
+
import { uploadMaterialProps } from './uploadMaterial.mjs';
|
|
7
|
+
import { GmMessageBox } from '../../plugins/messageBox/index.mjs';
|
|
8
|
+
|
|
9
|
+
const _withScopeId = (n) => (pushScopeId("data-v-29f682ba"), n = n(), popScopeId(), n);
|
|
10
|
+
const _hoisted_1 = { class: "gm-upload-material" };
|
|
11
|
+
const _hoisted_2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode(
|
|
12
|
+
"div",
|
|
13
|
+
{ class: "el-upload__text !gm-text-xs" },
|
|
14
|
+
[
|
|
15
|
+
/* @__PURE__ */ createTextVNode("\u5C06\u6587\u4EF6\u62D6\u5230\u6B64\u5904\uFF0C\u6216 "),
|
|
16
|
+
/* @__PURE__ */ createElementVNode("em", null, "\u70B9\u51FB\u4E0A\u4F20")
|
|
17
|
+
],
|
|
18
|
+
-1
|
|
19
|
+
/* HOISTED */
|
|
20
|
+
));
|
|
21
|
+
const _hoisted_3 = ["src"];
|
|
22
|
+
const _hoisted_4 = ["src"];
|
|
23
|
+
const _hoisted_5 = { class: "el-upload-list__item-actions" };
|
|
24
|
+
const _hoisted_6 = ["onClick"];
|
|
25
|
+
const _hoisted_7 = ["onClick"];
|
|
26
|
+
const _hoisted_8 = { class: "gm-flex gm-items-center gm-justify-center" };
|
|
27
|
+
const _hoisted_9 = ["src"];
|
|
28
|
+
const _hoisted_10 = ["src"];
|
|
29
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
30
|
+
...{
|
|
31
|
+
name: "GmUploadMaterial"
|
|
32
|
+
},
|
|
33
|
+
__name: "UploadMaterial",
|
|
34
|
+
props: /* @__PURE__ */ mergeModels(uploadMaterialProps, {
|
|
35
|
+
"fileList": { default: [] },
|
|
36
|
+
"fileListModifiers": {}
|
|
37
|
+
}),
|
|
38
|
+
emits: /* @__PURE__ */ mergeModels(["handleRemove"], ["update:fileList"]),
|
|
39
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
40
|
+
const props = __props;
|
|
41
|
+
const emit = __emit;
|
|
42
|
+
const uploadRef = ref();
|
|
43
|
+
const fileList = useModel(__props, "fileList");
|
|
44
|
+
const httpRequest = async (options) => {
|
|
45
|
+
const { file } = options;
|
|
46
|
+
const res = await aliossPutFile({ file, fileName: props.fileName, seat: props.seat, options: props.options });
|
|
47
|
+
return res;
|
|
48
|
+
};
|
|
49
|
+
const onRemove = (file) => {
|
|
50
|
+
GmMessageBox.confirm("\u786E\u5B9A\u5220\u9664\u8BE5\u6587\u4EF6\u5417\uFF1F", "\u63D0\u793A", {
|
|
51
|
+
confirmButtonText: "\u786E\u5B9A",
|
|
52
|
+
cancelButtonText: "\u53D6\u6D88",
|
|
53
|
+
type: "warning"
|
|
54
|
+
}).then(() => {
|
|
55
|
+
fileList.value = fileList.value.filter((v) => v.url !== file.url);
|
|
56
|
+
emit("handleRemove", file);
|
|
57
|
+
}).catch(() => {
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
const onSubmit = () => {
|
|
61
|
+
uploadRef.value.submit();
|
|
62
|
+
};
|
|
63
|
+
const dialog = ref(false);
|
|
64
|
+
const previewFile = ref({
|
|
65
|
+
name: "",
|
|
66
|
+
url: ""
|
|
67
|
+
});
|
|
68
|
+
const onPreview = (file) => {
|
|
69
|
+
previewFile.value = file;
|
|
70
|
+
dialog.value = true;
|
|
71
|
+
};
|
|
72
|
+
__expose({
|
|
73
|
+
onSubmit
|
|
74
|
+
});
|
|
75
|
+
return (_ctx, _cache) => {
|
|
76
|
+
const _component_gm_icon = resolveComponent("gm-icon");
|
|
77
|
+
const _component_gm_upload = resolveComponent("gm-upload");
|
|
78
|
+
const _component_gm_dialog = resolveComponent("gm-dialog");
|
|
79
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
80
|
+
createVNode(_component_gm_upload, {
|
|
81
|
+
ref_key: "uploadRef",
|
|
82
|
+
ref: uploadRef,
|
|
83
|
+
"file-list": fileList.value,
|
|
84
|
+
"onUpdate:fileList": _cache[0] || (_cache[0] = ($event) => fileList.value = $event),
|
|
85
|
+
action: "",
|
|
86
|
+
drag: "",
|
|
87
|
+
"list-type": "picture-card",
|
|
88
|
+
limit: _ctx.limit,
|
|
89
|
+
multiple: _ctx.multiple,
|
|
90
|
+
"auto-upload": props.autoUpload,
|
|
91
|
+
accept: props.accept,
|
|
92
|
+
"http-request": httpRequest,
|
|
93
|
+
"on-success": _ctx.onSuccess,
|
|
94
|
+
"on-error": _ctx.onError,
|
|
95
|
+
"on-exceed": _ctx.onExceed,
|
|
96
|
+
"before-upload": _ctx.beforeUpload,
|
|
97
|
+
"on-change": _ctx.onChange,
|
|
98
|
+
"on-progress": _ctx.onProgress
|
|
99
|
+
}, {
|
|
100
|
+
file: withCtx(({ file }) => [
|
|
101
|
+
unref(isImageUrl)(file.name || file.url || "") ? (openBlock(), createElementBlock("img", {
|
|
102
|
+
key: 0,
|
|
103
|
+
src: file.url,
|
|
104
|
+
class: "el-upload-list__item-thumbnail"
|
|
105
|
+
}, null, 8, _hoisted_3)) : createCommentVNode("v-if", true),
|
|
106
|
+
unref(isVideoUrl)(file.name || file.url || "") ? (openBlock(), createElementBlock("video", {
|
|
107
|
+
key: 1,
|
|
108
|
+
src: file.url,
|
|
109
|
+
class: "el-upload-list__item-thumbnail"
|
|
110
|
+
}, null, 8, _hoisted_4)) : createCommentVNode("v-if", true),
|
|
111
|
+
createElementVNode("div", _hoisted_5, [
|
|
112
|
+
createElementVNode("span", {
|
|
113
|
+
class: "el-upload-list__item-preview",
|
|
114
|
+
onClick: ($event) => onPreview(file)
|
|
115
|
+
}, [
|
|
116
|
+
createVNode(_component_gm_icon, null, {
|
|
117
|
+
default: withCtx(() => [
|
|
118
|
+
createVNode(unref(ZoomIn))
|
|
119
|
+
]),
|
|
120
|
+
_: 1
|
|
121
|
+
/* STABLE */
|
|
122
|
+
})
|
|
123
|
+
], 8, _hoisted_6),
|
|
124
|
+
createElementVNode("span", {
|
|
125
|
+
class: "gm-upload-list__item-delete",
|
|
126
|
+
onClick: ($event) => onRemove(file)
|
|
127
|
+
}, [
|
|
128
|
+
createVNode(_component_gm_icon, null, {
|
|
129
|
+
default: withCtx(() => [
|
|
130
|
+
createVNode(unref(Delete))
|
|
131
|
+
]),
|
|
132
|
+
_: 1
|
|
133
|
+
/* STABLE */
|
|
134
|
+
})
|
|
135
|
+
], 8, _hoisted_7)
|
|
136
|
+
])
|
|
137
|
+
]),
|
|
138
|
+
default: withCtx(() => [
|
|
139
|
+
createVNode(_component_gm_icon, {
|
|
140
|
+
size: 30,
|
|
141
|
+
color: "#999"
|
|
142
|
+
}, {
|
|
143
|
+
default: withCtx(() => [
|
|
144
|
+
createVNode(unref(UploadFilled))
|
|
145
|
+
]),
|
|
146
|
+
_: 1
|
|
147
|
+
/* STABLE */
|
|
148
|
+
}),
|
|
149
|
+
_hoisted_2
|
|
150
|
+
]),
|
|
151
|
+
_: 1
|
|
152
|
+
/* STABLE */
|
|
153
|
+
}, 8, ["file-list", "limit", "multiple", "auto-upload", "accept", "on-success", "on-error", "on-exceed", "before-upload", "on-change", "on-progress"]),
|
|
154
|
+
createVNode(_component_gm_dialog, {
|
|
155
|
+
modelValue: dialog.value,
|
|
156
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => dialog.value = $event),
|
|
157
|
+
title: "\u9884\u89C8",
|
|
158
|
+
width: "calc(100vw / 5 * 4)",
|
|
159
|
+
"destroy-on-close": "",
|
|
160
|
+
class: "gm-upload-preview-dialog"
|
|
161
|
+
}, {
|
|
162
|
+
default: withCtx(() => [
|
|
163
|
+
createElementVNode("div", _hoisted_8, [
|
|
164
|
+
unref(isImageUrl)(previewFile.value.name || previewFile.value.url || "") ? (openBlock(), createElementBlock("img", {
|
|
165
|
+
key: 0,
|
|
166
|
+
src: previewFile.value.url
|
|
167
|
+
}, null, 8, _hoisted_9)) : createCommentVNode("v-if", true),
|
|
168
|
+
unref(isVideoUrl)(previewFile.value.name || previewFile.value.url || "") ? (openBlock(), createElementBlock("video", {
|
|
169
|
+
key: 1,
|
|
170
|
+
src: previewFile.value.url,
|
|
171
|
+
controls: ""
|
|
172
|
+
}, null, 8, _hoisted_10)) : createCommentVNode("v-if", true)
|
|
173
|
+
])
|
|
174
|
+
]),
|
|
175
|
+
_: 1
|
|
176
|
+
/* STABLE */
|
|
177
|
+
}, 8, ["modelValue"])
|
|
178
|
+
]);
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
export { _sfc_main as default };
|
|
184
|
+
//# sourceMappingURL=UploadMaterial.vue2.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UploadMaterial.vue2.mjs","sources":["../../../../../../../packages/components/src/business/uploadMaterial/UploadMaterial.vue"],"sourcesContent":["<template>\r\n <div class=\"gm-upload-material\">\r\n <gm-upload\r\n ref=\"uploadRef\"\r\n v-model:file-list=\"fileList\"\r\n action=\"\"\r\n drag\r\n list-type=\"picture-card\"\r\n :limit=\"limit\"\r\n :multiple=\"multiple\"\r\n :auto-upload=\"props.autoUpload\"\r\n :accept=\"props.accept\"\r\n :http-request=\"httpRequest\"\r\n :on-success=\"onSuccess\"\r\n :on-error=\"onError\"\r\n :on-exceed=\"onExceed\"\r\n :before-upload=\"beforeUpload\"\r\n :on-change=\"onChange\"\r\n :on-progress=\"onProgress\"\r\n >\r\n <gm-icon :size=\"30\" color=\"#999\"><UploadFilled /></gm-icon>\r\n <div class=\"el-upload__text !gm-text-xs\">将文件拖到此处,或 <em>点击上传</em></div>\r\n <template #file=\"{ file }\">\r\n <img v-if=\"isImageUrl(file.name || file.url || '')\" :src=\"file.url\" class=\"el-upload-list__item-thumbnail\" />\r\n <video v-if=\"isVideoUrl(file.name || file.url || '')\" :src=\"file.url\" class=\"el-upload-list__item-thumbnail\" />\r\n <div class=\"el-upload-list__item-actions\">\r\n <span class=\"el-upload-list__item-preview\" @click=\"onPreview(file)\">\r\n <gm-icon><ZoomIn /></gm-icon>\r\n </span>\r\n <span class=\"gm-upload-list__item-delete\" @click=\"onRemove(file)\">\r\n <gm-icon><Delete /></gm-icon>\r\n </span>\r\n </div>\r\n </template>\r\n </gm-upload>\r\n\r\n <gm-dialog v-model=\"dialog\" title=\"预览\" width=\"calc(100vw / 5 * 4)\" destroy-on-close class=\"gm-upload-preview-dialog\">\r\n <div class=\"gm-flex gm-items-center gm-justify-center\">\r\n <img v-if=\"isImageUrl(previewFile.name || previewFile.url || '')\" :src=\"previewFile.url\" />\r\n <video v-if=\"isVideoUrl(previewFile.name || previewFile.url || '')\" :src=\"previewFile.url\" controls />\r\n </div>\r\n </gm-dialog>\r\n </div>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ref } from 'vue';\r\nimport { isImageUrl, isVideoUrl } from '@giime/utils/src/is';\r\nimport { aliossPutFile } from '@giime/utils/src/alioss';\r\nimport { Delete, UploadFilled, ZoomIn } from '@element-plus/icons-vue';\r\nimport { GmMessageBox } from '../../plugins';\r\nimport { uploadMaterialProps } from './uploadMaterial';\r\nimport type { UploadInstance, UploadRequestOptions, UploadUserFile } from 'element-plus';\r\n\r\ndefineOptions({\r\n name: 'GmUploadMaterial',\r\n});\r\n\r\nconst props = defineProps(uploadMaterialProps);\r\nconst emit = defineEmits([\"handleRemove\"]);\r\n\r\nconst uploadRef = ref<UploadInstance>();\r\n\r\n/* 上传文件 */\r\nconst fileList = defineModel<UploadUserFile[]>('fileList', { default: [] });\r\n\r\n/* 上传 */\r\nconst httpRequest = async (options: UploadRequestOptions) => {\r\n const { file } = options;\r\n\r\n const res = await aliossPutFile({ file, fileName: props.fileName, seat: props.seat, options: props.options });\r\n return res;\r\n};\r\n\r\n/* 删除文件 */\r\nconst onRemove = (file: UploadUserFile) => {\r\n GmMessageBox.confirm('确定删除该文件吗?', '提示', {\r\n confirmButtonText: '确定',\r\n cancelButtonText: '取消',\r\n type: 'warning',\r\n })\r\n .then(() => {\r\n fileList.value = fileList.value.filter(v => v.url !== file.url);\r\n emit('handleRemove', file);\r\n })\r\n .catch(() => {});\r\n};\r\n\r\n/* 手动上传 */\r\nconst onSubmit = () => {\r\n uploadRef.value!.submit();\r\n};\r\n\r\n/* 预览 */\r\nconst dialog = ref(false);\r\nconst previewFile = ref<UploadUserFile>({\r\n name: '',\r\n url: '',\r\n});\r\nconst onPreview = (file: UploadUserFile) => {\r\n previewFile.value = file;\r\n dialog.value = true;\r\n};\r\n\r\ndefineExpose({\r\n onSubmit,\r\n});\r\n</script>\r\n\r\n<style scoped lang=\"scss\">\r\n:deep(.el-upload-dragger) {\r\n padding: 10px;\r\n border: none;\r\n}\r\n\r\n.gm-upload-preview-dialog {\r\n :deep(.el-dialog__body) {\r\n padding: 0;\r\n }\r\n}\r\n:deep(.el-upload-list__item),\r\n:deep(.el-upload--picture-card) {\r\n width: 120px;\r\n height: 120px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n}\r\n</style>\r\n<style lang=\"scss\">\r\n.gm-upload-material {\r\n .el-overlay-dialog {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n }\r\n .el-dialog {\r\n margin: 0;\r\n }\r\n .el-dialog__body {\r\n max-height: calc(100vh - 100px);\r\n overflow-y: auto;\r\n video,\r\n img {\r\n max-height: calc(100vh - 150px);\r\n }\r\n }\r\n}\r\n</style>\r\n"],"names":["_useModel"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0DA,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AACd,IAAA,MAAM,IAAO,GAAA,MAAA,CAAA;AAEb,IAAA,MAAM,YAAY,GAAoB,EAAA,CAAA;AAGtC,IAAM,MAAA,QAAA,GAAWA,QAA8B,CAAA,OAAA,EAAA,UAA2B,CAAA,CAAA;AAG1E,IAAM,MAAA,WAAA,GAAc,OAAO,OAAkC,KAAA;AAC3D,MAAM,MAAA,EAAE,MAAS,GAAA,OAAA,CAAA;AAEjB,MAAA,MAAM,GAAM,GAAA,MAAM,aAAc,CAAA,EAAE,MAAM,QAAU,EAAA,KAAA,CAAM,QAAU,EAAA,IAAA,EAAM,KAAM,CAAA,IAAA,EAAM,OAAS,EAAA,KAAA,CAAM,SAAS,CAAA,CAAA;AAC5G,MAAO,OAAA,GAAA,CAAA;AAAA,KACT,CAAA;AAGA,IAAM,MAAA,QAAA,GAAW,CAAC,IAAyB,KAAA;AACzC,MAAa,YAAA,CAAA,OAAA,CAAQ,0DAAa,cAAM,EAAA;AAAA,QACtC,iBAAmB,EAAA,cAAA;AAAA,QACnB,gBAAkB,EAAA,cAAA;AAAA,QAClB,IAAM,EAAA,SAAA;AAAA,OACP,CACE,CAAA,IAAA,CAAK,MAAM;AACV,QAAS,QAAA,CAAA,KAAA,GAAQ,SAAS,KAAM,CAAA,MAAA,CAAO,OAAK,CAAE,CAAA,GAAA,KAAQ,KAAK,GAAG,CAAA,CAAA;AAC9D,QAAA,IAAA,CAAK,gBAAgB,IAAI,CAAA,CAAA;AAAA,OAC1B,CACA,CAAA,KAAA,CAAM,MAAM;AAAA,OAAE,CAAA,CAAA;AAAA,KACnB,CAAA;AAGA,IAAA,MAAM,WAAW,MAAM;AACrB,MAAA,SAAA,CAAU,MAAO,MAAO,EAAA,CAAA;AAAA,KAC1B,CAAA;AAGA,IAAM,MAAA,MAAA,GAAS,IAAI,KAAK,CAAA,CAAA;AACxB,IAAA,MAAM,cAAc,GAAoB,CAAA;AAAA,MACtC,IAAM,EAAA,EAAA;AAAA,MACN,GAAK,EAAA,EAAA;AAAA,KACN,CAAA,CAAA;AACD,IAAM,MAAA,SAAA,GAAY,CAAC,IAAyB,KAAA;AAC1C,MAAA,WAAA,CAAY,KAAQ,GAAA,IAAA,CAAA;AACpB,MAAA,MAAA,CAAO,KAAQ,GAAA,IAAA,CAAA;AAAA,KACjB,CAAA;AAEA,IAAa,QAAA,CAAA;AAAA,MACX,QAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UploadMaterial.vue3.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UploadMaterial.vue4.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|