giime 0.5.3 → 0.5.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 +70 -55
- package/es/api/materialApi/cross/postSaveFileResources.d.ts +2 -2
- package/es/api/materialApi/cross/postSaveFileResources.mjs +1 -0
- package/es/api/materialApi/cross/postSaveFileResources.mjs.map +1 -1
- package/es/components/index.mjs +4 -0
- package/es/components/index.mjs.map +1 -1
- package/es/components/src/base/affix/index.mjs.map +1 -1
- package/es/components/src/business/loginDialog/LoginDialog.vue2.mjs.map +1 -1
- package/es/components/src/business/loginDialog/loginDialog.mjs.map +1 -1
- package/es/components/src/business/uploadMaterial/UploadMaterial.vue.d.ts +259 -90
- package/es/components/src/business/uploadMaterial/UploadMaterial.vue.mjs +2 -5
- package/es/components/src/business/uploadMaterial/UploadMaterial.vue.mjs.map +1 -1
- package/es/components/src/business/uploadMaterial/UploadMaterial.vue2.mjs +25 -162
- package/es/components/src/business/uploadMaterial/UploadMaterial.vue2.mjs.map +1 -1
- package/es/components/src/business/uploadMaterial/index.d.ts +181 -12
- package/es/components/src/business/uploadMaterial/index.mjs +3 -2
- package/es/components/src/business/uploadMaterial/index.mjs.map +1 -1
- package/es/components/src/business/uploadMaterial/uploadMaterial.d.ts +84 -6
- package/es/components/src/business/uploadMaterial/uploadMaterial.mjs +9 -23
- package/es/components/src/business/uploadMaterial/uploadMaterial.mjs.map +1 -1
- package/es/components/src/composite/fileComponent/FileComponent.vue.d.ts +69 -0
- package/es/components/src/composite/fileComponent/FileComponent.vue.mjs +6 -0
- package/es/components/src/composite/fileComponent/FileComponent.vue.mjs.map +1 -0
- package/es/components/src/composite/fileComponent/FileComponent.vue2.mjs +83 -0
- package/es/components/src/composite/fileComponent/FileComponent.vue2.mjs.map +1 -0
- package/es/components/src/composite/fileComponent/assets/image/excel.svg.mjs +4 -0
- package/es/components/src/composite/fileComponent/assets/image/excel.svg.mjs.map +1 -0
- package/es/components/src/composite/fileComponent/assets/image/pdf.svg.mjs +4 -0
- package/es/components/src/composite/fileComponent/assets/image/pdf.svg.mjs.map +1 -0
- package/es/components/src/composite/fileComponent/assets/image/ppt.svg.mjs +4 -0
- package/es/components/src/composite/fileComponent/assets/image/ppt.svg.mjs.map +1 -0
- package/es/components/src/composite/fileComponent/assets/image/psd.svg.mjs +4 -0
- package/es/components/src/composite/fileComponent/assets/image/psd.svg.mjs.map +1 -0
- package/es/components/src/composite/fileComponent/assets/image/text.svg.mjs +4 -0
- package/es/components/src/composite/fileComponent/assets/image/text.svg.mjs.map +1 -0
- package/es/components/src/composite/fileComponent/assets/image/unknown.svg.mjs +4 -0
- package/es/components/src/composite/fileComponent/assets/image/unknown.svg.mjs.map +1 -0
- package/es/components/src/composite/fileComponent/assets/image/word.svg.mjs +4 -0
- package/es/components/src/composite/fileComponent/assets/image/word.svg.mjs.map +1 -0
- package/es/components/src/composite/fileComponent/assets/image/zip.svg.mjs +4 -0
- package/es/components/src/composite/fileComponent/assets/image/zip.svg.mjs.map +1 -0
- package/es/components/src/composite/fileComponent/fileComponent.d.ts +41 -0
- package/es/components/src/composite/fileComponent/fileComponent.mjs +40 -0
- package/es/components/src/composite/fileComponent/fileComponent.mjs.map +1 -0
- package/es/components/src/composite/fileComponent/index.d.ts +71 -0
- package/es/components/src/composite/fileComponent/index.mjs +10 -0
- package/es/components/src/composite/fileComponent/index.mjs.map +1 -0
- package/es/components/src/composite/index.d.ts +2 -0
- package/es/components/src/composite/index.mjs +4 -0
- package/es/components/src/composite/index.mjs.map +1 -1
- package/es/components/src/composite/previewFile/PreviewFile.vue.d.ts +97 -0
- package/es/components/src/composite/previewFile/PreviewFile.vue.mjs +6 -0
- package/es/components/src/composite/previewFile/PreviewFile.vue.mjs.map +1 -0
- package/es/components/src/composite/previewFile/PreviewFile.vue2.mjs +120 -0
- package/es/components/src/composite/previewFile/PreviewFile.vue2.mjs.map +1 -0
- package/es/components/src/composite/previewFile/index.d.ts +99 -0
- package/es/components/src/composite/previewFile/index.mjs +10 -0
- package/es/components/src/composite/previewFile/index.mjs.map +1 -0
- package/es/components/src/composite/previewFile/previewFile.d.ts +42 -0
- package/es/components/src/composite/previewFile/previewFile.mjs +19 -0
- package/es/components/src/composite/previewFile/previewFile.mjs.map +1 -0
- package/es/components/src/composite/uploadFile/UploadFile.vue.d.ts +973 -0
- package/es/components/src/composite/uploadFile/UploadFile.vue.mjs +9 -0
- package/es/components/src/composite/uploadFile/UploadFile.vue.mjs.map +1 -0
- package/es/components/src/composite/uploadFile/UploadFile.vue2.mjs +239 -0
- package/es/components/src/composite/uploadFile/UploadFile.vue2.mjs.map +1 -0
- package/es/components/src/{business/uploadMaterial/UploadMaterial.vue3.mjs → composite/uploadFile/UploadFile.vue3.mjs} +1 -1
- package/es/components/src/composite/uploadFile/UploadFile.vue3.mjs.map +1 -0
- package/es/components/src/{business/uploadMaterial/UploadMaterial.vue4.mjs → composite/uploadFile/UploadFile.vue4.mjs} +1 -1
- package/es/components/src/composite/uploadFile/UploadFile.vue4.mjs.map +1 -0
- package/es/components/src/composite/uploadFile/index.d.ts +2486 -0
- package/es/components/src/composite/uploadFile/index.mjs +9 -0
- package/es/components/src/composite/uploadFile/index.mjs.map +1 -0
- package/es/components/src/composite/uploadFile/uploadFile.d.ts +227 -0
- package/es/components/src/composite/uploadFile/uploadFile.mjs +92 -0
- package/es/components/src/composite/uploadFile/uploadFile.mjs.map +1 -0
- package/es/constants/key.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/index.css +70 -55
- package/es/utils/index.mjs +1 -1
- package/es/utils/src/alioss/aliossPutHook.d.ts +79 -0
- package/es/utils/src/alioss/aliossPutHook.mjs +177 -0
- package/es/utils/src/alioss/aliossPutHook.mjs.map +1 -0
- package/es/utils/src/alioss/aliossToken.d.ts +17 -0
- package/es/utils/src/alioss/aliossToken.mjs +51 -0
- package/es/utils/src/alioss/aliossToken.mjs.map +1 -0
- package/es/utils/src/http/createAxios.mjs.map +1 -1
- package/es/utils/src/http/errorMessage.mjs.map +1 -1
- package/es/utils/src/is.d.ts +44 -2
- package/es/utils/src/is.mjs +29 -1
- package/es/utils/src/is.mjs.map +1 -1
- package/es/utils/src/tree.mjs.map +1 -1
- package/lib/api/materialApi/cross/postSaveFileResources.d.ts +2 -2
- package/lib/api/materialApi/cross/postSaveFileResources.js +1 -0
- package/lib/api/materialApi/cross/postSaveFileResources.js.map +1 -1
- package/lib/components/index.js +22 -14
- package/lib/components/index.js.map +1 -1
- package/lib/components/src/base/affix/index.js.map +1 -1
- package/lib/components/src/business/loginDialog/LoginDialog.vue2.js.map +1 -1
- package/lib/components/src/business/loginDialog/loginDialog.js.map +1 -1
- package/lib/components/src/business/uploadMaterial/UploadMaterial.vue.d.ts +259 -90
- package/lib/components/src/business/uploadMaterial/UploadMaterial.vue.js +2 -5
- package/lib/components/src/business/uploadMaterial/UploadMaterial.vue.js.map +1 -1
- package/lib/components/src/business/uploadMaterial/UploadMaterial.vue2.js +24 -161
- package/lib/components/src/business/uploadMaterial/UploadMaterial.vue2.js.map +1 -1
- package/lib/components/src/business/uploadMaterial/index.d.ts +181 -12
- package/lib/components/src/business/uploadMaterial/index.js +3 -2
- package/lib/components/src/business/uploadMaterial/index.js.map +1 -1
- package/lib/components/src/business/uploadMaterial/uploadMaterial.d.ts +84 -6
- package/lib/components/src/business/uploadMaterial/uploadMaterial.js +9 -23
- package/lib/components/src/business/uploadMaterial/uploadMaterial.js.map +1 -1
- package/lib/components/src/composite/fileComponent/FileComponent.vue.d.ts +69 -0
- package/lib/components/src/composite/fileComponent/FileComponent.vue.js +10 -0
- package/lib/components/src/composite/fileComponent/FileComponent.vue.js.map +1 -0
- package/lib/components/src/composite/fileComponent/FileComponent.vue2.js +87 -0
- package/lib/components/src/composite/fileComponent/FileComponent.vue2.js.map +1 -0
- package/lib/components/src/composite/fileComponent/assets/image/excel.svg.js +8 -0
- package/lib/components/src/composite/fileComponent/assets/image/excel.svg.js.map +1 -0
- package/lib/components/src/composite/fileComponent/assets/image/pdf.svg.js +8 -0
- package/lib/components/src/composite/fileComponent/assets/image/pdf.svg.js.map +1 -0
- package/lib/components/src/composite/fileComponent/assets/image/ppt.svg.js +8 -0
- package/lib/components/src/composite/fileComponent/assets/image/ppt.svg.js.map +1 -0
- package/lib/components/src/composite/fileComponent/assets/image/psd.svg.js +8 -0
- package/lib/components/src/composite/fileComponent/assets/image/psd.svg.js.map +1 -0
- package/lib/components/src/composite/fileComponent/assets/image/text.svg.js +8 -0
- package/lib/components/src/composite/fileComponent/assets/image/text.svg.js.map +1 -0
- package/lib/components/src/composite/fileComponent/assets/image/unknown.svg.js +8 -0
- package/lib/components/src/composite/fileComponent/assets/image/unknown.svg.js.map +1 -0
- package/lib/components/src/composite/fileComponent/assets/image/word.svg.js +8 -0
- package/lib/components/src/composite/fileComponent/assets/image/word.svg.js.map +1 -0
- package/lib/components/src/composite/fileComponent/assets/image/zip.svg.js +8 -0
- package/lib/components/src/composite/fileComponent/assets/image/zip.svg.js.map +1 -0
- package/lib/components/src/composite/fileComponent/fileComponent.d.ts +41 -0
- package/lib/components/src/composite/fileComponent/fileComponent.js +42 -0
- package/lib/components/src/composite/fileComponent/fileComponent.js.map +1 -0
- package/lib/components/src/composite/fileComponent/index.d.ts +71 -0
- package/lib/components/src/composite/fileComponent/index.js +16 -0
- package/lib/components/src/composite/fileComponent/index.js.map +1 -0
- package/lib/components/src/composite/index.d.ts +2 -0
- package/lib/components/src/composite/index.js +8 -0
- package/lib/components/src/composite/index.js.map +1 -1
- package/lib/components/src/composite/previewFile/PreviewFile.vue.d.ts +97 -0
- package/lib/components/src/composite/previewFile/PreviewFile.vue.js +10 -0
- package/lib/components/src/composite/previewFile/PreviewFile.vue.js.map +1 -0
- package/lib/components/src/composite/previewFile/PreviewFile.vue2.js +124 -0
- package/lib/components/src/composite/previewFile/PreviewFile.vue2.js.map +1 -0
- package/lib/components/src/composite/previewFile/index.d.ts +99 -0
- package/lib/components/src/composite/previewFile/index.js +16 -0
- package/lib/components/src/composite/previewFile/index.js.map +1 -0
- package/lib/components/src/composite/previewFile/previewFile.d.ts +42 -0
- package/lib/components/src/composite/previewFile/previewFile.js +21 -0
- package/lib/components/src/composite/previewFile/previewFile.js.map +1 -0
- package/lib/components/src/composite/uploadFile/UploadFile.vue.d.ts +973 -0
- package/lib/components/src/composite/uploadFile/UploadFile.vue.js +13 -0
- package/lib/components/src/composite/uploadFile/UploadFile.vue.js.map +1 -0
- package/lib/components/src/composite/uploadFile/UploadFile.vue2.js +243 -0
- package/lib/components/src/composite/uploadFile/UploadFile.vue2.js.map +1 -0
- package/lib/components/src/{business/uploadMaterial/UploadMaterial.vue3.js → composite/uploadFile/UploadFile.vue3.js} +1 -1
- package/lib/components/src/composite/uploadFile/UploadFile.vue3.js.map +1 -0
- package/lib/components/src/{business/uploadMaterial/UploadMaterial.vue4.js → composite/uploadFile/UploadFile.vue4.js} +1 -1
- package/lib/components/src/composite/uploadFile/UploadFile.vue4.js.map +1 -0
- package/lib/components/src/composite/uploadFile/index.d.ts +2486 -0
- package/lib/components/src/composite/uploadFile/index.js +15 -0
- package/lib/components/src/composite/uploadFile/index.js.map +1 -0
- package/lib/components/src/composite/uploadFile/uploadFile.d.ts +227 -0
- package/lib/components/src/composite/uploadFile/uploadFile.js +94 -0
- package/lib/components/src/composite/uploadFile/uploadFile.js.map +1 -0
- package/lib/constants/key.js.map +1 -1
- package/lib/giime/index.js +75 -60
- 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 +70 -55
- package/lib/utils/index.js +7 -0
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/src/alioss/aliossPutHook.d.ts +79 -0
- package/lib/utils/src/alioss/aliossPutHook.js +181 -0
- package/lib/utils/src/alioss/aliossPutHook.js.map +1 -0
- package/lib/utils/src/alioss/aliossToken.d.ts +17 -0
- package/lib/utils/src/alioss/aliossToken.js +55 -0
- package/lib/utils/src/alioss/aliossToken.js.map +1 -0
- package/lib/utils/src/http/createAxios.js.map +1 -1
- package/lib/utils/src/http/errorMessage.js.map +1 -1
- package/lib/utils/src/is.d.ts +44 -2
- package/lib/utils/src/is.js +35 -0
- package/lib/utils/src/is.js.map +1 -1
- package/lib/utils/src/tree.js.map +1 -1
- package/package.json +1 -1
- package/es/components/src/business/uploadMaterial/UploadMaterial.vue3.mjs.map +0 -1
- package/es/components/src/business/uploadMaterial/UploadMaterial.vue4.mjs.map +0 -1
- package/es/utils/src/alioss.d.ts +0 -32
- package/es/utils/src/alioss.mjs +0 -110
- package/es/utils/src/alioss.mjs.map +0 -1
- package/lib/components/src/business/uploadMaterial/UploadMaterial.vue3.js.map +0 -1
- package/lib/components/src/business/uploadMaterial/UploadMaterial.vue4.js.map +0 -1
- package/lib/utils/src/alioss.d.ts +0 -32
- package/lib/utils/src/alioss.js +0 -113
- package/lib/utils/src/alioss.js.map +0 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import '../../../../utils/index.mjs';
|
|
2
|
+
import './FileComponent.vue.mjs';
|
|
3
|
+
export { fileComponentProps } from './fileComponent.mjs';
|
|
4
|
+
import { withInstall } from '../../../../utils/src/vue/install.mjs';
|
|
5
|
+
import _sfc_main from './FileComponent.vue2.mjs';
|
|
6
|
+
|
|
7
|
+
const GmFileComponent = withInstall(_sfc_main);
|
|
8
|
+
|
|
9
|
+
export { GmFileComponent, GmFileComponent as default };
|
|
10
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../../../packages/components/src/composite/fileComponent/index.ts"],"sourcesContent":["import { withInstall } from '@giime/utils';\r\nimport FileComponent from './FileComponent.vue';\r\n\r\nexport const GmFileComponent = withInstall(FileComponent);\r\nexport type FileComponentInstance = InstanceType<typeof FileComponent>;\r\nexport * from './fileComponent';\r\nexport default GmFileComponent;\r\n"],"names":["FileComponent"],"mappings":";;;;;;AAGa,MAAA,eAAA,GAAkB,YAAYA,SAAa;;;;"}
|
|
@@ -7,6 +7,8 @@ export { GmOperateButton } from './operateButton/index.mjs';
|
|
|
7
7
|
export { GmNumberInterval } from './numberInterval/index.mjs';
|
|
8
8
|
export { GmSelectOptions } from './selectOptions/index.mjs';
|
|
9
9
|
export { GmImportDialog } from './importDialog/index.mjs';
|
|
10
|
+
export { GmFileComponent } from './fileComponent/index.mjs';
|
|
11
|
+
export { GmPreviewFile } from './previewFile/index.mjs';
|
|
10
12
|
export { searchFormEmits, searchFormItemList, searchFormProps } from './searchForm/searchForm.mjs';
|
|
11
13
|
export { searchFormCommonProps } from './searchForm/searchFormItems/common.mjs';
|
|
12
14
|
export { SearchFormInputName, searchFormInputEmits, searchFormInputProps } from './searchForm/searchFormItems/input/searchFormInput.mjs';
|
|
@@ -40,4 +42,6 @@ export { GmOperateButtonForm } from './operateButton/operateButtonForm/index.mjs
|
|
|
40
42
|
export { numIntervalEmits, numIntervalProps } from './numberInterval/numberInterval.mjs';
|
|
41
43
|
export { selectOptionsEmits, selectOptionsProps } from './selectOptions/selectOptions.mjs';
|
|
42
44
|
export { importDialogEmits, importDialogProps } from './importDialog/importDialog.mjs';
|
|
45
|
+
export { fileComponentProps } from './fileComponent/fileComponent.mjs';
|
|
46
|
+
export { previewFileProps } from './previewFile/previewFile.mjs';
|
|
43
47
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import type { UploadFile } from 'element-plus';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
dialogVisible: import("vue").PropType<boolean>;
|
|
4
|
+
fileIndex: import("vue").PropType<number>;
|
|
5
|
+
fileList: {
|
|
6
|
+
type: import("vue").PropType<Partial<UploadFile>[]>;
|
|
7
|
+
default: () => never[];
|
|
8
|
+
};
|
|
9
|
+
width: {
|
|
10
|
+
type: StringConstructor;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
file: {
|
|
14
|
+
type: import("vue").PropType<Partial<UploadFile>>;
|
|
15
|
+
default: () => {};
|
|
16
|
+
};
|
|
17
|
+
url: {
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
size: {
|
|
22
|
+
type: NumberConstructor;
|
|
23
|
+
default: number;
|
|
24
|
+
};
|
|
25
|
+
field: {
|
|
26
|
+
type: import("vue").PropType<keyof UploadFile>;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
controls: {
|
|
30
|
+
type: BooleanConstructor;
|
|
31
|
+
default: boolean;
|
|
32
|
+
};
|
|
33
|
+
controlslist: {
|
|
34
|
+
type: StringConstructor;
|
|
35
|
+
default: string;
|
|
36
|
+
};
|
|
37
|
+
oncontextmenu: {
|
|
38
|
+
type: BooleanConstructor;
|
|
39
|
+
default: boolean;
|
|
40
|
+
};
|
|
41
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
42
|
+
"update:dialogVisible": (dialogVisible: boolean) => void;
|
|
43
|
+
"update:fileIndex": (fileIndex: number) => void;
|
|
44
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
45
|
+
dialogVisible: import("vue").PropType<boolean>;
|
|
46
|
+
fileIndex: import("vue").PropType<number>;
|
|
47
|
+
fileList: {
|
|
48
|
+
type: import("vue").PropType<Partial<UploadFile>[]>;
|
|
49
|
+
default: () => never[];
|
|
50
|
+
};
|
|
51
|
+
width: {
|
|
52
|
+
type: StringConstructor;
|
|
53
|
+
default: string;
|
|
54
|
+
};
|
|
55
|
+
file: {
|
|
56
|
+
type: import("vue").PropType<Partial<UploadFile>>;
|
|
57
|
+
default: () => {};
|
|
58
|
+
};
|
|
59
|
+
url: {
|
|
60
|
+
type: StringConstructor;
|
|
61
|
+
default: string;
|
|
62
|
+
};
|
|
63
|
+
size: {
|
|
64
|
+
type: NumberConstructor;
|
|
65
|
+
default: number;
|
|
66
|
+
};
|
|
67
|
+
field: {
|
|
68
|
+
type: import("vue").PropType<keyof UploadFile>;
|
|
69
|
+
default: string;
|
|
70
|
+
};
|
|
71
|
+
controls: {
|
|
72
|
+
type: BooleanConstructor;
|
|
73
|
+
default: boolean;
|
|
74
|
+
};
|
|
75
|
+
controlslist: {
|
|
76
|
+
type: StringConstructor;
|
|
77
|
+
default: string;
|
|
78
|
+
};
|
|
79
|
+
oncontextmenu: {
|
|
80
|
+
type: BooleanConstructor;
|
|
81
|
+
default: boolean;
|
|
82
|
+
};
|
|
83
|
+
}>> & {
|
|
84
|
+
"onUpdate:dialogVisible"?: ((dialogVisible: boolean) => any) | undefined;
|
|
85
|
+
"onUpdate:fileIndex"?: ((fileIndex: number) => any) | undefined;
|
|
86
|
+
}, {
|
|
87
|
+
size: number;
|
|
88
|
+
width: string;
|
|
89
|
+
url: string;
|
|
90
|
+
controls: boolean;
|
|
91
|
+
file: Partial<UploadFile>;
|
|
92
|
+
fileList: Partial<UploadFile>[];
|
|
93
|
+
field: keyof UploadFile;
|
|
94
|
+
controlslist: string;
|
|
95
|
+
oncontextmenu: boolean;
|
|
96
|
+
}, {}>;
|
|
97
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreviewFile.vue.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { defineComponent, mergeModels, useModel, computed, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, createElementBlock, createVNode, unref, createCommentVNode, normalizeProps, guardReactiveProps } from 'vue';
|
|
2
|
+
import { ElMessage } from 'element-plus';
|
|
3
|
+
import { ArrowLeftBold, ArrowRightBold } from '@element-plus/icons-vue';
|
|
4
|
+
import { GmFileComponent } from '../fileComponent/index.mjs';
|
|
5
|
+
import { previewFileProps } from './previewFile.mjs';
|
|
6
|
+
|
|
7
|
+
const _hoisted_1 = { class: "gm-flex gm-select-none gm-items-center gm-justify-center gm-gap-4" };
|
|
8
|
+
const _hoisted_2 = {
|
|
9
|
+
class: "gm-flex gm-flex-1 gm-items-center gm-justify-center",
|
|
10
|
+
style: { "height": "calc(100vh - 240px)" }
|
|
11
|
+
};
|
|
12
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
13
|
+
...{
|
|
14
|
+
name: "GmPreviewFile"
|
|
15
|
+
},
|
|
16
|
+
__name: "PreviewFile",
|
|
17
|
+
props: /* @__PURE__ */ mergeModels(previewFileProps, {
|
|
18
|
+
"dialogVisible": { type: Boolean, ...{ default: false } },
|
|
19
|
+
"dialogVisibleModifiers": {},
|
|
20
|
+
"fileIndex": { default: 0 },
|
|
21
|
+
"fileIndexModifiers": {}
|
|
22
|
+
}),
|
|
23
|
+
emits: ["update:dialogVisible", "update:fileIndex"],
|
|
24
|
+
setup(__props) {
|
|
25
|
+
const props = __props;
|
|
26
|
+
const dialogVisible = useModel(__props, "dialogVisible");
|
|
27
|
+
const fileIndex = useModel(__props, "fileIndex");
|
|
28
|
+
const files = computed(() => {
|
|
29
|
+
let result = props.fileList;
|
|
30
|
+
if (props.fileList && !props.fileList.length && props.file) {
|
|
31
|
+
result = [props.file];
|
|
32
|
+
}
|
|
33
|
+
return result;
|
|
34
|
+
});
|
|
35
|
+
const fileProps = computed(() => {
|
|
36
|
+
const file = files.value[fileIndex.value];
|
|
37
|
+
return {
|
|
38
|
+
file,
|
|
39
|
+
controls: props.controls,
|
|
40
|
+
oncontextmenu: props.oncontextmenu,
|
|
41
|
+
controlslist: props.controlslist,
|
|
42
|
+
field: props.field,
|
|
43
|
+
url: props.url,
|
|
44
|
+
size: props.size
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
const prev = () => {
|
|
48
|
+
if (fileIndex.value > 0) {
|
|
49
|
+
fileIndex.value--;
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
ElMessage.warning("\u5DF2\u7ECF\u662F\u7B2C\u4E00\u5F20\u4E86");
|
|
53
|
+
};
|
|
54
|
+
const next = () => {
|
|
55
|
+
if (fileIndex.value < props.fileList.length - 1) {
|
|
56
|
+
fileIndex.value++;
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
ElMessage.warning("\u6CA1\u6709\u66F4\u591A\u4E86\uFF01");
|
|
60
|
+
};
|
|
61
|
+
return (_ctx, _cache) => {
|
|
62
|
+
const _component_el_icon = resolveComponent("el-icon");
|
|
63
|
+
const _component_el_dialog = resolveComponent("el-dialog");
|
|
64
|
+
return openBlock(), createBlock(_component_el_dialog, {
|
|
65
|
+
modelValue: dialogVisible.value,
|
|
66
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dialogVisible.value = $event),
|
|
67
|
+
title: "\u9884\u89C8",
|
|
68
|
+
width: _ctx.width,
|
|
69
|
+
top: "10vh",
|
|
70
|
+
"append-to-body": "",
|
|
71
|
+
"destroy-on-close": ""
|
|
72
|
+
}, {
|
|
73
|
+
default: withCtx(() => [
|
|
74
|
+
createElementVNode("div", _hoisted_1, [
|
|
75
|
+
files.value.length > 1 ? (openBlock(), createElementBlock("div", {
|
|
76
|
+
key: 0,
|
|
77
|
+
class: "gm-cursor-pointer",
|
|
78
|
+
onClick: prev
|
|
79
|
+
}, [
|
|
80
|
+
createVNode(_component_el_icon, { size: 40 }, {
|
|
81
|
+
default: withCtx(() => [
|
|
82
|
+
createVNode(unref(ArrowLeftBold))
|
|
83
|
+
]),
|
|
84
|
+
_: 1
|
|
85
|
+
/* STABLE */
|
|
86
|
+
})
|
|
87
|
+
])) : createCommentVNode("v-if", true),
|
|
88
|
+
createElementVNode("div", _hoisted_2, [
|
|
89
|
+
createVNode(
|
|
90
|
+
unref(GmFileComponent),
|
|
91
|
+
normalizeProps(guardReactiveProps(fileProps.value)),
|
|
92
|
+
null,
|
|
93
|
+
16
|
|
94
|
+
/* FULL_PROPS */
|
|
95
|
+
)
|
|
96
|
+
]),
|
|
97
|
+
files.value.length > 1 ? (openBlock(), createElementBlock("div", {
|
|
98
|
+
key: 1,
|
|
99
|
+
class: "gm-cursor-pointer",
|
|
100
|
+
onClick: next
|
|
101
|
+
}, [
|
|
102
|
+
createVNode(_component_el_icon, { size: 40 }, {
|
|
103
|
+
default: withCtx(() => [
|
|
104
|
+
createVNode(unref(ArrowRightBold))
|
|
105
|
+
]),
|
|
106
|
+
_: 1
|
|
107
|
+
/* STABLE */
|
|
108
|
+
})
|
|
109
|
+
])) : createCommentVNode("v-if", true)
|
|
110
|
+
])
|
|
111
|
+
]),
|
|
112
|
+
_: 1
|
|
113
|
+
/* STABLE */
|
|
114
|
+
}, 8, ["modelValue", "width"]);
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
export { _sfc_main as default };
|
|
120
|
+
//# sourceMappingURL=PreviewFile.vue2.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreviewFile.vue2.mjs","sources":["../../../../../../../packages/components/src/composite/previewFile/PreviewFile.vue"],"sourcesContent":["<template>\r\n <el-dialog v-model=\"dialogVisible\" title=\"预览\" :width=\"width\" top=\"10vh\" append-to-body destroy-on-close>\r\n <div class=\"gm-flex gm-select-none gm-items-center gm-justify-center gm-gap-4\">\r\n <div v-if=\"files.length > 1\" class=\"gm-cursor-pointer\" @click=\"prev\">\r\n <el-icon :size=\"40\"><ArrowLeftBold /></el-icon>\r\n </div>\r\n <div class=\"gm-flex gm-flex-1 gm-items-center gm-justify-center\" style=\"height: calc(100vh - 240px)\">\r\n <GmFileComponent v-bind=\"fileProps\" />\r\n </div>\r\n <div v-if=\"files.length > 1\" class=\"gm-cursor-pointer\" @click=\"next\">\r\n <el-icon :size=\"40\"><ArrowRightBold /></el-icon>\r\n </div>\r\n </div>\r\n </el-dialog>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { computed } from 'vue';\r\nimport { ElMessage } from 'element-plus';\r\nimport { ArrowLeftBold, ArrowRightBold } from '@element-plus/icons-vue';\r\nimport GmFileComponent from '../fileComponent';\r\nimport { previewFileProps } from './previewFile';\r\nimport type { UploadFile } from 'element-plus';\r\n\r\ndefineOptions({\r\n name: 'GmPreviewFile',\r\n});\r\n\r\nconst props = defineProps(previewFileProps);\r\nconst dialogVisible = defineModel<boolean>('dialogVisible', { default: false });\r\nconst fileIndex = defineModel<number>('fileIndex', { default: 0 });\r\n\r\nconst files = computed(() => {\r\n let result: Partial<UploadFile>[] = props.fileList;\r\n if (props.fileList && !props.fileList.length && props.file) {\r\n result = [props.file];\r\n }\r\n return result;\r\n});\r\n\r\nconst fileProps = computed(() => {\r\n const file = files.value[fileIndex.value];\r\n return {\r\n file,\r\n controls: props.controls,\r\n oncontextmenu: props.oncontextmenu,\r\n controlslist: props.controlslist,\r\n field: props.field,\r\n url: props.url,\r\n size: props.size,\r\n };\r\n});\r\n\r\nconst prev = () => {\r\n if (fileIndex.value > 0) {\r\n fileIndex.value--;\r\n return;\r\n }\r\n ElMessage.warning('已经是第一张了');\r\n};\r\n\r\nconst next = () => {\r\n if (fileIndex.value < props.fileList.length - 1) {\r\n fileIndex.value++;\r\n return;\r\n }\r\n ElMessage.warning('没有更多了!');\r\n};\r\n</script>\r\n"],"names":["_useModel"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA4BA,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AACd,IAAM,MAAA,aAAA,GAAgBA,QAAqB,CAAA,OAAA,EAAA,eAAmC,CAAA,CAAA;AAC9E,IAAM,MAAA,SAAA,GAAYA,QAAoB,CAAA,OAAA,EAAA,WAA2B,CAAA,CAAA;AAEjE,IAAM,MAAA,KAAA,GAAQ,SAAS,MAAM;AAC3B,MAAA,IAAI,SAAgC,KAAM,CAAA,QAAA,CAAA;AAC1C,MAAA,IAAI,MAAM,QAAY,IAAA,CAAC,MAAM,QAAS,CAAA,MAAA,IAAU,MAAM,IAAM,EAAA;AAC1D,QAAS,MAAA,GAAA,CAAC,MAAM,IAAI,CAAA,CAAA;AAAA,OACtB;AACA,MAAO,OAAA,MAAA,CAAA;AAAA,KACR,CAAA,CAAA;AAED,IAAM,MAAA,SAAA,GAAY,SAAS,MAAM;AAC/B,MAAA,MAAM,IAAO,GAAA,KAAA,CAAM,KAAM,CAAA,SAAA,CAAU,KAAK,CAAA,CAAA;AACxC,MAAO,OAAA;AAAA,QACL,IAAA;AAAA,QACA,UAAU,KAAM,CAAA,QAAA;AAAA,QAChB,eAAe,KAAM,CAAA,aAAA;AAAA,QACrB,cAAc,KAAM,CAAA,YAAA;AAAA,QACpB,OAAO,KAAM,CAAA,KAAA;AAAA,QACb,KAAK,KAAM,CAAA,GAAA;AAAA,QACX,MAAM,KAAM,CAAA,IAAA;AAAA,OACd,CAAA;AAAA,KACD,CAAA,CAAA;AAED,IAAA,MAAM,OAAO,MAAM;AACjB,MAAI,IAAA,SAAA,CAAU,QAAQ,CAAG,EAAA;AACvB,QAAU,SAAA,CAAA,KAAA,EAAA,CAAA;AACV,QAAA,OAAA;AAAA,OACF;AACA,MAAA,SAAA,CAAU,QAAQ,4CAAS,CAAA,CAAA;AAAA,KAC7B,CAAA;AAEA,IAAA,MAAM,OAAO,MAAM;AACjB,MAAA,IAAI,SAAU,CAAA,KAAA,GAAQ,KAAM,CAAA,QAAA,CAAS,SAAS,CAAG,EAAA;AAC/C,QAAU,SAAA,CAAA,KAAA,EAAA,CAAA;AACV,QAAA,OAAA;AAAA,OACF;AACA,MAAA,SAAA,CAAU,QAAQ,sCAAQ,CAAA,CAAA;AAAA,KAC5B,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import PreviewFile from './PreviewFile.vue';
|
|
2
|
+
export declare const GmPreviewFile: import("../../../../utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
3
|
+
dialogVisible: import("vue").PropType<boolean>;
|
|
4
|
+
fileIndex: import("vue").PropType<number>;
|
|
5
|
+
fileList: {
|
|
6
|
+
type: import("vue").PropType<Partial<import("element-plus").UploadFile>[]>;
|
|
7
|
+
default: () => never[];
|
|
8
|
+
};
|
|
9
|
+
width: {
|
|
10
|
+
type: StringConstructor;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
file: {
|
|
14
|
+
type: import("vue").PropType<Partial<import("element-plus").UploadFile>>;
|
|
15
|
+
default: () => {};
|
|
16
|
+
};
|
|
17
|
+
url: {
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
size: {
|
|
22
|
+
type: NumberConstructor;
|
|
23
|
+
default: number;
|
|
24
|
+
};
|
|
25
|
+
field: {
|
|
26
|
+
type: import("vue").PropType<keyof import("element-plus").UploadFile>;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
controls: {
|
|
30
|
+
type: BooleanConstructor;
|
|
31
|
+
default: boolean;
|
|
32
|
+
};
|
|
33
|
+
controlslist: {
|
|
34
|
+
type: StringConstructor;
|
|
35
|
+
default: string;
|
|
36
|
+
};
|
|
37
|
+
oncontextmenu: {
|
|
38
|
+
type: BooleanConstructor;
|
|
39
|
+
default: boolean;
|
|
40
|
+
};
|
|
41
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
42
|
+
"update:dialogVisible": (dialogVisible: boolean) => void;
|
|
43
|
+
"update:fileIndex": (fileIndex: number) => void;
|
|
44
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
45
|
+
dialogVisible: import("vue").PropType<boolean>;
|
|
46
|
+
fileIndex: import("vue").PropType<number>;
|
|
47
|
+
fileList: {
|
|
48
|
+
type: import("vue").PropType<Partial<import("element-plus").UploadFile>[]>;
|
|
49
|
+
default: () => never[];
|
|
50
|
+
};
|
|
51
|
+
width: {
|
|
52
|
+
type: StringConstructor;
|
|
53
|
+
default: string;
|
|
54
|
+
};
|
|
55
|
+
file: {
|
|
56
|
+
type: import("vue").PropType<Partial<import("element-plus").UploadFile>>;
|
|
57
|
+
default: () => {};
|
|
58
|
+
};
|
|
59
|
+
url: {
|
|
60
|
+
type: StringConstructor;
|
|
61
|
+
default: string;
|
|
62
|
+
};
|
|
63
|
+
size: {
|
|
64
|
+
type: NumberConstructor;
|
|
65
|
+
default: number;
|
|
66
|
+
};
|
|
67
|
+
field: {
|
|
68
|
+
type: import("vue").PropType<keyof import("element-plus").UploadFile>;
|
|
69
|
+
default: string;
|
|
70
|
+
};
|
|
71
|
+
controls: {
|
|
72
|
+
type: BooleanConstructor;
|
|
73
|
+
default: boolean;
|
|
74
|
+
};
|
|
75
|
+
controlslist: {
|
|
76
|
+
type: StringConstructor;
|
|
77
|
+
default: string;
|
|
78
|
+
};
|
|
79
|
+
oncontextmenu: {
|
|
80
|
+
type: BooleanConstructor;
|
|
81
|
+
default: boolean;
|
|
82
|
+
};
|
|
83
|
+
}>> & {
|
|
84
|
+
"onUpdate:dialogVisible"?: ((dialogVisible: boolean) => any) | undefined;
|
|
85
|
+
"onUpdate:fileIndex"?: ((fileIndex: number) => any) | undefined;
|
|
86
|
+
}, {
|
|
87
|
+
size: number;
|
|
88
|
+
width: string;
|
|
89
|
+
url: string;
|
|
90
|
+
controls: boolean;
|
|
91
|
+
file: Partial<import("element-plus").UploadFile>;
|
|
92
|
+
fileList: Partial<import("element-plus").UploadFile>[];
|
|
93
|
+
field: keyof import("element-plus").UploadFile;
|
|
94
|
+
controlslist: string;
|
|
95
|
+
oncontextmenu: boolean;
|
|
96
|
+
}, {}>> & Record<string, any>;
|
|
97
|
+
export type PreviewFileInstance = InstanceType<typeof PreviewFile>;
|
|
98
|
+
export * from './previewFile';
|
|
99
|
+
export default GmPreviewFile;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import '../../../../utils/index.mjs';
|
|
2
|
+
import './PreviewFile.vue.mjs';
|
|
3
|
+
export { previewFileProps } from './previewFile.mjs';
|
|
4
|
+
import { withInstall } from '../../../../utils/src/vue/install.mjs';
|
|
5
|
+
import _sfc_main from './PreviewFile.vue2.mjs';
|
|
6
|
+
|
|
7
|
+
const GmPreviewFile = withInstall(_sfc_main);
|
|
8
|
+
|
|
9
|
+
export { GmPreviewFile, GmPreviewFile as default };
|
|
10
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../../../packages/components/src/composite/previewFile/index.ts"],"sourcesContent":["import { withInstall } from '@giime/utils';\r\nimport PreviewFile from './PreviewFile.vue';\r\n\r\nexport const GmPreviewFile = withInstall(PreviewFile);\r\nexport type PreviewFileInstance = InstanceType<typeof PreviewFile>;\r\nexport * from './previewFile';\r\nexport default GmPreviewFile;\r\n"],"names":["PreviewFile"],"mappings":";;;;;;AAGa,MAAA,aAAA,GAAgB,YAAYA,SAAW;;;;"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
import type { UploadFile } from 'element-plus';
|
|
3
|
+
export declare const previewFileProps: {
|
|
4
|
+
/** 文件列表 */
|
|
5
|
+
fileList: {
|
|
6
|
+
type: PropType<Partial<UploadFile>[]>;
|
|
7
|
+
default: () => never[];
|
|
8
|
+
};
|
|
9
|
+
/** 弹层宽度 */
|
|
10
|
+
width: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
file: {
|
|
15
|
+
type: PropType<Partial<UploadFile>>;
|
|
16
|
+
default: () => {};
|
|
17
|
+
};
|
|
18
|
+
url: {
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
size: {
|
|
23
|
+
type: NumberConstructor;
|
|
24
|
+
default: number;
|
|
25
|
+
};
|
|
26
|
+
field: {
|
|
27
|
+
type: PropType<keyof UploadFile>;
|
|
28
|
+
default: string;
|
|
29
|
+
};
|
|
30
|
+
controls: {
|
|
31
|
+
type: BooleanConstructor;
|
|
32
|
+
default: boolean;
|
|
33
|
+
};
|
|
34
|
+
controlslist: {
|
|
35
|
+
type: StringConstructor;
|
|
36
|
+
default: string;
|
|
37
|
+
};
|
|
38
|
+
oncontextmenu: {
|
|
39
|
+
type: BooleanConstructor;
|
|
40
|
+
default: boolean;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import '../fileComponent/index.mjs';
|
|
2
|
+
import { fileComponentProps } from '../fileComponent/fileComponent.mjs';
|
|
3
|
+
|
|
4
|
+
const previewFileProps = {
|
|
5
|
+
...fileComponentProps,
|
|
6
|
+
/** 文件列表 */
|
|
7
|
+
fileList: {
|
|
8
|
+
type: Array,
|
|
9
|
+
default: () => []
|
|
10
|
+
},
|
|
11
|
+
/** 弹层宽度 */
|
|
12
|
+
width: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: "1000px"
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export { previewFileProps };
|
|
19
|
+
//# sourceMappingURL=previewFile.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"previewFile.mjs","sources":["../../../../../../../packages/components/src/composite/previewFile/previewFile.ts"],"sourcesContent":["import { fileComponentProps } from '../fileComponent';\r\nimport type { PropType } from 'vue';\r\nimport type { UploadFile } from 'element-plus';\r\n\r\nexport const previewFileProps = {\r\n ...fileComponentProps,\r\n /** 文件列表 */\r\n fileList: {\r\n type: Array as PropType<Partial<UploadFile>[]>,\r\n default: () => [],\r\n },\r\n /** 弹层宽度 */\r\n width: {\r\n type: String,\r\n default: '1000px',\r\n },\r\n};\r\n"],"names":[],"mappings":";;;AAIO,MAAM,gBAAmB,GAAA;AAAA,EAC9B,GAAG,kBAAA;AAAA;AAAA,EAEH,QAAU,EAAA;AAAA,IACR,IAAM,EAAA,KAAA;AAAA,IACN,OAAA,EAAS,MAAM,EAAC;AAAA,GAClB;AAAA;AAAA,EAEA,KAAO,EAAA;AAAA,IACL,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,QAAA;AAAA,GACX;AACF;;;;"}
|