giime 0.7.10 → 0.7.12
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 +143 -143
- package/es/components/index.mjs +2 -0
- package/es/components/index.mjs.map +1 -1
- package/es/components/src/base/carousel/Carousel.vue.d.ts +1 -0
- package/es/components/src/base/carousel/Carousel.vue2.mjs +1 -1
- package/es/components/src/base/carousel/Carousel.vue2.mjs.map +1 -1
- package/es/components/src/base/carousel/index.d.ts +3 -0
- package/es/components/src/composite/fileComponent/FileComponent.vue.d.ts +41 -5
- package/es/components/src/composite/fileComponent/FileComponent.vue2.mjs +47 -28
- package/es/components/src/composite/fileComponent/FileComponent.vue2.mjs.map +1 -1
- package/es/components/src/composite/fileComponent/fileComponent.d.ts +13 -1
- package/es/components/src/composite/fileComponent/fileComponent.mjs +12 -0
- package/es/components/src/composite/fileComponent/fileComponent.mjs.map +1 -1
- package/es/components/src/composite/fileComponent/index.d.ts +190 -31
- package/es/components/src/composite/fileList2/FileList.vue.d.ts +158 -0
- package/es/components/src/composite/fileList2/FileList.vue.mjs +6 -0
- package/es/components/src/composite/fileList2/FileList.vue.mjs.map +1 -0
- package/es/components/src/composite/fileList2/FileList.vue2.mjs +93 -0
- package/es/components/src/composite/fileList2/FileList.vue2.mjs.map +1 -0
- package/es/components/src/composite/fileList2/fileList.d.ts +71 -0
- package/es/components/src/composite/fileList2/fileList.mjs +40 -0
- package/es/components/src/composite/fileList2/fileList.mjs.map +1 -0
- package/es/components/src/composite/fileList2/index.d.ts +334 -0
- package/es/components/src/composite/fileList2/index.mjs +10 -0
- package/es/components/src/composite/fileList2/index.mjs.map +1 -0
- package/es/components/src/composite/index.d.ts +1 -0
- package/es/components/src/composite/index.mjs +2 -0
- package/es/components/src/composite/index.mjs.map +1 -1
- package/es/components/src/composite/previewFile/PreviewFile.vue.d.ts +42 -6
- package/es/components/src/composite/previewFile/PreviewFile.vue2.mjs +8 -6
- package/es/components/src/composite/previewFile/PreviewFile.vue2.mjs.map +1 -1
- package/es/components/src/composite/previewFile/index.d.ts +42 -6
- package/es/components/src/composite/previewFile/previewFile.d.ts +19 -2
- package/es/components/src/composite/previewFile/previewFile.mjs +6 -1
- package/es/components/src/composite/previewFile/previewFile.mjs.map +1 -1
- package/es/components/src/composite/uploadFile/UploadFile.vue.d.ts +48 -3
- package/es/components/src/composite/uploadFile/index.d.ts +102 -7
- package/es/components/src/composite/uploadFile/uploadFile.d.ts +22 -2
- package/es/giime/component.mjs +4 -0
- package/es/giime/component.mjs.map +1 -1
- package/es/giime/index.mjs +2 -0
- 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/index.css +143 -143
- package/global.d.ts +2 -0
- package/lib/components/index.js +18 -14
- package/lib/components/index.js.map +1 -1
- package/lib/components/src/base/carousel/Carousel.vue.d.ts +1 -0
- package/lib/components/src/base/carousel/Carousel.vue2.js +1 -1
- package/lib/components/src/base/carousel/Carousel.vue2.js.map +1 -1
- package/lib/components/src/base/carousel/index.d.ts +3 -0
- package/lib/components/src/composite/fileComponent/FileComponent.vue.d.ts +41 -5
- package/lib/components/src/composite/fileComponent/FileComponent.vue2.js +46 -27
- package/lib/components/src/composite/fileComponent/FileComponent.vue2.js.map +1 -1
- package/lib/components/src/composite/fileComponent/fileComponent.d.ts +13 -1
- package/lib/components/src/composite/fileComponent/fileComponent.js +12 -0
- package/lib/components/src/composite/fileComponent/fileComponent.js.map +1 -1
- package/lib/components/src/composite/fileComponent/index.d.ts +190 -31
- package/lib/components/src/composite/fileList2/FileList.vue.d.ts +158 -0
- package/lib/components/src/composite/fileList2/FileList.vue.js +10 -0
- package/lib/components/src/composite/fileList2/FileList.vue.js.map +1 -0
- package/lib/components/src/composite/fileList2/FileList.vue2.js +97 -0
- package/lib/components/src/composite/fileList2/FileList.vue2.js.map +1 -0
- package/lib/components/src/composite/fileList2/fileList.d.ts +71 -0
- package/lib/components/src/composite/fileList2/fileList.js +42 -0
- package/lib/components/src/composite/fileList2/fileList.js.map +1 -0
- package/lib/components/src/composite/fileList2/index.d.ts +334 -0
- package/lib/components/src/composite/fileList2/index.js +16 -0
- package/lib/components/src/composite/fileList2/index.js.map +1 -0
- package/lib/components/src/composite/index.d.ts +1 -0
- package/lib/components/src/composite/index.js +4 -0
- package/lib/components/src/composite/index.js.map +1 -1
- package/lib/components/src/composite/previewFile/PreviewFile.vue.d.ts +42 -6
- package/lib/components/src/composite/previewFile/PreviewFile.vue2.js +7 -5
- package/lib/components/src/composite/previewFile/PreviewFile.vue2.js.map +1 -1
- package/lib/components/src/composite/previewFile/index.d.ts +42 -6
- package/lib/components/src/composite/previewFile/previewFile.d.ts +19 -2
- package/lib/components/src/composite/previewFile/previewFile.js +6 -1
- package/lib/components/src/composite/previewFile/previewFile.js.map +1 -1
- package/lib/components/src/composite/uploadFile/UploadFile.vue.d.ts +48 -3
- package/lib/components/src/composite/uploadFile/index.d.ts +102 -7
- package/lib/components/src/composite/uploadFile/uploadFile.d.ts +22 -2
- package/lib/giime/component.js +32 -28
- package/lib/giime/component.js.map +1 -1
- package/lib/giime/index.js +80 -76
- 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/index.css +143 -143
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileComponent.vue2.js","sources":["../../../../../../../packages/components/src/composite/fileComponent/FileComponent.vue"],"sourcesContent":["<template>\n <div class=\"gm-flex gm-h-full gm-items-center gm-justify-center\">\n <img v-if=\"isImageFile\" :src=\"fileURL\" fit=\"contain\" style=\"max-width: 100%; max-height: 100%\" />\n
|
|
1
|
+
{"version":3,"file":"FileComponent.vue2.js","sources":["../../../../../../../packages/components/src/composite/fileComponent/FileComponent.vue"],"sourcesContent":["<template>\n <div class=\"gm-flex gm-h-full gm-w-full gm-flex-col gm-items-center gm-justify-center\">\n <div class=\"gm-flex gm-items-center gm-justify-center\" :style=\"fileStyle\">\n <img v-if=\"isImageFile\" :src=\"fileURL\" fit=\"contain\" style=\"max-width: 100%; max-height: 100%\" />\n <video\n v-else-if=\"isVideoFile\"\n :src=\"fileURL\"\n :controls=\"controls\"\n :controlslist=\"controlslist\"\n :oncontextmenu=\"() => oncontextmenu\"\n style=\"max-width: 100%; max-height: 100%\"\n />\n <template v-else>\n <el-image v-if=\"showIcon || !showIframe\" :style=\"iconStyle\" :src=\"iconURL\" />\n <iframe v-else :src=\"fileURL\" width=\"850px\" height=\"100%\" frameborder=\"0\" />\n </template>\n </div>\n <slot :file=\"file\" />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { isExcel, isImageUrl, isPDF, isPPT, isPSD, isText, isVideoUrl, isWord, isZip } from '@giime/utils/src/is';\nimport { fileComponentProps } from './fileComponent';\n// import PDF from './assets/image/pdf.svg';\n// import WORD from './assets/image/word.svg';\n// import EXCEL from './assets/image/excel.svg';\n// import PPT from './assets/image/ppt.svg';\n// import PSD from './assets/image/psd.svg';\n// import TEXT from './assets/image/text.svg';\n// import ZIP from './assets/image/zip.svg';\n// import UNKNOWN from './assets/image/unknown.svg';\nimport type { UploadFile } from 'element-plus';\n\ndefineOptions({\n name: 'GmFileComponent',\n});\n\nconst props = defineProps(fileComponentProps);\n\nconst iconStyle = computed(() => {\n return {\n width: `${props.size}px`,\n height: `${props.size}px`,\n };\n});\n\nconst fileStyle = computed(() => {\n return {\n width: props.fileWidth,\n height: props.fileHeight,\n ...props.fileStyle,\n };\n});\n\n/** 文件链接地址 */\nconst fileURL = computed(() => {\n return props.file[props.url as keyof UploadFile] as string;\n});\n\n/** 验证文件类型的字段 */\nconst verifyFile = computed(() => {\n return props.file[props.field as keyof UploadFile] as string;\n});\n\nconst isImageFile = computed(() => isImageUrl(fileURL.value) || isImageUrl(verifyFile.value));\nconst isVideoFile = computed(() => isVideoUrl(fileURL.value) || isVideoUrl(verifyFile.value));\n\n/** 显示iframe */\nconst showIframe = computed(() => {\n return isPDF(fileURL.value) || isPDF(verifyFile.value) || isText(fileURL.value) || isText(verifyFile.value);\n});\n\n/** 图标 */\nconst iconList = {\n excel: 'https://sucai.giikin.cn/workflow/material-refer-1739947054012-1213-335.svg',\n pdf: 'https://sucai.giikin.cn/workflow/material-refer-1739947288698-5462-586.svg',\n word: 'https://sucai.giikin.cn/workflow/material-refer-1739947288698-1540-625.svg',\n txt: 'https://sucai.giikin.cn/workflow/material-refer-1739947288698-1700-90.svg',\n zip: 'https://sucai.giikin.cn/workflow/material-refer-1739947288698-2639-507.svg',\n psd: 'https://sucai.giikin.cn/workflow/material-refer-1739947288698-5026-760.svg',\n ppt: 'https://sucai.giikin.cn/workflow/material-refer-1739947288698-2867-970.svg',\n unknown: 'https://sucai.giikin.cn/workflow/material-refer-1739947288698-1448-736.svg',\n};\n\nconst iconURL = computed<string>(() => {\n // 文件类型检查器映射\n const typeCheckers = [\n { check: () => isPDF(fileURL.value) || isPDF(verifyFile.value), icon: iconList.pdf },\n { check: () => isWord(fileURL.value) || isWord(verifyFile.value), icon: iconList.word },\n { check: () => isExcel(fileURL.value) || isExcel(verifyFile.value), icon: iconList.excel },\n { check: () => isText(fileURL.value) || isText(verifyFile.value), icon: iconList.txt },\n { check: () => isPPT(fileURL.value) || isPPT(verifyFile.value), icon: iconList.ppt },\n { check: () => isZip(fileURL.value) || isZip(verifyFile.value), icon: iconList.zip },\n { check: () => isPSD(fileURL.value) || isPSD(verifyFile.value), icon: iconList.psd },\n ];\n\n // 查找匹配的文件类型\n const matchedType = typeCheckers.find(({ check }) => check());\n\n return matchedType?.icon || iconList.unknown;\n});\n</script>\n"],"names":["computed","isImageUrl","isVideoUrl","isPDF","isText","isWord","isExcel","isPPT","isZip","isPSD"],"mappings":"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"}
|
|
@@ -13,6 +13,18 @@ export declare const fileComponentProps: {
|
|
|
13
13
|
type: StringConstructor;
|
|
14
14
|
default: string;
|
|
15
15
|
};
|
|
16
|
+
fileWidth: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
fileHeight: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
fileStyle: {
|
|
25
|
+
type: ObjectConstructor;
|
|
26
|
+
default: () => {};
|
|
27
|
+
};
|
|
16
28
|
/** 图标大小 */
|
|
17
29
|
size: {
|
|
18
30
|
type: NumberConstructor;
|
|
@@ -20,7 +32,7 @@ export declare const fileComponentProps: {
|
|
|
20
32
|
};
|
|
21
33
|
/** 文件类型判断字段 */
|
|
22
34
|
field: {
|
|
23
|
-
type:
|
|
35
|
+
type: StringConstructor;
|
|
24
36
|
default: string;
|
|
25
37
|
};
|
|
26
38
|
/** 视频是否显示操作按钮 */
|
|
@@ -11,6 +11,18 @@ const fileComponentProps = {
|
|
|
11
11
|
type: String,
|
|
12
12
|
default: "url"
|
|
13
13
|
},
|
|
14
|
+
fileWidth: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: "100%"
|
|
17
|
+
},
|
|
18
|
+
fileHeight: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: "100%"
|
|
21
|
+
},
|
|
22
|
+
fileStyle: {
|
|
23
|
+
type: Object,
|
|
24
|
+
default: () => ({})
|
|
25
|
+
},
|
|
14
26
|
/** 图标大小 */
|
|
15
27
|
size: {
|
|
16
28
|
type: Number,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileComponent.js","sources":["../../../../../../../packages/components/src/composite/fileComponent/fileComponent.ts"],"sourcesContent":["import { type PropType } from 'vue';\nimport { type UploadFile } from 'element-plus';\n\n/** 视频控制器 */\nexport type Controls = 'nodownload' | 'nofullscreen' | 'noremoteplayback' | 'noplaybackrate';\n\nexport const fileComponentProps = {\n /** 文件 */\n file: {\n type: Object as PropType<Partial<UploadFile>>,\n default: () => ({}),\n },\n /** 文件链接字段 */\n url: {\n type: String,\n default: 'url',\n },\n /** 图标大小 */\n size: {\n type: Number,\n default: 80,\n },\n /** 文件类型判断字段 */\n field: {\n type: String
|
|
1
|
+
{"version":3,"file":"fileComponent.js","sources":["../../../../../../../packages/components/src/composite/fileComponent/fileComponent.ts"],"sourcesContent":["import { type PropType } from 'vue';\nimport { type UploadFile } from 'element-plus';\n\n/** 视频控制器 */\nexport type Controls = 'nodownload' | 'nofullscreen' | 'noremoteplayback' | 'noplaybackrate';\n\nexport const fileComponentProps = {\n /** 文件 */\n file: {\n type: Object as PropType<Partial<UploadFile>>,\n default: () => ({}),\n },\n /** 文件链接字段 */\n url: {\n type: String,\n default: 'url',\n },\n fileWidth: {\n type: String,\n default: '100%',\n },\n fileHeight: {\n type: String,\n default: '100%',\n },\n fileStyle: {\n type: Object,\n default: () => ({}),\n },\n /** 图标大小 */\n size: {\n type: Number,\n default: 80,\n },\n /** 文件类型判断字段 */\n field: {\n type: String,\n default: 'name',\n },\n /** 视频是否显示操作按钮 */\n controls: {\n type: Boolean,\n default: true,\n },\n /** 视频控制器选项 */\n controlslist: {\n type: String,\n default: '',\n },\n /** 视频是否显示右键菜单 */\n oncontextmenu: {\n type: Boolean,\n default: true,\n },\n /** 是否显示icon */\n showIcon: {\n type: Boolean,\n default: false,\n },\n};\n"],"names":[],"mappings":";;AAMO,MAAM,kBAAqB,GAAA;AAAA;AAAA,EAEhC,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,MAAA;AAAA,IACN,OAAA,EAAS,OAAO,EAAC,CAAA;AAAA,GACnB;AAAA;AAAA,EAEA,GAAK,EAAA;AAAA,IACH,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,KAAA;AAAA,GACX;AAAA,EACA,SAAW,EAAA;AAAA,IACT,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,MAAA;AAAA,GACX;AAAA,EACA,UAAY,EAAA;AAAA,IACV,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,MAAA;AAAA,GACX;AAAA,EACA,SAAW,EAAA;AAAA,IACT,IAAM,EAAA,MAAA;AAAA,IACN,OAAA,EAAS,OAAO,EAAC,CAAA;AAAA,GACnB;AAAA;AAAA,EAEA,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA;AAAA,EAEA,KAAO,EAAA;AAAA,IACL,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,MAAA;AAAA,GACX;AAAA;AAAA,EAEA,QAAU,EAAA;AAAA,IACR,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,IAAA;AAAA,GACX;AAAA;AAAA,EAEA,YAAc,EAAA;AAAA,IACZ,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA;AAAA,EAEA,aAAe,EAAA;AAAA,IACb,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,IAAA;AAAA,GACX;AAAA;AAAA,EAEA,QAAU,EAAA;AAAA,IACR,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,KAAA;AAAA,GACX;AACF;;;;"}
|
|
@@ -1,5 +1,176 @@
|
|
|
1
1
|
import FileComponent from './FileComponent.vue';
|
|
2
|
-
export declare const GmFileComponent: import("../../../../utils").SFCWithInstall<
|
|
2
|
+
export declare const GmFileComponent: import("../../../../utils").SFCWithInstall<{
|
|
3
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<{
|
|
4
|
+
file: {
|
|
5
|
+
type: import("vue").PropType<Partial<import("element-plus").UploadFile>>;
|
|
6
|
+
default: () => {};
|
|
7
|
+
};
|
|
8
|
+
url: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
fileWidth: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
fileHeight: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
fileStyle: {
|
|
21
|
+
type: ObjectConstructor;
|
|
22
|
+
default: () => {};
|
|
23
|
+
};
|
|
24
|
+
size: {
|
|
25
|
+
type: NumberConstructor;
|
|
26
|
+
default: number;
|
|
27
|
+
};
|
|
28
|
+
field: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
32
|
+
controls: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
controlslist: {
|
|
37
|
+
type: StringConstructor;
|
|
38
|
+
default: string;
|
|
39
|
+
};
|
|
40
|
+
oncontextmenu: {
|
|
41
|
+
type: BooleanConstructor;
|
|
42
|
+
default: boolean;
|
|
43
|
+
};
|
|
44
|
+
showIcon: {
|
|
45
|
+
type: BooleanConstructor;
|
|
46
|
+
default: boolean;
|
|
47
|
+
};
|
|
48
|
+
}>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
|
|
49
|
+
file: {
|
|
50
|
+
type: import("vue").PropType<Partial<import("element-plus").UploadFile>>;
|
|
51
|
+
default: () => {};
|
|
52
|
+
};
|
|
53
|
+
url: {
|
|
54
|
+
type: StringConstructor;
|
|
55
|
+
default: string;
|
|
56
|
+
};
|
|
57
|
+
fileWidth: {
|
|
58
|
+
type: StringConstructor;
|
|
59
|
+
default: string;
|
|
60
|
+
};
|
|
61
|
+
fileHeight: {
|
|
62
|
+
type: StringConstructor;
|
|
63
|
+
default: string;
|
|
64
|
+
};
|
|
65
|
+
fileStyle: {
|
|
66
|
+
type: ObjectConstructor;
|
|
67
|
+
default: () => {};
|
|
68
|
+
};
|
|
69
|
+
size: {
|
|
70
|
+
type: NumberConstructor;
|
|
71
|
+
default: number;
|
|
72
|
+
};
|
|
73
|
+
field: {
|
|
74
|
+
type: StringConstructor;
|
|
75
|
+
default: string;
|
|
76
|
+
};
|
|
77
|
+
controls: {
|
|
78
|
+
type: BooleanConstructor;
|
|
79
|
+
default: boolean;
|
|
80
|
+
};
|
|
81
|
+
controlslist: {
|
|
82
|
+
type: StringConstructor;
|
|
83
|
+
default: string;
|
|
84
|
+
};
|
|
85
|
+
oncontextmenu: {
|
|
86
|
+
type: BooleanConstructor;
|
|
87
|
+
default: boolean;
|
|
88
|
+
};
|
|
89
|
+
showIcon: {
|
|
90
|
+
type: BooleanConstructor;
|
|
91
|
+
default: boolean;
|
|
92
|
+
};
|
|
93
|
+
}>>, {
|
|
94
|
+
size: number;
|
|
95
|
+
url: string;
|
|
96
|
+
file: Partial<import("element-plus").UploadFile>;
|
|
97
|
+
showIcon: boolean;
|
|
98
|
+
controls: boolean;
|
|
99
|
+
field: string;
|
|
100
|
+
fileWidth: string;
|
|
101
|
+
fileHeight: string;
|
|
102
|
+
fileStyle: Record<string, any>;
|
|
103
|
+
controlslist: string;
|
|
104
|
+
oncontextmenu: boolean;
|
|
105
|
+
}, true, {}, {}, {
|
|
106
|
+
P: {};
|
|
107
|
+
B: {};
|
|
108
|
+
D: {};
|
|
109
|
+
C: {};
|
|
110
|
+
M: {};
|
|
111
|
+
Defaults: {};
|
|
112
|
+
}, Readonly<import("vue").ExtractPropTypes<{
|
|
113
|
+
file: {
|
|
114
|
+
type: import("vue").PropType<Partial<import("element-plus").UploadFile>>;
|
|
115
|
+
default: () => {};
|
|
116
|
+
};
|
|
117
|
+
url: {
|
|
118
|
+
type: StringConstructor;
|
|
119
|
+
default: string;
|
|
120
|
+
};
|
|
121
|
+
fileWidth: {
|
|
122
|
+
type: StringConstructor;
|
|
123
|
+
default: string;
|
|
124
|
+
};
|
|
125
|
+
fileHeight: {
|
|
126
|
+
type: StringConstructor;
|
|
127
|
+
default: string;
|
|
128
|
+
};
|
|
129
|
+
fileStyle: {
|
|
130
|
+
type: ObjectConstructor;
|
|
131
|
+
default: () => {};
|
|
132
|
+
};
|
|
133
|
+
size: {
|
|
134
|
+
type: NumberConstructor;
|
|
135
|
+
default: number;
|
|
136
|
+
};
|
|
137
|
+
field: {
|
|
138
|
+
type: StringConstructor;
|
|
139
|
+
default: string;
|
|
140
|
+
};
|
|
141
|
+
controls: {
|
|
142
|
+
type: BooleanConstructor;
|
|
143
|
+
default: boolean;
|
|
144
|
+
};
|
|
145
|
+
controlslist: {
|
|
146
|
+
type: StringConstructor;
|
|
147
|
+
default: string;
|
|
148
|
+
};
|
|
149
|
+
oncontextmenu: {
|
|
150
|
+
type: BooleanConstructor;
|
|
151
|
+
default: boolean;
|
|
152
|
+
};
|
|
153
|
+
showIcon: {
|
|
154
|
+
type: BooleanConstructor;
|
|
155
|
+
default: boolean;
|
|
156
|
+
};
|
|
157
|
+
}>>, {}, {}, {}, {}, {
|
|
158
|
+
size: number;
|
|
159
|
+
url: string;
|
|
160
|
+
file: Partial<import("element-plus").UploadFile>;
|
|
161
|
+
showIcon: boolean;
|
|
162
|
+
controls: boolean;
|
|
163
|
+
field: string;
|
|
164
|
+
fileWidth: string;
|
|
165
|
+
fileHeight: string;
|
|
166
|
+
fileStyle: Record<string, any>;
|
|
167
|
+
controlslist: string;
|
|
168
|
+
oncontextmenu: boolean;
|
|
169
|
+
}>;
|
|
170
|
+
__isFragment?: undefined;
|
|
171
|
+
__isTeleport?: undefined;
|
|
172
|
+
__isSuspense?: undefined;
|
|
173
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
3
174
|
file: {
|
|
4
175
|
type: import("vue").PropType<Partial<import("element-plus").UploadFile>>;
|
|
5
176
|
default: () => {};
|
|
@@ -8,45 +179,24 @@ export declare const GmFileComponent: import("../../../../utils").SFCWithInstall
|
|
|
8
179
|
type: StringConstructor;
|
|
9
180
|
default: string;
|
|
10
181
|
};
|
|
11
|
-
|
|
12
|
-
type:
|
|
13
|
-
default: number;
|
|
14
|
-
};
|
|
15
|
-
field: {
|
|
16
|
-
type: import("vue").PropType<keyof import("element-plus").UploadFile>;
|
|
182
|
+
fileWidth: {
|
|
183
|
+
type: StringConstructor;
|
|
17
184
|
default: string;
|
|
18
185
|
};
|
|
19
|
-
|
|
20
|
-
type: BooleanConstructor;
|
|
21
|
-
default: boolean;
|
|
22
|
-
};
|
|
23
|
-
controlslist: {
|
|
186
|
+
fileHeight: {
|
|
24
187
|
type: StringConstructor;
|
|
25
188
|
default: string;
|
|
26
189
|
};
|
|
27
|
-
|
|
28
|
-
type:
|
|
29
|
-
default: boolean;
|
|
30
|
-
};
|
|
31
|
-
showIcon: {
|
|
32
|
-
type: BooleanConstructor;
|
|
33
|
-
default: boolean;
|
|
34
|
-
};
|
|
35
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
36
|
-
file: {
|
|
37
|
-
type: import("vue").PropType<Partial<import("element-plus").UploadFile>>;
|
|
190
|
+
fileStyle: {
|
|
191
|
+
type: ObjectConstructor;
|
|
38
192
|
default: () => {};
|
|
39
193
|
};
|
|
40
|
-
url: {
|
|
41
|
-
type: StringConstructor;
|
|
42
|
-
default: string;
|
|
43
|
-
};
|
|
44
194
|
size: {
|
|
45
195
|
type: NumberConstructor;
|
|
46
196
|
default: number;
|
|
47
197
|
};
|
|
48
198
|
field: {
|
|
49
|
-
type:
|
|
199
|
+
type: StringConstructor;
|
|
50
200
|
default: string;
|
|
51
201
|
};
|
|
52
202
|
controls: {
|
|
@@ -65,16 +215,25 @@ export declare const GmFileComponent: import("../../../../utils").SFCWithInstall
|
|
|
65
215
|
type: BooleanConstructor;
|
|
66
216
|
default: boolean;
|
|
67
217
|
};
|
|
68
|
-
}>>, {
|
|
218
|
+
}>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
69
219
|
size: number;
|
|
70
220
|
url: string;
|
|
71
221
|
file: Partial<import("element-plus").UploadFile>;
|
|
72
222
|
showIcon: boolean;
|
|
73
223
|
controls: boolean;
|
|
74
|
-
field:
|
|
224
|
+
field: string;
|
|
225
|
+
fileWidth: string;
|
|
226
|
+
fileHeight: string;
|
|
227
|
+
fileStyle: Record<string, any>;
|
|
75
228
|
controlslist: string;
|
|
76
229
|
oncontextmenu: boolean;
|
|
77
|
-
}, {}
|
|
230
|
+
}, {}, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
231
|
+
$slots: {
|
|
232
|
+
default?(_: {
|
|
233
|
+
file: Partial<import("element-plus").UploadFile>;
|
|
234
|
+
}): any;
|
|
235
|
+
};
|
|
236
|
+
})> & Record<string, any>;
|
|
78
237
|
export type FileComponentInstance = InstanceType<typeof FileComponent>;
|
|
79
238
|
export * from './fileComponent';
|
|
80
239
|
export default GmFileComponent;
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
2
|
+
fileList: {
|
|
3
|
+
type: import("vue").PropType<Partial<import("element-plus").UploadFile>[]>;
|
|
4
|
+
default: () => never[];
|
|
5
|
+
};
|
|
6
|
+
controlslist: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
oncontextmenu: {
|
|
11
|
+
type: BooleanConstructor;
|
|
12
|
+
default: boolean;
|
|
13
|
+
};
|
|
14
|
+
fileWidth: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
fileHeight: {
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
fileListGap: {
|
|
23
|
+
type: StringConstructor;
|
|
24
|
+
default: string;
|
|
25
|
+
};
|
|
26
|
+
fileListStyle: {
|
|
27
|
+
type: ObjectConstructor;
|
|
28
|
+
default: () => {};
|
|
29
|
+
};
|
|
30
|
+
previewWidth: {
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
34
|
+
openPreviewDownload: {
|
|
35
|
+
type: BooleanConstructor;
|
|
36
|
+
default: boolean;
|
|
37
|
+
};
|
|
38
|
+
file: {
|
|
39
|
+
type: import("vue").PropType<Partial<import("element-plus").UploadFile>>;
|
|
40
|
+
default: () => {};
|
|
41
|
+
};
|
|
42
|
+
url: {
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
default: string;
|
|
45
|
+
};
|
|
46
|
+
fileStyle: {
|
|
47
|
+
type: ObjectConstructor;
|
|
48
|
+
default: () => {};
|
|
49
|
+
};
|
|
50
|
+
size: {
|
|
51
|
+
type: NumberConstructor;
|
|
52
|
+
default: number;
|
|
53
|
+
};
|
|
54
|
+
field: {
|
|
55
|
+
type: StringConstructor;
|
|
56
|
+
default: string;
|
|
57
|
+
};
|
|
58
|
+
controls: {
|
|
59
|
+
type: BooleanConstructor;
|
|
60
|
+
default: boolean;
|
|
61
|
+
};
|
|
62
|
+
showIcon: {
|
|
63
|
+
type: BooleanConstructor;
|
|
64
|
+
default: boolean;
|
|
65
|
+
};
|
|
66
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
67
|
+
fileList: {
|
|
68
|
+
type: import("vue").PropType<Partial<import("element-plus").UploadFile>[]>;
|
|
69
|
+
default: () => never[];
|
|
70
|
+
};
|
|
71
|
+
controlslist: {
|
|
72
|
+
type: StringConstructor;
|
|
73
|
+
default: string;
|
|
74
|
+
};
|
|
75
|
+
oncontextmenu: {
|
|
76
|
+
type: BooleanConstructor;
|
|
77
|
+
default: boolean;
|
|
78
|
+
};
|
|
79
|
+
fileWidth: {
|
|
80
|
+
type: StringConstructor;
|
|
81
|
+
default: string;
|
|
82
|
+
};
|
|
83
|
+
fileHeight: {
|
|
84
|
+
type: StringConstructor;
|
|
85
|
+
default: string;
|
|
86
|
+
};
|
|
87
|
+
fileListGap: {
|
|
88
|
+
type: StringConstructor;
|
|
89
|
+
default: string;
|
|
90
|
+
};
|
|
91
|
+
fileListStyle: {
|
|
92
|
+
type: ObjectConstructor;
|
|
93
|
+
default: () => {};
|
|
94
|
+
};
|
|
95
|
+
previewWidth: {
|
|
96
|
+
type: StringConstructor;
|
|
97
|
+
default: string;
|
|
98
|
+
};
|
|
99
|
+
openPreviewDownload: {
|
|
100
|
+
type: BooleanConstructor;
|
|
101
|
+
default: boolean;
|
|
102
|
+
};
|
|
103
|
+
file: {
|
|
104
|
+
type: import("vue").PropType<Partial<import("element-plus").UploadFile>>;
|
|
105
|
+
default: () => {};
|
|
106
|
+
};
|
|
107
|
+
url: {
|
|
108
|
+
type: StringConstructor;
|
|
109
|
+
default: string;
|
|
110
|
+
};
|
|
111
|
+
fileStyle: {
|
|
112
|
+
type: ObjectConstructor;
|
|
113
|
+
default: () => {};
|
|
114
|
+
};
|
|
115
|
+
size: {
|
|
116
|
+
type: NumberConstructor;
|
|
117
|
+
default: number;
|
|
118
|
+
};
|
|
119
|
+
field: {
|
|
120
|
+
type: StringConstructor;
|
|
121
|
+
default: string;
|
|
122
|
+
};
|
|
123
|
+
controls: {
|
|
124
|
+
type: BooleanConstructor;
|
|
125
|
+
default: boolean;
|
|
126
|
+
};
|
|
127
|
+
showIcon: {
|
|
128
|
+
type: BooleanConstructor;
|
|
129
|
+
default: boolean;
|
|
130
|
+
};
|
|
131
|
+
}>>, {
|
|
132
|
+
size: number;
|
|
133
|
+
url: string;
|
|
134
|
+
file: Partial<import("element-plus").UploadFile>;
|
|
135
|
+
showIcon: boolean;
|
|
136
|
+
controls: boolean;
|
|
137
|
+
fileList: Partial<import("element-plus").UploadFile>[];
|
|
138
|
+
field: string;
|
|
139
|
+
fileWidth: string;
|
|
140
|
+
fileHeight: string;
|
|
141
|
+
fileStyle: Record<string, any>;
|
|
142
|
+
controlslist: string;
|
|
143
|
+
oncontextmenu: boolean;
|
|
144
|
+
previewWidth: string;
|
|
145
|
+
openPreviewDownload: boolean;
|
|
146
|
+
fileListGap: string;
|
|
147
|
+
fileListStyle: Record<string, any>;
|
|
148
|
+
}, {}>, {
|
|
149
|
+
default?(_: {
|
|
150
|
+
file: Partial<import("element-plus").UploadFile>;
|
|
151
|
+
}): any;
|
|
152
|
+
}>;
|
|
153
|
+
export default _default;
|
|
154
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
155
|
+
new (): {
|
|
156
|
+
$slots: S;
|
|
157
|
+
};
|
|
158
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var FileList_vue_vue_type_script_setup_true_lang = require('./FileList.vue2.js');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
exports.default = FileList_vue_vue_type_script_setup_true_lang.default;
|
|
10
|
+
//# sourceMappingURL=FileList.vue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileList.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var index = require('../fileComponent/index.js');
|
|
7
|
+
var index$1 = require('../previewFile/index.js');
|
|
8
|
+
var fileList = require('./fileList.js');
|
|
9
|
+
|
|
10
|
+
const _hoisted_1 = ["onClick"];
|
|
11
|
+
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
12
|
+
...{
|
|
13
|
+
name: "GmFileList"
|
|
14
|
+
},
|
|
15
|
+
__name: "FileList",
|
|
16
|
+
props: fileList.fileProProps,
|
|
17
|
+
setup(__props) {
|
|
18
|
+
const props = __props;
|
|
19
|
+
const fileListStyle = vue.computed(() => {
|
|
20
|
+
return {
|
|
21
|
+
gap: props.fileListGap,
|
|
22
|
+
...props.fileListStyle
|
|
23
|
+
};
|
|
24
|
+
});
|
|
25
|
+
const fileStyle = vue.computed(() => {
|
|
26
|
+
return {
|
|
27
|
+
width: props.fileWidth,
|
|
28
|
+
height: props.fileHeight,
|
|
29
|
+
border: "1px solid #ccc",
|
|
30
|
+
overflow: "hidden",
|
|
31
|
+
borderRadius: "5px",
|
|
32
|
+
...props.fileStyle
|
|
33
|
+
};
|
|
34
|
+
});
|
|
35
|
+
const dialog = vue.ref(false);
|
|
36
|
+
const fileIndex = vue.ref(0);
|
|
37
|
+
const handlePreview = (index) => {
|
|
38
|
+
fileIndex.value = index;
|
|
39
|
+
dialog.value = true;
|
|
40
|
+
};
|
|
41
|
+
return (_ctx, _cache) => {
|
|
42
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
43
|
+
vue.Fragment,
|
|
44
|
+
null,
|
|
45
|
+
[
|
|
46
|
+
vue.createElementVNode(
|
|
47
|
+
"div",
|
|
48
|
+
{
|
|
49
|
+
class: "gm-flex--wrap gm-flex gm-items-center",
|
|
50
|
+
style: vue.normalizeStyle(fileListStyle.value)
|
|
51
|
+
},
|
|
52
|
+
[
|
|
53
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
54
|
+
vue.Fragment,
|
|
55
|
+
null,
|
|
56
|
+
vue.renderList(_ctx.fileList, (file, index$1) => {
|
|
57
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
58
|
+
key: index$1,
|
|
59
|
+
class: "gm-cursor-pointer",
|
|
60
|
+
onClick: ($event) => handlePreview(index$1)
|
|
61
|
+
}, [
|
|
62
|
+
vue.createVNode(vue.unref(index.GmFileComponent), vue.mergeProps(props, {
|
|
63
|
+
fileStyle: fileStyle.value,
|
|
64
|
+
file,
|
|
65
|
+
controls: false
|
|
66
|
+
}), {
|
|
67
|
+
default: vue.withCtx(() => [
|
|
68
|
+
vue.renderSlot(_ctx.$slots, "default", { file })
|
|
69
|
+
]),
|
|
70
|
+
_: 2
|
|
71
|
+
/* DYNAMIC */
|
|
72
|
+
}, 1040, ["fileStyle", "file"])
|
|
73
|
+
], 8, _hoisted_1);
|
|
74
|
+
}),
|
|
75
|
+
128
|
|
76
|
+
/* KEYED_FRAGMENT */
|
|
77
|
+
))
|
|
78
|
+
],
|
|
79
|
+
4
|
|
80
|
+
/* STYLE */
|
|
81
|
+
),
|
|
82
|
+
vue.createVNode(vue.unref(index$1.GmPreviewFile), vue.mergeProps(props, {
|
|
83
|
+
dialogVisible: dialog.value,
|
|
84
|
+
"onUpdate:dialogVisible": _cache[0] || (_cache[0] = ($event) => dialog.value = $event),
|
|
85
|
+
"file-index": fileIndex.value,
|
|
86
|
+
"onUpdate:fileIndex": _cache[1] || (_cache[1] = ($event) => fileIndex.value = $event)
|
|
87
|
+
}), null, 16, ["dialogVisible", "file-index"])
|
|
88
|
+
],
|
|
89
|
+
64
|
|
90
|
+
/* STABLE_FRAGMENT */
|
|
91
|
+
);
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
exports.default = _sfc_main;
|
|
97
|
+
//# sourceMappingURL=FileList.vue2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileList.vue2.js","sources":["../../../../../../../packages/components/src/composite/fileList2/FileList.vue"],"sourcesContent":["<template>\n <div class=\"gm-flex--wrap gm-flex gm-items-center\" :style=\"fileListStyle\">\n <div v-for=\"(file, index) in fileList\" :key=\"index\" class=\"gm-cursor-pointer\" @click=\"handlePreview(index)\">\n <GmFileComponent v-bind=\"props\" :fileStyle :file :controls=\"false\"> <slot :file=\"file\" /> </GmFileComponent>\n </div>\n </div>\n\n <GmPreviewFile v-bind=\"props\" v-model:dialogVisible=\"dialog\" v-model:file-index=\"fileIndex\" />\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref } from 'vue';\nimport GmFileComponent from '../fileComponent';\nimport GmPreviewFile from '../previewFile';\nimport { fileProProps } from './fileList';\n\ndefineOptions({\n name: 'GmFileList',\n});\n\nconst props = defineProps(fileProProps);\n\nconst fileListStyle = computed(() => {\n return {\n gap: props.fileListGap,\n ...props.fileListStyle,\n };\n});\n\nconst fileStyle = computed(() => {\n return {\n width: props.fileWidth,\n height: props.fileHeight,\n border: '1px solid #ccc',\n overflow: 'hidden',\n borderRadius: '5px',\n ...props.fileStyle,\n };\n});\n\nconst dialog = ref(false);\nconst fileIndex = ref(0);\nconst handlePreview = (index: number) => {\n fileIndex.value = index;\n dialog.value = true;\n};\n</script>\n"],"names":["computed","ref"],"mappings":";;;;;;;;;;;;;;;;;AAoBA,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AAEd,IAAM,MAAA,aAAA,GAAgBA,aAAS,MAAM;AACnC,MAAO,OAAA;AAAA,QACL,KAAK,KAAM,CAAA,WAAA;AAAA,QACX,GAAG,KAAM,CAAA,aAAA;AAAA,OACX,CAAA;AAAA,KACD,CAAA,CAAA;AAED,IAAM,MAAA,SAAA,GAAYA,aAAS,MAAM;AAC/B,MAAO,OAAA;AAAA,QACL,OAAO,KAAM,CAAA,SAAA;AAAA,QACb,QAAQ,KAAM,CAAA,UAAA;AAAA,QACd,MAAQ,EAAA,gBAAA;AAAA,QACR,QAAU,EAAA,QAAA;AAAA,QACV,YAAc,EAAA,KAAA;AAAA,QACd,GAAG,KAAM,CAAA,SAAA;AAAA,OACX,CAAA;AAAA,KACD,CAAA,CAAA;AAED,IAAM,MAAA,MAAA,GAASC,QAAI,KAAK,CAAA,CAAA;AACxB,IAAM,MAAA,SAAA,GAAYA,QAAI,CAAC,CAAA,CAAA;AACvB,IAAM,MAAA,aAAA,GAAgB,CAAC,KAAkB,KAAA;AACvC,MAAA,SAAA,CAAU,KAAQ,GAAA,KAAA,CAAA;AAClB,MAAA,MAAA,CAAO,KAAQ,GAAA,IAAA,CAAA;AAAA,KACjB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|