giime 0.9.10 → 0.9.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 +97 -97
- package/es/api/resource/interface/apiTypes/Address.d.ts +9 -0
- package/es/api/resource/interface/apiTypes/Address.mjs +2 -0
- package/es/api/resource/interface/apiTypes/Address.mjs.map +1 -0
- package/es/api/resource/interface/apiTypes/AudioStream.d.ts +19 -0
- package/es/api/resource/interface/apiTypes/AudioStream.mjs +2 -0
- package/es/api/resource/interface/apiTypes/AudioStream.mjs.map +1 -0
- package/es/api/resource/interface/apiTypes/GenerateUploadUrlRequest.d.ts +3 -1
- package/es/api/resource/interface/apiTypes/ImageMetadata.d.ts +24 -0
- package/es/api/resource/interface/apiTypes/ImageMetadata.mjs +2 -0
- package/es/api/resource/interface/apiTypes/ImageMetadata.mjs.map +1 -0
- package/es/api/resource/interface/apiTypes/MediaInfo.d.ts +27 -0
- package/es/api/resource/interface/apiTypes/MediaInfo.mjs +2 -0
- package/es/api/resource/interface/apiTypes/MediaInfo.mjs.map +1 -0
- package/es/api/resource/interface/apiTypes/RResourceAttrDto.d.ts +10 -0
- package/es/api/resource/interface/apiTypes/RResourceAttrDto.mjs +2 -0
- package/es/api/resource/interface/apiTypes/RResourceAttrDto.mjs.map +1 -0
- package/es/api/resource/interface/apiTypes/RResourceAttrUrlResponse.d.ts +10 -0
- package/es/api/resource/interface/apiTypes/RResourceAttrUrlResponse.mjs +2 -0
- package/es/api/resource/interface/apiTypes/RResourceAttrUrlResponse.mjs.map +1 -0
- package/es/api/resource/interface/apiTypes/ResourceAttrDto.d.ts +5 -0
- package/es/api/resource/interface/apiTypes/ResourceAttrDto.mjs +2 -0
- package/es/api/resource/interface/apiTypes/ResourceAttrDto.mjs.map +1 -0
- package/es/api/resource/interface/apiTypes/ResourceAttrUrlResponse.d.ts +4 -0
- package/es/api/resource/interface/apiTypes/ResourceAttrUrlResponse.mjs +2 -0
- package/es/api/resource/interface/apiTypes/ResourceAttrUrlResponse.mjs.map +1 -0
- package/es/api/resource/interface/apiTypes/ResourceUploadNoticeRequest.d.ts +4 -0
- package/es/api/resource/interface/apiTypes/ResourceUploadNoticeRequest.mjs +2 -0
- package/es/api/resource/interface/apiTypes/ResourceUploadNoticeRequest.mjs.map +1 -0
- package/es/api/resource/interface/apiTypes/Subtitle.d.ts +14 -0
- package/es/api/resource/interface/apiTypes/Subtitle.mjs +2 -0
- package/es/api/resource/interface/apiTypes/Subtitle.mjs.map +1 -0
- package/es/api/resource/interface/apiTypes/VideoStream.d.ts +30 -0
- package/es/api/resource/interface/apiTypes/VideoStream.mjs +2 -0
- package/es/api/resource/interface/apiTypes/VideoStream.mjs.map +1 -0
- package/es/api/resource/interface/index.d.ts +25 -14
- package/es/api/resource/interface/index.mjs +25 -14
- package/es/api/resource/interface/index.mjs.map +1 -1
- package/es/components/src/base/image/Image.vue.d.ts +32 -5
- package/es/components/src/base/image/Image.vue2.mjs +108 -4
- package/es/components/src/base/image/Image.vue2.mjs.map +1 -1
- package/es/components/src/base/image/image.d.ts +26 -15
- package/es/components/src/base/image/image.mjs +11 -1
- package/es/components/src/base/image/image.mjs.map +1 -1
- package/es/components/src/base/image/index.d.ts +57 -10
- package/es/components/src/base/imageViewer/ImageViewer.vue.d.ts +36 -5
- package/es/components/src/base/imageViewer/ImageViewer.vue2.mjs +111 -5
- package/es/components/src/base/imageViewer/ImageViewer.vue2.mjs.map +1 -1
- package/es/components/src/base/imageViewer/imageViewer.d.ts +22 -11
- package/es/components/src/base/imageViewer/imageViewer.mjs +11 -1
- package/es/components/src/base/imageViewer/imageViewer.mjs.map +1 -1
- package/es/components/src/base/imageViewer/index.d.ts +355 -89
- package/es/components/src/base/input/Input.vue.d.ts +4 -4
- package/es/components/src/base/input/index.d.ts +8 -8
- package/es/components/src/base/popconfirm/Popconfirm.vue.d.ts +2 -2
- package/es/components/src/base/popconfirm/index.d.ts +6 -6
- package/es/components/src/base/upload/Upload.vue.d.ts +1 -1
- package/es/components/src/base/upload/index.d.ts +3 -3
- package/es/components/src/business/uploadItem/UploadItem.vue.d.ts +11 -2
- package/es/components/src/business/uploadItem/index.d.ts +25 -6
- package/es/components/src/business/uploadItem/uploadItem.d.ts +4 -0
- package/es/components/src/business/uploadPro/UploadPro.vue.d.ts +11 -2
- package/es/components/src/business/uploadPro/UploadPro.vue.mjs +1 -1
- package/es/components/src/business/uploadPro/UploadPro.vue2.mjs +2 -1
- package/es/components/src/business/uploadPro/UploadPro.vue2.mjs.map +1 -1
- package/es/components/src/business/uploadPro/index.d.ts +25 -6
- package/es/components/src/business/uploadPro/uploadPro.d.ts +5 -0
- package/es/components/src/business/uploadPro/uploadPro.mjs +5 -0
- package/es/components/src/business/uploadPro/uploadPro.mjs.map +1 -1
- package/es/components/src/composite/fileComponent/FileComponent.vue.d.ts +1 -1
- package/es/components/src/composite/fileComponent/index.d.ts +3 -3
- package/es/components/src/composite/fileList2/FileList.vue.d.ts +1 -1
- package/es/components/src/composite/fileList2/index.d.ts +3 -3
- package/es/components/src/composite/importDialog/ImportDialog.vue.d.ts +1 -1
- package/es/components/src/composite/importDialog/index.d.ts +3 -3
- package/es/components/src/composite/previewFile/PreviewFile.vue.d.ts +1 -1
- package/es/components/src/composite/previewFile/index.d.ts +1 -1
- package/es/components/src/composite/searchForm/searchFormItems/input/SearchFormInput.vue.d.ts +4 -4
- package/es/components/src/composite/searchForm/searchFormItems/input/index.d.ts +4 -4
- package/es/components/src/composite/tableCustom/TableCustom.vue.d.ts +1 -1
- package/es/components/src/composite/tableCustom/index.d.ts +3 -3
- package/es/components/src/composite/tablePro/TablePro.vue.d.ts +1 -1
- package/es/components/src/composite/tablePro/index.d.ts +3 -3
- package/es/components/src/composite/tablePro/tableColumnPro/TableColumnPro.vue.d.ts +1 -1
- package/es/components/src/composite/tablePro/tableColumnPro/index.d.ts +3 -3
- package/es/components/src/composite/uploadFile/UploadFile.vue.d.ts +12 -3
- package/es/components/src/composite/uploadFile/index.d.ts +28 -9
- package/es/components/src/composite/uploadFile/uploadFile.d.ts +4 -0
- 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/useUploadFile/index.d.ts +2 -0
- package/es/hooks/base/useUploadFile/index.mjs +2 -1
- package/es/hooks/base/useUploadFile/index.mjs.map +1 -1
- package/es/index.css +97 -97
- package/lib/api/resource/interface/apiTypes/Address.d.ts +9 -0
- package/lib/api/resource/interface/apiTypes/Address.js +3 -0
- package/lib/api/resource/interface/apiTypes/Address.js.map +1 -0
- package/lib/api/resource/interface/apiTypes/AudioStream.d.ts +19 -0
- package/lib/api/resource/interface/apiTypes/AudioStream.js +3 -0
- package/lib/api/resource/interface/apiTypes/AudioStream.js.map +1 -0
- package/lib/api/resource/interface/apiTypes/GenerateUploadUrlRequest.d.ts +3 -1
- package/lib/api/resource/interface/apiTypes/ImageMetadata.d.ts +24 -0
- package/lib/api/resource/interface/apiTypes/ImageMetadata.js +3 -0
- package/lib/api/resource/interface/apiTypes/ImageMetadata.js.map +1 -0
- package/lib/api/resource/interface/apiTypes/MediaInfo.d.ts +27 -0
- package/lib/api/resource/interface/apiTypes/MediaInfo.js +3 -0
- package/lib/api/resource/interface/apiTypes/MediaInfo.js.map +1 -0
- package/lib/api/resource/interface/apiTypes/RResourceAttrDto.d.ts +10 -0
- package/lib/api/resource/interface/apiTypes/RResourceAttrDto.js +3 -0
- package/lib/api/resource/interface/apiTypes/RResourceAttrDto.js.map +1 -0
- package/lib/api/resource/interface/apiTypes/RResourceAttrUrlResponse.d.ts +10 -0
- package/lib/api/resource/interface/apiTypes/RResourceAttrUrlResponse.js +3 -0
- package/lib/api/resource/interface/apiTypes/RResourceAttrUrlResponse.js.map +1 -0
- package/lib/api/resource/interface/apiTypes/ResourceAttrDto.d.ts +5 -0
- package/lib/api/resource/interface/apiTypes/ResourceAttrDto.js +3 -0
- package/lib/api/resource/interface/apiTypes/ResourceAttrDto.js.map +1 -0
- package/lib/api/resource/interface/apiTypes/ResourceAttrUrlResponse.d.ts +4 -0
- package/lib/api/resource/interface/apiTypes/ResourceAttrUrlResponse.js +3 -0
- package/lib/api/resource/interface/apiTypes/ResourceAttrUrlResponse.js.map +1 -0
- package/lib/api/resource/interface/apiTypes/ResourceUploadNoticeRequest.d.ts +4 -0
- package/lib/api/resource/interface/apiTypes/ResourceUploadNoticeRequest.js +3 -0
- package/lib/api/resource/interface/apiTypes/ResourceUploadNoticeRequest.js.map +1 -0
- package/lib/api/resource/interface/apiTypes/Subtitle.d.ts +14 -0
- package/lib/api/resource/interface/apiTypes/Subtitle.js +3 -0
- package/lib/api/resource/interface/apiTypes/Subtitle.js.map +1 -0
- package/lib/api/resource/interface/apiTypes/VideoStream.d.ts +30 -0
- package/lib/api/resource/interface/apiTypes/VideoStream.js +3 -0
- package/lib/api/resource/interface/apiTypes/VideoStream.js.map +1 -0
- package/lib/api/resource/interface/index.d.ts +25 -14
- package/lib/api/resource/interface/index.js +25 -14
- package/lib/api/resource/interface/index.js.map +1 -1
- package/lib/components/src/base/image/Image.vue.d.ts +32 -5
- package/lib/components/src/base/image/Image.vue2.js +107 -3
- package/lib/components/src/base/image/Image.vue2.js.map +1 -1
- package/lib/components/src/base/image/image.d.ts +26 -15
- package/lib/components/src/base/image/image.js +11 -1
- package/lib/components/src/base/image/image.js.map +1 -1
- package/lib/components/src/base/image/index.d.ts +57 -10
- package/lib/components/src/base/imageViewer/ImageViewer.vue.d.ts +36 -5
- package/lib/components/src/base/imageViewer/ImageViewer.vue2.js +110 -4
- package/lib/components/src/base/imageViewer/ImageViewer.vue2.js.map +1 -1
- package/lib/components/src/base/imageViewer/imageViewer.d.ts +22 -11
- package/lib/components/src/base/imageViewer/imageViewer.js +11 -1
- package/lib/components/src/base/imageViewer/imageViewer.js.map +1 -1
- package/lib/components/src/base/imageViewer/index.d.ts +355 -89
- package/lib/components/src/base/input/Input.vue.d.ts +4 -4
- package/lib/components/src/base/input/index.d.ts +8 -8
- package/lib/components/src/base/popconfirm/Popconfirm.vue.d.ts +2 -2
- package/lib/components/src/base/popconfirm/index.d.ts +6 -6
- package/lib/components/src/base/upload/Upload.vue.d.ts +1 -1
- package/lib/components/src/base/upload/index.d.ts +3 -3
- package/lib/components/src/business/uploadItem/UploadItem.vue.d.ts +11 -2
- package/lib/components/src/business/uploadItem/index.d.ts +25 -6
- package/lib/components/src/business/uploadItem/uploadItem.d.ts +4 -0
- package/lib/components/src/business/uploadPro/UploadPro.vue.d.ts +11 -2
- package/lib/components/src/business/uploadPro/UploadPro.vue.js +1 -1
- package/lib/components/src/business/uploadPro/UploadPro.vue2.js +2 -1
- package/lib/components/src/business/uploadPro/UploadPro.vue2.js.map +1 -1
- package/lib/components/src/business/uploadPro/index.d.ts +25 -6
- package/lib/components/src/business/uploadPro/uploadPro.d.ts +5 -0
- package/lib/components/src/business/uploadPro/uploadPro.js +5 -0
- package/lib/components/src/business/uploadPro/uploadPro.js.map +1 -1
- package/lib/components/src/composite/fileComponent/FileComponent.vue.d.ts +1 -1
- package/lib/components/src/composite/fileComponent/index.d.ts +3 -3
- package/lib/components/src/composite/fileList2/FileList.vue.d.ts +1 -1
- package/lib/components/src/composite/fileList2/index.d.ts +3 -3
- package/lib/components/src/composite/importDialog/ImportDialog.vue.d.ts +1 -1
- package/lib/components/src/composite/importDialog/index.d.ts +3 -3
- package/lib/components/src/composite/previewFile/PreviewFile.vue.d.ts +1 -1
- package/lib/components/src/composite/previewFile/index.d.ts +1 -1
- package/lib/components/src/composite/searchForm/searchFormItems/input/SearchFormInput.vue.d.ts +4 -4
- package/lib/components/src/composite/searchForm/searchFormItems/input/index.d.ts +4 -4
- package/lib/components/src/composite/tableCustom/TableCustom.vue.d.ts +1 -1
- package/lib/components/src/composite/tableCustom/index.d.ts +3 -3
- package/lib/components/src/composite/tablePro/TablePro.vue.d.ts +1 -1
- package/lib/components/src/composite/tablePro/index.d.ts +3 -3
- package/lib/components/src/composite/tablePro/tableColumnPro/TableColumnPro.vue.d.ts +1 -1
- package/lib/components/src/composite/tablePro/tableColumnPro/index.d.ts +3 -3
- package/lib/components/src/composite/uploadFile/UploadFile.vue.d.ts +12 -3
- package/lib/components/src/composite/uploadFile/index.d.ts +28 -9
- package/lib/components/src/composite/uploadFile/uploadFile.d.ts +4 -0
- 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/useUploadFile/index.d.ts +2 -0
- package/lib/hooks/base/useUploadFile/index.js +2 -1
- package/lib/hooks/base/useUploadFile/index.js.map +1 -1
- package/lib/index.css +97 -97
- package/package.json +1 -1
|
@@ -1,12 +1,30 @@
|
|
|
1
|
-
declare var __VLS_7: {}, __VLS_9: {}, __VLS_11: {}
|
|
1
|
+
declare var __VLS_7: {}, __VLS_9: {}, __VLS_11: {}, __VLS_13: {
|
|
2
|
+
download: (urlOrIndex: string | number, filename?: string) => Promise<void>;
|
|
3
|
+
actions: (action: import("element-plus").ImageViewerAction, options?: {} | undefined) => void;
|
|
4
|
+
prev: () => void;
|
|
5
|
+
next: () => void;
|
|
6
|
+
reset: () => void;
|
|
7
|
+
activeIndex: number;
|
|
8
|
+
setActiveItem: (index: number) => void;
|
|
9
|
+
};
|
|
2
10
|
type __VLS_Slots = {} & {
|
|
3
11
|
placeholder?: (props: typeof __VLS_7) => any;
|
|
4
12
|
} & {
|
|
5
13
|
error?: (props: typeof __VLS_9) => any;
|
|
6
14
|
} & {
|
|
7
15
|
viewer?: (props: typeof __VLS_11) => any;
|
|
16
|
+
} & {
|
|
17
|
+
toolbar?: (props: typeof __VLS_13) => any;
|
|
8
18
|
};
|
|
9
19
|
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
20
|
+
showProgress: {
|
|
21
|
+
type: BooleanConstructor;
|
|
22
|
+
default: boolean;
|
|
23
|
+
};
|
|
24
|
+
downloadMode: {
|
|
25
|
+
type: import("vue").PropType<import("./image").GmImageDownloadMode>;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
10
28
|
hideOnClickModal: BooleanConstructor;
|
|
11
29
|
src: {
|
|
12
30
|
readonly type: import("vue").PropType<string>;
|
|
@@ -108,20 +126,29 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
108
126
|
} & {
|
|
109
127
|
readonly default: 7;
|
|
110
128
|
};
|
|
111
|
-
showProgress: BooleanConstructor;
|
|
112
129
|
crossorigin: {
|
|
113
130
|
readonly type: import("vue").PropType<"" | "anonymous" | "use-credentials">;
|
|
114
131
|
readonly required: false;
|
|
115
132
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
116
133
|
__epPropKey: true;
|
|
117
134
|
};
|
|
118
|
-
}, {
|
|
135
|
+
}, {
|
|
136
|
+
download: (urlOrIndex: string | number, filename?: string | undefined) => Promise<void>;
|
|
137
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
119
138
|
error: (evt: Event) => void;
|
|
120
139
|
show: () => void;
|
|
121
140
|
switch: (val: number) => void;
|
|
122
141
|
close: () => void;
|
|
123
142
|
load: (evt: Event) => void;
|
|
124
143
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
144
|
+
showProgress: {
|
|
145
|
+
type: BooleanConstructor;
|
|
146
|
+
default: boolean;
|
|
147
|
+
};
|
|
148
|
+
downloadMode: {
|
|
149
|
+
type: import("vue").PropType<import("./image").GmImageDownloadMode>;
|
|
150
|
+
default: string;
|
|
151
|
+
};
|
|
125
152
|
hideOnClickModal: BooleanConstructor;
|
|
126
153
|
src: {
|
|
127
154
|
readonly type: import("vue").PropType<string>;
|
|
@@ -223,7 +250,6 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
223
250
|
} & {
|
|
224
251
|
readonly default: 7;
|
|
225
252
|
};
|
|
226
|
-
showProgress: BooleanConstructor;
|
|
227
253
|
crossorigin: {
|
|
228
254
|
readonly type: import("vue").PropType<"" | "anonymous" | "use-credentials">;
|
|
229
255
|
readonly required: false;
|
|
@@ -243,6 +269,8 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
243
269
|
fit: "" | "fill" | "none" | "contain" | "cover" | "scale-down";
|
|
244
270
|
initialIndex: number;
|
|
245
271
|
closeOnPressEscape: boolean;
|
|
272
|
+
showProgress: boolean;
|
|
273
|
+
downloadMode: import("./image").GmImageDownloadMode;
|
|
246
274
|
hideOnClickModal: boolean;
|
|
247
275
|
lazy: boolean;
|
|
248
276
|
previewSrcList: string[];
|
|
@@ -250,7 +278,6 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
250
278
|
zoomRate: number;
|
|
251
279
|
minScale: number;
|
|
252
280
|
maxScale: number;
|
|
253
|
-
showProgress: boolean;
|
|
254
281
|
}, {}>, __VLS_Slots>;
|
|
255
282
|
export default _default;
|
|
256
283
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { defineComponent, useSlots, resolveComponent, createBlock, openBlock, mergeProps, toHandlers, unref, createSlots, withCtx, renderSlot } from 'vue';
|
|
1
|
+
import { defineComponent, useSlots, computed, resolveComponent, createBlock, openBlock, mergeProps, toHandlers, unref, createSlots, withCtx, renderSlot, createElementBlock, normalizeProps, Fragment, createCommentVNode, createVNode } from 'vue';
|
|
2
|
+
import { imageEmits, ElIcon } from 'element-plus';
|
|
2
3
|
import '../../../../utils/index.mjs';
|
|
3
|
-
import
|
|
4
|
+
import '../../../../hooks/index.mjs';
|
|
4
5
|
import { imageEmits as imageEmits$1, imageProps } from './image.mjs';
|
|
6
|
+
import { ArrowLeftBold, ArrowRightBold, ZoomOut, ZoomIn, RefreshLeft, RefreshRight, Download } from '@element-plus/icons-vue';
|
|
5
7
|
import { getGmEvent } from '../../../../utils/src/elementPlus/event.mjs';
|
|
8
|
+
import { useDownload, getUrlFilename } from '../../../../hooks/base/useDownload/index.mjs';
|
|
6
9
|
|
|
7
10
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
11
|
...{
|
|
@@ -11,17 +14,118 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
11
14
|
__name: "Image",
|
|
12
15
|
props: imageProps,
|
|
13
16
|
emits: imageEmits$1,
|
|
14
|
-
setup(__props, { emit: __emit }) {
|
|
17
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
15
18
|
const slots = useSlots();
|
|
16
19
|
const props = __props;
|
|
17
20
|
const emit = __emit;
|
|
18
21
|
const elEvents = getGmEvent(imageEmits, emit);
|
|
22
|
+
const { downloadByUrl } = useDownload();
|
|
23
|
+
const bindProps = computed(() => ({
|
|
24
|
+
...props,
|
|
25
|
+
showProgress: props.showProgress
|
|
26
|
+
}));
|
|
27
|
+
const download = async (urlOrIndex, filename) => {
|
|
28
|
+
let url;
|
|
29
|
+
if (typeof urlOrIndex === "number") {
|
|
30
|
+
const list = props.previewSrcList;
|
|
31
|
+
url = list?.[urlOrIndex] || "";
|
|
32
|
+
} else {
|
|
33
|
+
url = urlOrIndex;
|
|
34
|
+
}
|
|
35
|
+
if (!url) {
|
|
36
|
+
console.warn("[GmImage] download: \u65E0\u6548\u7684 URL");
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
const finalFilename = filename || getUrlFilename(url);
|
|
40
|
+
if (props.downloadMode === "link") {
|
|
41
|
+
window.open(url, "_blank");
|
|
42
|
+
} else {
|
|
43
|
+
await downloadByUrl(url, { filename: finalFilename });
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
__expose({
|
|
47
|
+
download
|
|
48
|
+
});
|
|
19
49
|
return (_ctx, _cache) => {
|
|
20
50
|
const _component_el_image = resolveComponent("el-image");
|
|
21
51
|
return openBlock(), createBlock(
|
|
22
52
|
_component_el_image,
|
|
23
|
-
mergeProps({ ref: "elRef" },
|
|
53
|
+
mergeProps({ ref: "elRef" }, bindProps.value, toHandlers(unref(elEvents))),
|
|
24
54
|
createSlots({
|
|
55
|
+
toolbar: withCtx((toolbarProps) => [
|
|
56
|
+
unref(slots).toolbar ? renderSlot(_ctx.$slots, "toolbar", normalizeProps(mergeProps({ key: 0 }, { ...toolbarProps, download }))) : (openBlock(), createElementBlock(
|
|
57
|
+
Fragment,
|
|
58
|
+
{ key: 1 },
|
|
59
|
+
[
|
|
60
|
+
createCommentVNode(" \u9ED8\u8BA4\u5DE5\u5177\u680F\uFF1A\u5F53\u7528\u6237\u672A\u4F20 toolbar slot \u65F6\u663E\u793A "),
|
|
61
|
+
createVNode(unref(ElIcon), {
|
|
62
|
+
onClick: toolbarProps.prev
|
|
63
|
+
}, {
|
|
64
|
+
default: withCtx(() => [
|
|
65
|
+
createVNode(unref(ArrowLeftBold))
|
|
66
|
+
]),
|
|
67
|
+
_: 2
|
|
68
|
+
/* DYNAMIC */
|
|
69
|
+
}, 1032, ["onClick"]),
|
|
70
|
+
createVNode(unref(ElIcon), {
|
|
71
|
+
onClick: toolbarProps.next
|
|
72
|
+
}, {
|
|
73
|
+
default: withCtx(() => [
|
|
74
|
+
createVNode(unref(ArrowRightBold))
|
|
75
|
+
]),
|
|
76
|
+
_: 2
|
|
77
|
+
/* DYNAMIC */
|
|
78
|
+
}, 1032, ["onClick"]),
|
|
79
|
+
createVNode(unref(ElIcon), {
|
|
80
|
+
onClick: ($event) => toolbarProps.actions("zoomOut")
|
|
81
|
+
}, {
|
|
82
|
+
default: withCtx(() => [
|
|
83
|
+
createVNode(unref(ZoomOut))
|
|
84
|
+
]),
|
|
85
|
+
_: 2
|
|
86
|
+
/* DYNAMIC */
|
|
87
|
+
}, 1032, ["onClick"]),
|
|
88
|
+
createVNode(unref(ElIcon), {
|
|
89
|
+
onClick: ($event) => toolbarProps.actions("zoomIn")
|
|
90
|
+
}, {
|
|
91
|
+
default: withCtx(() => [
|
|
92
|
+
createVNode(unref(ZoomIn))
|
|
93
|
+
]),
|
|
94
|
+
_: 2
|
|
95
|
+
/* DYNAMIC */
|
|
96
|
+
}, 1032, ["onClick"]),
|
|
97
|
+
createVNode(unref(ElIcon), {
|
|
98
|
+
onClick: ($event) => toolbarProps.actions("anticlockwise")
|
|
99
|
+
}, {
|
|
100
|
+
default: withCtx(() => [
|
|
101
|
+
createVNode(unref(RefreshLeft))
|
|
102
|
+
]),
|
|
103
|
+
_: 2
|
|
104
|
+
/* DYNAMIC */
|
|
105
|
+
}, 1032, ["onClick"]),
|
|
106
|
+
createVNode(unref(ElIcon), {
|
|
107
|
+
onClick: ($event) => toolbarProps.actions("clockwise")
|
|
108
|
+
}, {
|
|
109
|
+
default: withCtx(() => [
|
|
110
|
+
createVNode(unref(RefreshRight))
|
|
111
|
+
]),
|
|
112
|
+
_: 2
|
|
113
|
+
/* DYNAMIC */
|
|
114
|
+
}, 1032, ["onClick"]),
|
|
115
|
+
createVNode(unref(ElIcon), {
|
|
116
|
+
onClick: ($event) => download(toolbarProps.activeIndex)
|
|
117
|
+
}, {
|
|
118
|
+
default: withCtx(() => [
|
|
119
|
+
createVNode(unref(Download))
|
|
120
|
+
]),
|
|
121
|
+
_: 2
|
|
122
|
+
/* DYNAMIC */
|
|
123
|
+
}, 1032, ["onClick"])
|
|
124
|
+
],
|
|
125
|
+
64
|
|
126
|
+
/* STABLE_FRAGMENT */
|
|
127
|
+
))
|
|
128
|
+
]),
|
|
25
129
|
_: 2
|
|
26
130
|
/* DYNAMIC */
|
|
27
131
|
}, [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Image.vue2.mjs","sources":["../../../../../../../packages/components/src/base/image/Image.vue"],"sourcesContent":["<template>\n <el-image ref=\"elRef\" v-bind=\"
|
|
1
|
+
{"version":3,"file":"Image.vue2.mjs","sources":["../../../../../../../packages/components/src/base/image/Image.vue"],"sourcesContent":["<template>\n <el-image ref=\"elRef\" v-bind=\"bindProps\" v-on=\"elEvents\">\n <template v-if=\"slots.placeholder\" #placeholder>\n <slot name=\"placeholder\" />\n </template>\n <template v-if=\"slots.error\" #error>\n <slot name=\"error\" />\n </template>\n <template v-if=\"slots.viewer\" #viewer>\n <slot name=\"viewer\" />\n </template>\n <template #toolbar=\"toolbarProps\">\n <slot v-if=\"slots.toolbar\" name=\"toolbar\" v-bind=\"{ ...toolbarProps, download }\" />\n <!-- 默认工具栏:当用户未传 toolbar slot 时显示 -->\n <template v-else>\n <el-icon @click=\"toolbarProps.prev\"><ArrowLeftBold /></el-icon>\n <el-icon @click=\"toolbarProps.next\"><ArrowRightBold /></el-icon>\n <el-icon @click=\"toolbarProps.actions('zoomOut')\"><ZoomOut /></el-icon>\n <el-icon @click=\"toolbarProps.actions('zoomIn')\"><ZoomIn /></el-icon>\n <el-icon @click=\"toolbarProps.actions('anticlockwise')\"><RefreshLeft /></el-icon>\n <el-icon @click=\"toolbarProps.actions('clockwise')\"><RefreshRight /></el-icon>\n <el-icon @click=\"download(toolbarProps.activeIndex)\"><Download /></el-icon>\n </template>\n </template>\n </el-image>\n</template>\n<script lang=\"ts\" setup>\nimport { computed, useSlots } from 'vue';\nimport { ElIcon } from 'element-plus';\nimport { getGmEvent } from '@giime/utils';\nimport { imageEmits as elImageEmits } from 'element-plus';\nimport { useDownload, getUrlFilename } from '@giime/hooks';\nimport { imageEmits, imageProps } from './image';\nimport { ArrowLeftBold, ArrowRightBold, ZoomOut, ZoomIn, RefreshLeft, RefreshRight, Download } from '@element-plus/icons-vue';\n// import type { ImageInstance } from 'element-plus';\n\ndefineOptions({\n name: 'GmImage',\n});\nconst slots = useSlots();\nconst props = defineProps(imageProps);\nconst emit = defineEmits(imageEmits);\n// 重发el的事件\nconst elEvents = getGmEvent(elImageEmits, emit);\n\nconst { downloadByUrl } = useDownload();\n\n// 合并 showProgress 到 el-image 的 props\nconst bindProps = computed(() => ({\n ...props,\n showProgress: props.showProgress,\n}));\n\n/**\n * 下载图片\n * @param urlOrIndex 图片 URL 或在 previewSrcList 中的索引\n * @param filename 自定义文件名(可选)\n */\nconst download = async (urlOrIndex: string | number, filename?: string) => {\n let url: string;\n\n if (typeof urlOrIndex === 'number') {\n // 通过索引获取 URL\n const list = props.previewSrcList as string[];\n url = list?.[urlOrIndex] || '';\n } else {\n url = urlOrIndex;\n }\n\n if (!url) {\n console.warn('[GmImage] download: 无效的 URL');\n return;\n }\n\n const finalFilename = filename || getUrlFilename(url);\n\n if (props.downloadMode === 'link') {\n // 使用 window.open 直接打开下载(无需 fetch 权限)\n window.open(url, '_blank');\n } else {\n // 使用 downloadByUrl(blob 模式,带进度提示)\n await downloadByUrl(url, { filename: finalFilename });\n }\n};\n\n// const elRef = ref<ImageInstance>();\ndefineExpose({\n download,\n});\n</script>\n"],"names":["elImageEmits"],"mappings":";;;;;;;;;;;;;;;;;AAuCA,IAAA,MAAM,QAAQ,QAAA,EAAS;AACvB,IAAA,MAAM,KAAA,GAAQ,OAAA;AACd,IAAA,MAAM,IAAA,GAAO,MAAA;AAEb,IAAA,MAAM,QAAA,GAAW,UAAA,CAAWA,UAAA,EAAc,IAAI,CAAA;AAE9C,IAAA,MAAM,EAAE,aAAA,EAAc,GAAI,WAAA,EAAY;AAGtC,IAAA,MAAM,SAAA,GAAY,SAAS,OAAO;AAAA,MAChC,GAAG,KAAA;AAAA,MACH,cAAc,KAAA,CAAM;AAAA,KACtB,CAAE,CAAA;AAOF,IAAA,MAAM,QAAA,GAAW,OAAO,UAAA,EAA6B,QAAA,KAAsB;AACzE,MAAA,IAAI,GAAA;AAEJ,MAAA,IAAI,OAAO,eAAe,QAAA,EAAU;AAElC,QAAA,MAAM,OAAO,KAAA,CAAM,cAAA;AACnB,QAAA,GAAA,GAAM,IAAA,GAAO,UAAU,CAAA,IAAK,EAAA;AAAA,MAC9B,CAAA,MAAO;AACL,QAAA,GAAA,GAAM,UAAA;AAAA,MACR;AAEA,MAAA,IAAI,CAAC,GAAA,EAAK;AACR,QAAA,OAAA,CAAQ,KAAK,4CAA6B,CAAA;AAC1C,QAAA;AAAA,MACF;AAEA,MAAA,MAAM,aAAA,GAAgB,QAAA,IAAY,cAAA,CAAe,GAAG,CAAA;AAEpD,MAAA,IAAI,KAAA,CAAM,iBAAiB,MAAA,EAAQ;AAEjC,QAAA,MAAA,CAAO,IAAA,CAAK,KAAK,QAAQ,CAAA;AAAA,MAC3B,CAAA,MAAO;AAEL,QAAA,MAAM,aAAA,CAAc,GAAA,EAAK,EAAE,QAAA,EAAU,eAAe,CAAA;AAAA,MACtD;AAAA,IACF,CAAA;AAGA,IAAA,QAAA,CAAa;AAAA,MACX;AAAA,KACD,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,7 +1,19 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
export type GmImageDownloadMode = 'blob' | 'link';
|
|
1
3
|
export declare const imageProps: {
|
|
4
|
+
/** 是否显示加载进度,默认 true */
|
|
5
|
+
showProgress: {
|
|
6
|
+
type: BooleanConstructor;
|
|
7
|
+
default: boolean;
|
|
8
|
+
};
|
|
9
|
+
/** 下载模式:blob 使用 downloadByUrl(带进度),link 使用 window.open(无需权限) */
|
|
10
|
+
downloadMode: {
|
|
11
|
+
type: PropType<GmImageDownloadMode>;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
2
14
|
hideOnClickModal: BooleanConstructor;
|
|
3
15
|
src: {
|
|
4
|
-
readonly type:
|
|
16
|
+
readonly type: PropType<string>;
|
|
5
17
|
readonly required: false;
|
|
6
18
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
7
19
|
__epPropKey: true;
|
|
@@ -9,7 +21,7 @@ export declare const imageProps: {
|
|
|
9
21
|
readonly default: "";
|
|
10
22
|
};
|
|
11
23
|
fit: {
|
|
12
|
-
readonly type:
|
|
24
|
+
readonly type: PropType<"" | "fill" | "none" | "contain" | "cover" | "scale-down">;
|
|
13
25
|
readonly required: false;
|
|
14
26
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
15
27
|
__epPropKey: true;
|
|
@@ -17,20 +29,20 @@ export declare const imageProps: {
|
|
|
17
29
|
readonly default: "";
|
|
18
30
|
};
|
|
19
31
|
loading: {
|
|
20
|
-
readonly type:
|
|
32
|
+
readonly type: PropType<"lazy" | "eager">;
|
|
21
33
|
readonly required: false;
|
|
22
34
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
23
35
|
__epPropKey: true;
|
|
24
36
|
};
|
|
25
37
|
lazy: BooleanConstructor;
|
|
26
38
|
scrollContainer: {
|
|
27
|
-
readonly type:
|
|
39
|
+
readonly type: PropType<string | HTMLElement | undefined>;
|
|
28
40
|
readonly required: false;
|
|
29
41
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
30
42
|
__epPropKey: true;
|
|
31
43
|
};
|
|
32
44
|
previewSrcList: {
|
|
33
|
-
readonly type:
|
|
45
|
+
readonly type: PropType<string[]>;
|
|
34
46
|
readonly required: false;
|
|
35
47
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
36
48
|
__epPropKey: true;
|
|
@@ -39,13 +51,13 @@ export declare const imageProps: {
|
|
|
39
51
|
};
|
|
40
52
|
previewTeleported: BooleanConstructor;
|
|
41
53
|
zIndex: {
|
|
42
|
-
readonly type:
|
|
54
|
+
readonly type: PropType<number>;
|
|
43
55
|
readonly required: false;
|
|
44
56
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
45
57
|
__epPropKey: true;
|
|
46
58
|
};
|
|
47
59
|
initialIndex: {
|
|
48
|
-
readonly type:
|
|
60
|
+
readonly type: PropType<number>;
|
|
49
61
|
readonly required: false;
|
|
50
62
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
51
63
|
__epPropKey: true;
|
|
@@ -53,7 +65,7 @@ export declare const imageProps: {
|
|
|
53
65
|
readonly default: 0;
|
|
54
66
|
};
|
|
55
67
|
infinite: {
|
|
56
|
-
readonly type:
|
|
68
|
+
readonly type: PropType<boolean>;
|
|
57
69
|
readonly required: false;
|
|
58
70
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
59
71
|
__epPropKey: true;
|
|
@@ -61,7 +73,7 @@ export declare const imageProps: {
|
|
|
61
73
|
readonly default: true;
|
|
62
74
|
};
|
|
63
75
|
closeOnPressEscape: {
|
|
64
|
-
readonly type:
|
|
76
|
+
readonly type: PropType<boolean>;
|
|
65
77
|
readonly required: false;
|
|
66
78
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
67
79
|
__epPropKey: true;
|
|
@@ -69,7 +81,7 @@ export declare const imageProps: {
|
|
|
69
81
|
readonly default: true;
|
|
70
82
|
};
|
|
71
83
|
zoomRate: {
|
|
72
|
-
readonly type:
|
|
84
|
+
readonly type: PropType<number>;
|
|
73
85
|
readonly required: false;
|
|
74
86
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
75
87
|
__epPropKey: true;
|
|
@@ -77,7 +89,7 @@ export declare const imageProps: {
|
|
|
77
89
|
readonly default: 1.2;
|
|
78
90
|
};
|
|
79
91
|
scale: {
|
|
80
|
-
readonly type:
|
|
92
|
+
readonly type: PropType<number>;
|
|
81
93
|
readonly required: false;
|
|
82
94
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
83
95
|
__epPropKey: true;
|
|
@@ -85,7 +97,7 @@ export declare const imageProps: {
|
|
|
85
97
|
readonly default: 1;
|
|
86
98
|
};
|
|
87
99
|
minScale: {
|
|
88
|
-
readonly type:
|
|
100
|
+
readonly type: PropType<number>;
|
|
89
101
|
readonly required: false;
|
|
90
102
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
91
103
|
__epPropKey: true;
|
|
@@ -93,16 +105,15 @@ export declare const imageProps: {
|
|
|
93
105
|
readonly default: 0.2;
|
|
94
106
|
};
|
|
95
107
|
maxScale: {
|
|
96
|
-
readonly type:
|
|
108
|
+
readonly type: PropType<number>;
|
|
97
109
|
readonly required: false;
|
|
98
110
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
99
111
|
__epPropKey: true;
|
|
100
112
|
} & {
|
|
101
113
|
readonly default: 7;
|
|
102
114
|
};
|
|
103
|
-
showProgress: BooleanConstructor;
|
|
104
115
|
crossorigin: {
|
|
105
|
-
readonly type:
|
|
116
|
+
readonly type: PropType<"" | "anonymous" | "use-credentials">;
|
|
106
117
|
readonly required: false;
|
|
107
118
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
108
119
|
__epPropKey: true;
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import { imageProps as imageProps$1, imageEmits as imageEmits$1 } from 'element-plus';
|
|
2
2
|
|
|
3
3
|
const imageProps = {
|
|
4
|
-
...imageProps$1
|
|
4
|
+
...imageProps$1,
|
|
5
|
+
/** 是否显示加载进度,默认 true */
|
|
6
|
+
showProgress: {
|
|
7
|
+
type: Boolean,
|
|
8
|
+
default: true
|
|
9
|
+
},
|
|
10
|
+
/** 下载模式:blob 使用 downloadByUrl(带进度),link 使用 window.open(无需权限) */
|
|
11
|
+
downloadMode: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: "blob"
|
|
14
|
+
}
|
|
5
15
|
};
|
|
6
16
|
const imageEmits = {
|
|
7
17
|
...imageEmits$1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.mjs","sources":["../../../../../../../packages/components/src/base/image/image.ts"],"sourcesContent":["import { imageEmits as elImageEmits, imageProps as elImageProps } from 'element-plus';\
|
|
1
|
+
{"version":3,"file":"image.mjs","sources":["../../../../../../../packages/components/src/base/image/image.ts"],"sourcesContent":["import { imageEmits as elImageEmits, imageProps as elImageProps } from 'element-plus';\nimport type { PropType } from 'vue';\n\nexport type GmImageDownloadMode = 'blob' | 'link';\n\nexport const imageProps = {\n ...elImageProps,\n /** 是否显示加载进度,默认 true */\n showProgress: {\n type: Boolean,\n default: true,\n },\n /** 下载模式:blob 使用 downloadByUrl(带进度),link 使用 window.open(无需权限) */\n downloadMode: {\n type: String as PropType<GmImageDownloadMode>,\n default: 'blob',\n },\n};\n\nexport const imageEmits = {\n ...elImageEmits,\n // 自定义事件\n // submit: (value: any) => !!value,\n};\n"],"names":["elImageProps","elImageEmits"],"mappings":";;AAKO,MAAM,UAAA,GAAa;AAAA,EACxB,GAAGA,YAAA;AAAA;AAAA,EAEH,YAAA,EAAc;AAAA,IACZ,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA,EAEA,YAAA,EAAc;AAAA,IACZ,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA;AAEb;AAEO,MAAM,UAAA,GAAa;AAAA,EACxB,GAAGC;AAAA;AAAA;AAGL;;;;"}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import Image from './Image.vue';
|
|
2
2
|
export declare const GmImage: import("../../../../utils").SFCWithInstall<{
|
|
3
3
|
new (...args: any[]): import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<{
|
|
4
|
+
showProgress: {
|
|
5
|
+
type: BooleanConstructor;
|
|
6
|
+
default: boolean;
|
|
7
|
+
};
|
|
8
|
+
downloadMode: {
|
|
9
|
+
type: import("vue").PropType<import("./image").GmImageDownloadMode>;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
4
12
|
hideOnClickModal: BooleanConstructor;
|
|
5
13
|
src: {
|
|
6
14
|
readonly type: import("vue").PropType<string>;
|
|
@@ -102,7 +110,6 @@ export declare const GmImage: import("../../../../utils").SFCWithInstall<{
|
|
|
102
110
|
} & {
|
|
103
111
|
readonly default: 7;
|
|
104
112
|
};
|
|
105
|
-
showProgress: BooleanConstructor;
|
|
106
113
|
crossorigin: {
|
|
107
114
|
readonly type: import("vue").PropType<"" | "anonymous" | "use-credentials">;
|
|
108
115
|
readonly required: false;
|
|
@@ -115,13 +122,23 @@ export declare const GmImage: import("../../../../utils").SFCWithInstall<{
|
|
|
115
122
|
onLoad?: ((evt: Event) => any) | undefined;
|
|
116
123
|
onShow?: (() => any) | undefined;
|
|
117
124
|
onSwitch?: ((val: number) => any) | undefined;
|
|
118
|
-
}, {
|
|
125
|
+
}, {
|
|
126
|
+
download: (urlOrIndex: string | number, filename?: string | undefined) => Promise<void>;
|
|
127
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
119
128
|
error: (evt: Event) => void;
|
|
120
129
|
show: () => void;
|
|
121
130
|
switch: (val: number) => void;
|
|
122
131
|
close: () => void;
|
|
123
132
|
load: (evt: Event) => void;
|
|
124
133
|
}, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
|
|
134
|
+
showProgress: {
|
|
135
|
+
type: BooleanConstructor;
|
|
136
|
+
default: boolean;
|
|
137
|
+
};
|
|
138
|
+
downloadMode: {
|
|
139
|
+
type: import("vue").PropType<import("./image").GmImageDownloadMode>;
|
|
140
|
+
default: string;
|
|
141
|
+
};
|
|
125
142
|
hideOnClickModal: BooleanConstructor;
|
|
126
143
|
src: {
|
|
127
144
|
readonly type: import("vue").PropType<string>;
|
|
@@ -223,7 +240,6 @@ export declare const GmImage: import("../../../../utils").SFCWithInstall<{
|
|
|
223
240
|
} & {
|
|
224
241
|
readonly default: 7;
|
|
225
242
|
};
|
|
226
|
-
showProgress: BooleanConstructor;
|
|
227
243
|
crossorigin: {
|
|
228
244
|
readonly type: import("vue").PropType<"" | "anonymous" | "use-credentials">;
|
|
229
245
|
readonly required: false;
|
|
@@ -243,6 +259,8 @@ export declare const GmImage: import("../../../../utils").SFCWithInstall<{
|
|
|
243
259
|
fit: "" | "fill" | "none" | "contain" | "cover" | "scale-down";
|
|
244
260
|
initialIndex: number;
|
|
245
261
|
closeOnPressEscape: boolean;
|
|
262
|
+
showProgress: boolean;
|
|
263
|
+
downloadMode: import("./image").GmImageDownloadMode;
|
|
246
264
|
hideOnClickModal: boolean;
|
|
247
265
|
lazy: boolean;
|
|
248
266
|
previewSrcList: string[];
|
|
@@ -250,7 +268,6 @@ export declare const GmImage: import("../../../../utils").SFCWithInstall<{
|
|
|
250
268
|
zoomRate: number;
|
|
251
269
|
minScale: number;
|
|
252
270
|
maxScale: number;
|
|
253
|
-
showProgress: boolean;
|
|
254
271
|
}, true, {}, {}, {
|
|
255
272
|
P: {};
|
|
256
273
|
B: {};
|
|
@@ -259,6 +276,14 @@ export declare const GmImage: import("../../../../utils").SFCWithInstall<{
|
|
|
259
276
|
M: {};
|
|
260
277
|
Defaults: {};
|
|
261
278
|
}, Readonly<import("vue").ExtractPropTypes<{
|
|
279
|
+
showProgress: {
|
|
280
|
+
type: BooleanConstructor;
|
|
281
|
+
default: boolean;
|
|
282
|
+
};
|
|
283
|
+
downloadMode: {
|
|
284
|
+
type: import("vue").PropType<import("./image").GmImageDownloadMode>;
|
|
285
|
+
default: string;
|
|
286
|
+
};
|
|
262
287
|
hideOnClickModal: BooleanConstructor;
|
|
263
288
|
src: {
|
|
264
289
|
readonly type: import("vue").PropType<string>;
|
|
@@ -360,7 +385,6 @@ export declare const GmImage: import("../../../../utils").SFCWithInstall<{
|
|
|
360
385
|
} & {
|
|
361
386
|
readonly default: 7;
|
|
362
387
|
};
|
|
363
|
-
showProgress: BooleanConstructor;
|
|
364
388
|
crossorigin: {
|
|
365
389
|
readonly type: import("vue").PropType<"" | "anonymous" | "use-credentials">;
|
|
366
390
|
readonly required: false;
|
|
@@ -373,13 +397,17 @@ export declare const GmImage: import("../../../../utils").SFCWithInstall<{
|
|
|
373
397
|
onLoad?: ((evt: Event) => any) | undefined;
|
|
374
398
|
onShow?: (() => any) | undefined;
|
|
375
399
|
onSwitch?: ((val: number) => any) | undefined;
|
|
376
|
-
}, {
|
|
400
|
+
}, {
|
|
401
|
+
download: (urlOrIndex: string | number, filename?: string | undefined) => Promise<void>;
|
|
402
|
+
}, {}, {}, {}, {
|
|
377
403
|
infinite: boolean;
|
|
378
404
|
scale: number;
|
|
379
405
|
src: string;
|
|
380
406
|
fit: "" | "fill" | "none" | "contain" | "cover" | "scale-down";
|
|
381
407
|
initialIndex: number;
|
|
382
408
|
closeOnPressEscape: boolean;
|
|
409
|
+
showProgress: boolean;
|
|
410
|
+
downloadMode: import("./image").GmImageDownloadMode;
|
|
383
411
|
hideOnClickModal: boolean;
|
|
384
412
|
lazy: boolean;
|
|
385
413
|
previewSrcList: string[];
|
|
@@ -387,12 +415,19 @@ export declare const GmImage: import("../../../../utils").SFCWithInstall<{
|
|
|
387
415
|
zoomRate: number;
|
|
388
416
|
minScale: number;
|
|
389
417
|
maxScale: number;
|
|
390
|
-
showProgress: boolean;
|
|
391
418
|
}>;
|
|
392
419
|
__isFragment?: undefined;
|
|
393
420
|
__isTeleport?: undefined;
|
|
394
421
|
__isSuspense?: undefined;
|
|
395
422
|
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
423
|
+
showProgress: {
|
|
424
|
+
type: BooleanConstructor;
|
|
425
|
+
default: boolean;
|
|
426
|
+
};
|
|
427
|
+
downloadMode: {
|
|
428
|
+
type: import("vue").PropType<import("./image").GmImageDownloadMode>;
|
|
429
|
+
default: string;
|
|
430
|
+
};
|
|
396
431
|
hideOnClickModal: BooleanConstructor;
|
|
397
432
|
src: {
|
|
398
433
|
readonly type: import("vue").PropType<string>;
|
|
@@ -494,7 +529,6 @@ export declare const GmImage: import("../../../../utils").SFCWithInstall<{
|
|
|
494
529
|
} & {
|
|
495
530
|
readonly default: 7;
|
|
496
531
|
};
|
|
497
|
-
showProgress: BooleanConstructor;
|
|
498
532
|
crossorigin: {
|
|
499
533
|
readonly type: import("vue").PropType<"" | "anonymous" | "use-credentials">;
|
|
500
534
|
readonly required: false;
|
|
@@ -507,7 +541,9 @@ export declare const GmImage: import("../../../../utils").SFCWithInstall<{
|
|
|
507
541
|
onLoad?: ((evt: Event) => any) | undefined;
|
|
508
542
|
onShow?: (() => any) | undefined;
|
|
509
543
|
onSwitch?: ((val: number) => any) | undefined;
|
|
510
|
-
}, {
|
|
544
|
+
}, {
|
|
545
|
+
download: (urlOrIndex: string | number, filename?: string | undefined) => Promise<void>;
|
|
546
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
511
547
|
error: (evt: Event) => void;
|
|
512
548
|
show: () => void;
|
|
513
549
|
switch: (val: number) => void;
|
|
@@ -520,6 +556,8 @@ export declare const GmImage: import("../../../../utils").SFCWithInstall<{
|
|
|
520
556
|
fit: "" | "fill" | "none" | "contain" | "cover" | "scale-down";
|
|
521
557
|
initialIndex: number;
|
|
522
558
|
closeOnPressEscape: boolean;
|
|
559
|
+
showProgress: boolean;
|
|
560
|
+
downloadMode: import("./image").GmImageDownloadMode;
|
|
523
561
|
hideOnClickModal: boolean;
|
|
524
562
|
lazy: boolean;
|
|
525
563
|
previewSrcList: string[];
|
|
@@ -527,7 +565,6 @@ export declare const GmImage: import("../../../../utils").SFCWithInstall<{
|
|
|
527
565
|
zoomRate: number;
|
|
528
566
|
minScale: number;
|
|
529
567
|
maxScale: number;
|
|
530
|
-
showProgress: boolean;
|
|
531
568
|
}, {}, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
532
569
|
$slots: {
|
|
533
570
|
placeholder?: ((props: {}) => any) | undefined;
|
|
@@ -535,6 +572,16 @@ export declare const GmImage: import("../../../../utils").SFCWithInstall<{
|
|
|
535
572
|
error?: ((props: {}) => any) | undefined;
|
|
536
573
|
} & {
|
|
537
574
|
viewer?: ((props: {}) => any) | undefined;
|
|
575
|
+
} & {
|
|
576
|
+
toolbar?: ((props: {
|
|
577
|
+
download: (urlOrIndex: string | number, filename?: string | undefined) => Promise<void>;
|
|
578
|
+
actions: (action: import("element-plus").ImageViewerAction, options?: {} | undefined) => void;
|
|
579
|
+
prev: () => void;
|
|
580
|
+
next: () => void;
|
|
581
|
+
reset: () => void;
|
|
582
|
+
activeIndex: number;
|
|
583
|
+
setActiveItem: (index: number) => void;
|
|
584
|
+
}) => any) | undefined;
|
|
538
585
|
};
|
|
539
586
|
})> & Record<string, any>;
|
|
540
587
|
export type ImageInstance = InstanceType<typeof Image>;
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{
|
|
1
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
2
|
+
showProgress: {
|
|
3
|
+
type: BooleanConstructor;
|
|
4
|
+
default: boolean;
|
|
5
|
+
};
|
|
6
|
+
downloadMode: {
|
|
7
|
+
type: import("vue").PropType<import("./imageViewer").GmImageViewerDownloadMode>;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
2
10
|
urlList: {
|
|
3
11
|
readonly type: import("vue").PropType<string[]>;
|
|
4
12
|
readonly required: false;
|
|
@@ -71,7 +79,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
71
79
|
} & {
|
|
72
80
|
readonly default: 7;
|
|
73
81
|
};
|
|
74
|
-
showProgress: BooleanConstructor;
|
|
75
82
|
crossorigin: {
|
|
76
83
|
readonly type: import("vue").PropType<"" | "anonymous" | "use-credentials">;
|
|
77
84
|
readonly required: false;
|
|
@@ -79,6 +86,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
79
86
|
__epPropKey: true;
|
|
80
87
|
};
|
|
81
88
|
}, {
|
|
89
|
+
download: (urlOrIndex: string | number, filename?: string | undefined) => Promise<void>;
|
|
82
90
|
setActiveItem: (index: number) => void;
|
|
83
91
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
84
92
|
error: (evt: Event) => void;
|
|
@@ -86,6 +94,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
86
94
|
switch: (index: number) => void;
|
|
87
95
|
close: () => void;
|
|
88
96
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
97
|
+
showProgress: {
|
|
98
|
+
type: BooleanConstructor;
|
|
99
|
+
default: boolean;
|
|
100
|
+
};
|
|
101
|
+
downloadMode: {
|
|
102
|
+
type: import("vue").PropType<import("./imageViewer").GmImageViewerDownloadMode>;
|
|
103
|
+
default: string;
|
|
104
|
+
};
|
|
89
105
|
urlList: {
|
|
90
106
|
readonly type: import("vue").PropType<string[]>;
|
|
91
107
|
readonly required: false;
|
|
@@ -158,7 +174,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
158
174
|
} & {
|
|
159
175
|
readonly default: 7;
|
|
160
176
|
};
|
|
161
|
-
showProgress: BooleanConstructor;
|
|
162
177
|
crossorigin: {
|
|
163
178
|
readonly type: import("vue").PropType<"" | "anonymous" | "use-credentials">;
|
|
164
179
|
readonly required: false;
|
|
@@ -176,11 +191,27 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
176
191
|
teleported: boolean;
|
|
177
192
|
initialIndex: number;
|
|
178
193
|
closeOnPressEscape: boolean;
|
|
194
|
+
showProgress: boolean;
|
|
195
|
+
downloadMode: import("./imageViewer").GmImageViewerDownloadMode;
|
|
179
196
|
hideOnClickModal: boolean;
|
|
180
197
|
zoomRate: number;
|
|
181
198
|
minScale: number;
|
|
182
199
|
maxScale: number;
|
|
183
|
-
showProgress: boolean;
|
|
184
200
|
urlList: string[];
|
|
185
|
-
}, {}
|
|
201
|
+
}, {}>, {
|
|
202
|
+
toolbar?: ((props: {
|
|
203
|
+
download: (urlOrIndex: string | number, filename?: string | undefined) => Promise<void>;
|
|
204
|
+
actions: (action: import("element-plus").ImageViewerAction, options?: {} | undefined) => void;
|
|
205
|
+
prev: () => void;
|
|
206
|
+
next: () => void;
|
|
207
|
+
reset: () => void;
|
|
208
|
+
activeIndex: number;
|
|
209
|
+
setActiveItem: (index: number) => void;
|
|
210
|
+
}) => any) | undefined;
|
|
211
|
+
}>;
|
|
186
212
|
export default _default;
|
|
213
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
214
|
+
new (): {
|
|
215
|
+
$slots: S;
|
|
216
|
+
};
|
|
217
|
+
};
|