fangguo-component 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -5
- package/README.md +11 -0
- package/dist/{FgCascader.vue_vue_type_style_index_0_lang-Bm4HR37D.js → FgCascader.vue_vue_type_style_index_0_lang-CstlYwHs.js} +1 -1
- package/dist/{ImgViewerHost.vue_vue_type_script_setup_true_lang-CMoh7eWo.js → ImgViewerHost.vue_vue_type_script_setup_true_lang-DBs42WOq.js} +4 -3
- package/dist/{ViewImg-Bg1AQ0T6.js → ViewImg-DXhF20SL.js} +14 -7
- package/dist/ViewImg.css +9 -9
- package/dist/ViewImgPopover-QblZG0z5.js +343 -0
- package/dist/ViewImgPopover.css +79 -6
- package/dist/ViewImgPreview.css +32 -0
- package/dist/{ViewImgPreview.vue_vue_type_style_index_0_lang-CYuLovBR.js → ViewImgPreview.vue_vue_type_style_index_0_lang-C2i0p5IK.js} +19 -9
- package/dist/components/cascader/index.js +1 -1
- package/dist/components/imgViewerHost/imgViewerStore.d.ts +5 -1
- package/dist/components/imgViewerHost/index.js +2 -2
- package/dist/components/index.js +15 -11
- package/dist/components/viewImg/ViewImg.vue.d.ts +9 -1
- package/dist/components/viewImg/index.js +1 -1
- package/dist/components/viewImgPopover/ViewImgPopover.vue.d.ts +25 -4
- package/dist/components/viewImgPopover/index.js +1 -1
- package/dist/components/viewImgPreview/ViewImgPreview.vue.d.ts +4 -1
- package/dist/components/viewImgPreview/index.d.ts +2 -2
- package/dist/components/viewImgPreview/index.js +11 -7
- package/dist/components/viewImgPreview/types.d.ts +15 -0
- package/dist/{imgViewerStore-C5n16uYa.js → imgViewerStore-DK3zvGf4.js} +7 -1
- package/dist/{index-CckJZ8N-.js → index-Ce_edAQB.js} +11 -7
- package/dist/index.js +25 -21
- package/dist/types-Ccn_sb6f.js +49 -0
- package/package.json +97 -92
- package/dist/ViewImgPopover-b9PDEYbP.js +0 -275
- package/dist/types-BNFeGRer.js +0 -32
package/dist/ViewImgPreview.css
CHANGED
|
@@ -22,6 +22,26 @@
|
|
|
22
22
|
opacity: 1 !important;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
/* 仅展示左侧箭头 */
|
|
26
|
+
.el-image-viewer__wrapper.fg-view-img-preview--has-nav-prev .el-image-viewer__prev {
|
|
27
|
+
display: inline-flex !important;
|
|
28
|
+
visibility: visible !important;
|
|
29
|
+
opacity: 1 !important;
|
|
30
|
+
}
|
|
31
|
+
.el-image-viewer__wrapper.fg-view-img-preview--has-nav-prev .el-image-viewer__next {
|
|
32
|
+
display: none !important;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* 仅展示右侧箭头 */
|
|
36
|
+
.el-image-viewer__wrapper.fg-view-img-preview--has-nav-next .el-image-viewer__next {
|
|
37
|
+
display: inline-flex !important;
|
|
38
|
+
visibility: visible !important;
|
|
39
|
+
opacity: 1 !important;
|
|
40
|
+
}
|
|
41
|
+
.el-image-viewer__wrapper.fg-view-img-preview--has-nav-next .el-image-viewer__prev {
|
|
42
|
+
display: none !important;
|
|
43
|
+
}
|
|
44
|
+
|
|
25
45
|
/* 保证预览图在视口内居中适配(避免业务全局 img { width/height: 100% } 导致铺满) */
|
|
26
46
|
.el-image-viewer__wrapper .el-image-viewer__canvas {
|
|
27
47
|
display: flex;
|
|
@@ -38,16 +58,22 @@
|
|
|
38
58
|
|
|
39
59
|
/* 画布置于蒙层之上 */
|
|
40
60
|
.el-image-viewer__wrapper.fg-view-img-preview--has-nav .el-image-viewer__mask,
|
|
61
|
+
.el-image-viewer__wrapper.fg-view-img-preview--has-nav-prev .el-image-viewer__mask,
|
|
62
|
+
.el-image-viewer__wrapper.fg-view-img-preview--has-nav-next .el-image-viewer__mask,
|
|
41
63
|
.el-image-viewer__wrapper.fg-view-img-preview--hide-nav .el-image-viewer__mask,
|
|
42
64
|
.el-image-viewer__wrapper.fg-view-img-preview--hide-toolbar .el-image-viewer__mask {
|
|
43
65
|
z-index: 1;
|
|
44
66
|
}
|
|
45
67
|
.el-image-viewer__wrapper.fg-view-img-preview--has-nav .el-image-viewer__canvas,
|
|
68
|
+
.el-image-viewer__wrapper.fg-view-img-preview--has-nav-prev .el-image-viewer__canvas,
|
|
69
|
+
.el-image-viewer__wrapper.fg-view-img-preview--has-nav-next .el-image-viewer__canvas,
|
|
46
70
|
.el-image-viewer__wrapper.fg-view-img-preview--hide-nav .el-image-viewer__canvas,
|
|
47
71
|
.el-image-viewer__wrapper.fg-view-img-preview--hide-toolbar .el-image-viewer__canvas {
|
|
48
72
|
z-index: 2;
|
|
49
73
|
}
|
|
50
74
|
.el-image-viewer__wrapper.fg-view-img-preview--has-nav .el-image-viewer__img,
|
|
75
|
+
.el-image-viewer__wrapper.fg-view-img-preview--has-nav-prev .el-image-viewer__img,
|
|
76
|
+
.el-image-viewer__wrapper.fg-view-img-preview--has-nav-next .el-image-viewer__img,
|
|
51
77
|
.el-image-viewer__wrapper.fg-view-img-preview--hide-nav .el-image-viewer__img,
|
|
52
78
|
.el-image-viewer__wrapper.fg-view-img-preview--hide-toolbar .el-image-viewer__img {
|
|
53
79
|
z-index: 2;
|
|
@@ -55,6 +81,12 @@
|
|
|
55
81
|
.el-image-viewer__wrapper.fg-view-img-preview--has-nav .el-image-viewer__btn,
|
|
56
82
|
.el-image-viewer__wrapper.fg-view-img-preview--has-nav .el-image-viewer__close,
|
|
57
83
|
.el-image-viewer__wrapper.fg-view-img-preview--has-nav .el-image-viewer__actions,
|
|
84
|
+
.el-image-viewer__wrapper.fg-view-img-preview--has-nav-prev .el-image-viewer__btn,
|
|
85
|
+
.el-image-viewer__wrapper.fg-view-img-preview--has-nav-prev .el-image-viewer__close,
|
|
86
|
+
.el-image-viewer__wrapper.fg-view-img-preview--has-nav-prev .el-image-viewer__actions,
|
|
87
|
+
.el-image-viewer__wrapper.fg-view-img-preview--has-nav-next .el-image-viewer__btn,
|
|
88
|
+
.el-image-viewer__wrapper.fg-view-img-preview--has-nav-next .el-image-viewer__close,
|
|
89
|
+
.el-image-viewer__wrapper.fg-view-img-preview--has-nav-next .el-image-viewer__actions,
|
|
58
90
|
.el-image-viewer__wrapper.fg-view-img-preview--hide-nav .el-image-viewer__btn,
|
|
59
91
|
.el-image-viewer__wrapper.fg-view-img-preview--hide-nav .el-image-viewer__close,
|
|
60
92
|
.el-image-viewer__wrapper.fg-view-img-preview--hide-toolbar .el-image-viewer__btn,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, shallowRef, watch, nextTick, computed, openBlock, createBlock, unref, withCtx, createElementVNode, toDisplayString, createElementBlock, normalizeStyle, Fragment, renderList, resolveDynamicComponent, createCommentVNode } from "vue";
|
|
2
2
|
import { ElImageViewer, ElIcon } from "element-plus";
|
|
3
3
|
import { Refresh, RefreshRight, RefreshLeft, ZoomIn, ZoomOut, DArrowRight, DArrowLeft, Right, Back } from "@element-plus/icons-vue";
|
|
4
|
-
import { D as DEFAULT_ORIGINAL_TOOLBAR, g as DEFAULT_PREVIEW_SHOW_PROGRESS, d as DEFAULT_PREVIEW_MAX_SCALE, e as DEFAULT_PREVIEW_MIN_SCALE, f as DEFAULT_PREVIEW_SCALE,
|
|
4
|
+
import { h as DEFAULT_PREVIEW_SIDE_NAV, D as DEFAULT_ORIGINAL_TOOLBAR, g as DEFAULT_PREVIEW_SHOW_PROGRESS, d as DEFAULT_PREVIEW_MAX_SCALE, e as DEFAULT_PREVIEW_MIN_SCALE, f as DEFAULT_PREVIEW_SCALE, j as DEFAULT_PREVIEW_ZOOM_RATE, i as DEFAULT_PREVIEW_TELEPORTED, a as DEFAULT_PREVIEW_CLOSE_ON_PRESS_ESCAPE, b as DEFAULT_PREVIEW_HIDE_ON_CLICK_MODAL, l as DEFAULT_TOOLBAR_ICON_COLOR, k as DEFAULT_TOOLBAR_BG_COLOR, c as DEFAULT_PREVIEW_INFINITE, r as resolvePreviewSideNav } from "./types-Ccn_sb6f.js";
|
|
5
5
|
import './ViewImgPreview.css';const _hoisted_1 = {
|
|
6
6
|
class: "fg-view-img-preview__toolbar-capture",
|
|
7
7
|
"aria-hidden": "true"
|
|
@@ -26,7 +26,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
26
26
|
showProgress: { type: Boolean, default: DEFAULT_PREVIEW_SHOW_PROGRESS },
|
|
27
27
|
simpleExtraTools: { default: () => [] },
|
|
28
28
|
renderExtraTools: { default: null },
|
|
29
|
-
originalToolbar: { default: () => [...DEFAULT_ORIGINAL_TOOLBAR] }
|
|
29
|
+
originalToolbar: { default: () => [...DEFAULT_ORIGINAL_TOOLBAR] },
|
|
30
|
+
previewSideNav: { type: [Boolean, String], default: DEFAULT_PREVIEW_SIDE_NAV }
|
|
30
31
|
},
|
|
31
32
|
emits: ["close", "switch", "show"],
|
|
32
33
|
setup(__props, { emit: __emit }) {
|
|
@@ -44,12 +45,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
44
45
|
wrapper.classList.remove(
|
|
45
46
|
"fg-view-img-preview--hide-toolbar",
|
|
46
47
|
"fg-view-img-preview--hide-nav",
|
|
47
|
-
"fg-view-img-preview--has-nav"
|
|
48
|
+
"fg-view-img-preview--has-nav",
|
|
49
|
+
"fg-view-img-preview--has-nav-prev",
|
|
50
|
+
"fg-view-img-preview--has-nav-next"
|
|
48
51
|
);
|
|
49
52
|
if (!props.visible) return;
|
|
50
53
|
if (!showToolbar.value) wrapper.classList.add("fg-view-img-preview--hide-toolbar");
|
|
51
|
-
|
|
52
|
-
|
|
54
|
+
const sideNav = resolvedSideNav.value;
|
|
55
|
+
if (sideNav === "none") wrapper.classList.add("fg-view-img-preview--hide-nav");
|
|
56
|
+
else if (sideNav === "both") wrapper.classList.add("fg-view-img-preview--has-nav");
|
|
57
|
+
else if (sideNav === "prev") wrapper.classList.add("fg-view-img-preview--has-nav-prev");
|
|
58
|
+
else wrapper.classList.add("fg-view-img-preview--has-nav-next");
|
|
53
59
|
}
|
|
54
60
|
function resetViewerOnce() {
|
|
55
61
|
var _a;
|
|
@@ -135,15 +141,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
135
141
|
});
|
|
136
142
|
}
|
|
137
143
|
);
|
|
138
|
-
const NAV_TOOLBAR_KEYS = ["prev", "next", "fistImg", "lastImg"];
|
|
139
144
|
const showToolbar = computed(
|
|
140
145
|
() => props.originalToolbar.length > 0 || props.simpleExtraTools.length > 0 || !!props.renderExtraTools
|
|
141
146
|
);
|
|
142
|
-
const
|
|
143
|
-
() =>
|
|
147
|
+
const resolvedSideNav = computed(
|
|
148
|
+
() => resolvePreviewSideNav(
|
|
149
|
+
props.previewSideNav,
|
|
150
|
+
props.urlList.length,
|
|
151
|
+
props.originalToolbar,
|
|
152
|
+
props.simpleExtraTools.length > 0 || !!props.renderExtraTools
|
|
153
|
+
)
|
|
144
154
|
);
|
|
145
155
|
watch(
|
|
146
|
-
[showToolbar,
|
|
156
|
+
[showToolbar, resolvedSideNav, () => props.urlList.length],
|
|
147
157
|
() => {
|
|
148
158
|
if (props.visible) nextTick(syncViewerWrapperFlags);
|
|
149
159
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VNode } from 'vue';
|
|
2
|
-
import { OriginalToolbarItem, SimpleCustomTool, PreviewShowPayload, ViewImgPreviewViewerOptions } from '../viewImgPreview/types';
|
|
2
|
+
import { OriginalToolbarItem, SimpleCustomTool, PreviewShowPayload, ViewImgPreviewViewerOptions, PreviewSideNav } from '../viewImgPreview/types';
|
|
3
3
|
export interface ShowImgViewerOptions extends ViewImgPreviewViewerOptions {
|
|
4
4
|
previewImgList?: string[];
|
|
5
5
|
defImgPreviewIndex?: number;
|
|
@@ -10,6 +10,8 @@ export interface ShowImgViewerOptions extends ViewImgPreviewViewerOptions {
|
|
|
10
10
|
simpleExtraTools?: SimpleCustomTool[];
|
|
11
11
|
renderExtraTools?: VNode | null;
|
|
12
12
|
originalToolbar?: OriginalToolbarItem[];
|
|
13
|
+
/** 多图预览两侧箭头:`false` 隐藏;`'prev'` / `'next'` 仅一侧;`'both'` 两侧(默认) */
|
|
14
|
+
previewSideNav?: PreviewSideNav;
|
|
13
15
|
/** 预览层打开时触发 */
|
|
14
16
|
onShow?: (payload: PreviewShowPayload) => void;
|
|
15
17
|
/** 预览层关闭时触发 */
|
|
@@ -37,6 +39,7 @@ export interface ImgViewerStoreInstance {
|
|
|
37
39
|
readonly simpleExtraTools: SimpleCustomTool[];
|
|
38
40
|
readonly renderExtraTools: VNode | null;
|
|
39
41
|
readonly originalToolbar: OriginalToolbarItem[];
|
|
42
|
+
readonly previewSideNav: PreviewSideNav;
|
|
40
43
|
showImgViewer: (options?: ShowImgViewerOptions) => void;
|
|
41
44
|
hideImgViewer: () => void;
|
|
42
45
|
setDefImgPreviewIndex: (defImgPreviewIndex: number) => void;
|
|
@@ -189,6 +192,7 @@ export declare function useImgViewerState(): {
|
|
|
189
192
|
}[];
|
|
190
193
|
renderExtraTools: VNode | null;
|
|
191
194
|
originalToolbar: OriginalToolbarItem[];
|
|
195
|
+
previewSideNav: PreviewSideNav;
|
|
192
196
|
onShow: ((payload: PreviewShowPayload) => void) | null;
|
|
193
197
|
onClose: (() => void) | null;
|
|
194
198
|
onSwitch: ((index: number) => void) | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ } from "../../ImgViewerHost.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { I, P, g, u, a } from "../../imgViewerStore-
|
|
1
|
+
import { _ } from "../../ImgViewerHost.vue_vue_type_script_setup_true_lang-DBs42WOq.js";
|
|
2
|
+
import { I, P, g, u, a } from "../../imgViewerStore-DK3zvGf4.js";
|
|
3
3
|
export {
|
|
4
4
|
_ as FgImgViewerHost,
|
|
5
5
|
I as ImgViewerStore,
|
package/dist/components/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { _ } from "../ArgHover.vue_vue_type_style_index_0_lang-CSymSDRl.js";
|
|
2
|
-
import { _ as _2 } from "../FgCascader.vue_vue_type_style_index_0_lang-
|
|
2
|
+
import { _ as _2 } from "../FgCascader.vue_vue_type_style_index_0_lang-CstlYwHs.js";
|
|
3
3
|
import { _ as _3 } from "../CitySelect.vue_vue_type_script_setup_true_lang-DZp6834K.js";
|
|
4
4
|
import { _ as _4 } from "../DragResizable.vue_vue_type_style_index_0_lang-BePpQHve.js";
|
|
5
5
|
import { _ as _5 } from "../HSelectAll.vue_vue_type_script_setup_true_lang-C6qzdQT-.js";
|
|
6
6
|
import { _ as _6 } from "../IdentifyAddress.vue_vue_type_script_setup_true_lang-BCIOF-Oy.js";
|
|
7
7
|
import { _ as _7 } from "../ImageLoupe.vue_vue_type_script_setup_true_lang-BaXHYlDu.js";
|
|
8
|
-
import { _ as _8 } from "../ImgViewerHost.vue_vue_type_script_setup_true_lang-
|
|
8
|
+
import { _ as _8 } from "../ImgViewerHost.vue_vue_type_script_setup_true_lang-DBs42WOq.js";
|
|
9
9
|
import { _ as _9 } from "../LazyComponent.vue_vue_type_script_setup_true_lang-D5KGqlj4.js";
|
|
10
10
|
import { _ as _10 } from "../NoRender.vue_vue_type_script_setup_true_lang-B0G6jxPg.js";
|
|
11
11
|
import { _ as _11 } from "../SelectAll.vue_vue_type_script_setup_true_lang-CyzY8ams.js";
|
|
@@ -13,8 +13,8 @@ import { _ as _12 } from "../SelectAll2.vue_vue_type_script_setup_true_lang-Crsa
|
|
|
13
13
|
import { _ as _13 } from "../SelectCustomAll.vue_vue_type_style_index_0_lang-BEZwlGXa.js";
|
|
14
14
|
import { _ as _14 } from "../SelectTimePicker.vue_vue_type_script_setup_true_lang-Dk4TpTBN.js";
|
|
15
15
|
import { _ as _15 } from "../TextEllipsisTooltip.vue_vue_type_script_setup_true_lang-DVE1CxPm.js";
|
|
16
|
-
import { _ as _16 } from "../ViewImgPreview.vue_vue_type_style_index_0_lang-
|
|
17
|
-
import { D, a, b, c, d, e, f, g, h, i, j, k } from "../types-
|
|
16
|
+
import { _ as _16 } from "../ViewImgPreview.vue_vue_type_style_index_0_lang-C2i0p5IK.js";
|
|
17
|
+
import { D, a, b, c, d, e, f, g, h, i, j, k, l, N, r, s } from "../types-Ccn_sb6f.js";
|
|
18
18
|
import { B } from "../ButtonGroup-DqViorHX.js";
|
|
19
19
|
import { C } from "../ContentTitle-By0Zk1u7.js";
|
|
20
20
|
import { C as C2 } from "../CustomInputV2-BqhBSO53.js";
|
|
@@ -31,9 +31,9 @@ import { S } from "../SelectAddress-CCepDxu8.js";
|
|
|
31
31
|
import { S as S2 } from "../SelectTree-DUH92Iwr.js";
|
|
32
32
|
import { S as S3 } from "../SvgIcon-DIg0upEk.js";
|
|
33
33
|
import { T } from "../TextCopy-lpbeqOUI.js";
|
|
34
|
-
import { F as F2 } from "../ViewImg-
|
|
35
|
-
import { V } from "../ViewImgPopover-
|
|
36
|
-
import { I, P, g as g2, u, a as a2 } from "../imgViewerStore-
|
|
34
|
+
import { F as F2 } from "../ViewImg-DXhF20SL.js";
|
|
35
|
+
import { V } from "../ViewImgPopover-QblZG0z5.js";
|
|
36
|
+
import { I, P, g as g2, u, a as a2 } from "../imgViewerStore-DK3zvGf4.js";
|
|
37
37
|
import { V as V2 } from "../VirtualTable-Cm_L7q9W.js";
|
|
38
38
|
export {
|
|
39
39
|
D as DEFAULT_ORIGINAL_TOOLBAR,
|
|
@@ -44,10 +44,11 @@ export {
|
|
|
44
44
|
e as DEFAULT_PREVIEW_MIN_SCALE,
|
|
45
45
|
f as DEFAULT_PREVIEW_SCALE,
|
|
46
46
|
g as DEFAULT_PREVIEW_SHOW_PROGRESS,
|
|
47
|
-
h as
|
|
48
|
-
i as
|
|
49
|
-
j as
|
|
50
|
-
k as
|
|
47
|
+
h as DEFAULT_PREVIEW_SIDE_NAV,
|
|
48
|
+
i as DEFAULT_PREVIEW_TELEPORTED,
|
|
49
|
+
j as DEFAULT_PREVIEW_ZOOM_RATE,
|
|
50
|
+
k as DEFAULT_TOOLBAR_BG_COLOR,
|
|
51
|
+
l as DEFAULT_TOOLBAR_ICON_COLOR,
|
|
51
52
|
_ as FgArgHover,
|
|
52
53
|
B as FgButtonGroup,
|
|
53
54
|
_2 as FgCascader,
|
|
@@ -83,9 +84,12 @@ export {
|
|
|
83
84
|
V as FgViewImgPopover,
|
|
84
85
|
_16 as FgViewImgPreview,
|
|
85
86
|
I as ImgViewerStore,
|
|
87
|
+
N as NAV_TOOLBAR_KEYS,
|
|
86
88
|
P as PREVIEW_BASE_Z_INDEX,
|
|
87
89
|
V2 as VirtualTable,
|
|
88
90
|
g2 as getDialogZindex,
|
|
91
|
+
r as resolvePreviewSideNav,
|
|
92
|
+
s as shouldShowPreviewSideNav,
|
|
89
93
|
u as useImgViewerState,
|
|
90
94
|
a2 as useImgViewerStore
|
|
91
95
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VNode } from 'vue';
|
|
2
2
|
import { ImgSizeOptions } from '../../tools/imgUrl';
|
|
3
|
-
import { OriginalToolbarItem, SimpleCustomTool, PreviewShowPayload } from '../viewImgPreview/types';
|
|
3
|
+
import { OriginalToolbarItem, SimpleCustomTool, PreviewShowPayload, PreviewSideNav } from '../viewImgPreview/types';
|
|
4
4
|
type ObjectFit = "fill" | "contain" | "cover" | "none" | "scale-down" | "";
|
|
5
5
|
type __VLS_Props = {
|
|
6
6
|
src?: string;
|
|
@@ -64,7 +64,13 @@ type __VLS_Props = {
|
|
|
64
64
|
imgSize?: ImgSizeOptions;
|
|
65
65
|
/** 点击预览是否去掉 URL 查询参数(与主图加载失败去参重试逻辑一致) */
|
|
66
66
|
previewStripQuery?: boolean;
|
|
67
|
+
/** 多图预览两侧箭头:`false` 隐藏;`'prev'` / `'next'` 仅一侧;`'both'` 两侧(默认) */
|
|
68
|
+
previewSideNav?: PreviewSideNav;
|
|
67
69
|
};
|
|
70
|
+
/**
|
|
71
|
+
* 打开预览大图
|
|
72
|
+
*/
|
|
73
|
+
declare function openPreview(): void;
|
|
68
74
|
declare function __VLS_template(): {
|
|
69
75
|
attrs: Partial<{}>;
|
|
70
76
|
slots: {
|
|
@@ -78,6 +84,7 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
|
78
84
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
79
85
|
displaySrc: import('vue').Ref<string, string>;
|
|
80
86
|
retried: import('vue').Ref<boolean, boolean>;
|
|
87
|
+
openPreview: typeof openPreview;
|
|
81
88
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
82
89
|
switch: (index: number) => any;
|
|
83
90
|
show: (payload: PreviewShowPayload) => any;
|
|
@@ -119,6 +126,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
|
119
126
|
simpleExtraTools: SimpleCustomTool[];
|
|
120
127
|
renderExtraTools: VNode | null;
|
|
121
128
|
originalToolbar: OriginalToolbarItem[];
|
|
129
|
+
previewSideNav: PreviewSideNav;
|
|
122
130
|
zoomRate: number;
|
|
123
131
|
minScale: number;
|
|
124
132
|
maxScale: number;
|
|
@@ -77,6 +77,8 @@ type __VLS_Props = {
|
|
|
77
77
|
isShowWatermark?: boolean;
|
|
78
78
|
/** 水印标题 */
|
|
79
79
|
waterMarkTitle?: string;
|
|
80
|
+
/** 是否在缩略图右上角显示预览图标,点击图标打开大图预览 */
|
|
81
|
+
showPreviewIcon?: boolean;
|
|
80
82
|
};
|
|
81
83
|
declare function __VLS_template(): {
|
|
82
84
|
attrs: Partial<{}>;
|
|
@@ -85,6 +87,8 @@ declare function __VLS_template(): {
|
|
|
85
87
|
error?(_: {}): any;
|
|
86
88
|
error?(_: {}): any;
|
|
87
89
|
error?(_: {}): any;
|
|
90
|
+
error?(_: {}): any;
|
|
91
|
+
error?(_: {}): any;
|
|
88
92
|
};
|
|
89
93
|
refs: {
|
|
90
94
|
viewImgRef: {
|
|
@@ -111,6 +115,7 @@ declare function __VLS_template(): {
|
|
|
111
115
|
simpleExtraTools: SimpleCustomTool[];
|
|
112
116
|
renderExtraTools: VNode | null;
|
|
113
117
|
originalToolbar: OriginalToolbarItem[];
|
|
118
|
+
previewSideNav: import('..').PreviewSideNav;
|
|
114
119
|
zoomRate: number;
|
|
115
120
|
minScale: number;
|
|
116
121
|
maxScale: number;
|
|
@@ -156,6 +161,7 @@ declare function __VLS_template(): {
|
|
|
156
161
|
readonly ossLinks?: string[];
|
|
157
162
|
readonly imgSize?: ImgSizeOptions;
|
|
158
163
|
readonly previewStripQuery?: boolean;
|
|
164
|
+
readonly previewSideNav?: import('..').PreviewSideNav;
|
|
159
165
|
readonly onSwitch?: (index: number) => any;
|
|
160
166
|
readonly onShow?: (payload: PreviewShowPayload) => any;
|
|
161
167
|
readonly onClose?: () => any;
|
|
@@ -165,7 +171,7 @@ declare function __VLS_template(): {
|
|
|
165
171
|
from: string;
|
|
166
172
|
to: string;
|
|
167
173
|
}) => any;
|
|
168
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "backgroundColor" | "scale" | "zIndex" | "infinite" | "lazy" | "teleported" | "loading" | "preview" | "closeOnPressEscape" | "src" | "hideOnClickModal" | "previewSrcList" | "previewTeleported" | "fit" | "defImgPreviewIndex" | "toolbarBgColor" | "toolbarIconColor" | "simpleExtraTools" | "renderExtraTools" | "originalToolbar" | "zoomRate" | "minScale" | "maxScale" | "showProgress" | "initialIndex" | "errorColor" | "errorOffset" | "errorText" | "ossProcess" | "ossLinks" | "imgSize" | "previewStripQuery">;
|
|
174
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "backgroundColor" | "scale" | "zIndex" | "infinite" | "lazy" | "teleported" | "loading" | "preview" | "closeOnPressEscape" | "src" | "hideOnClickModal" | "previewSrcList" | "previewTeleported" | "fit" | "defImgPreviewIndex" | "toolbarBgColor" | "toolbarIconColor" | "simpleExtraTools" | "renderExtraTools" | "originalToolbar" | "previewSideNav" | "zoomRate" | "minScale" | "maxScale" | "showProgress" | "initialIndex" | "errorColor" | "errorOffset" | "errorText" | "ossProcess" | "ossLinks" | "imgSize" | "previewStripQuery">;
|
|
169
175
|
$attrs: import('vue').Attrs;
|
|
170
176
|
$refs: {
|
|
171
177
|
[x: string]: unknown;
|
|
@@ -214,6 +220,7 @@ declare function __VLS_template(): {
|
|
|
214
220
|
ossLinks?: string[];
|
|
215
221
|
imgSize?: ImgSizeOptions;
|
|
216
222
|
previewStripQuery?: boolean;
|
|
223
|
+
previewSideNav?: import('..').PreviewSideNav;
|
|
217
224
|
}> & Readonly<{
|
|
218
225
|
onSwitch?: (index: number) => any;
|
|
219
226
|
onShow?: (payload: PreviewShowPayload) => any;
|
|
@@ -227,6 +234,7 @@ declare function __VLS_template(): {
|
|
|
227
234
|
}>, {
|
|
228
235
|
displaySrc: import('vue').Ref<string, string>;
|
|
229
236
|
retried: import('vue').Ref<boolean, boolean>;
|
|
237
|
+
openPreview: () => void;
|
|
230
238
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
231
239
|
switch: (index: number) => any;
|
|
232
240
|
show: (payload: PreviewShowPayload) => any;
|
|
@@ -258,6 +266,7 @@ declare function __VLS_template(): {
|
|
|
258
266
|
simpleExtraTools: SimpleCustomTool[];
|
|
259
267
|
renderExtraTools: VNode | null;
|
|
260
268
|
originalToolbar: OriginalToolbarItem[];
|
|
269
|
+
previewSideNav: import('..').PreviewSideNav;
|
|
261
270
|
zoomRate: number;
|
|
262
271
|
minScale: number;
|
|
263
272
|
maxScale: number;
|
|
@@ -311,6 +320,7 @@ declare function __VLS_template(): {
|
|
|
311
320
|
simpleExtraTools: SimpleCustomTool[];
|
|
312
321
|
renderExtraTools: VNode | null;
|
|
313
322
|
originalToolbar: OriginalToolbarItem[];
|
|
323
|
+
previewSideNav: import('..').PreviewSideNav;
|
|
314
324
|
zoomRate: number;
|
|
315
325
|
minScale: number;
|
|
316
326
|
maxScale: number;
|
|
@@ -356,6 +366,7 @@ declare function __VLS_template(): {
|
|
|
356
366
|
ossLinks?: string[];
|
|
357
367
|
imgSize?: ImgSizeOptions;
|
|
358
368
|
previewStripQuery?: boolean;
|
|
369
|
+
previewSideNav?: import('..').PreviewSideNav;
|
|
359
370
|
}> & Readonly<{
|
|
360
371
|
onSwitch?: (index: number) => any;
|
|
361
372
|
onShow?: (payload: PreviewShowPayload) => any;
|
|
@@ -366,9 +377,10 @@ declare function __VLS_template(): {
|
|
|
366
377
|
from: string;
|
|
367
378
|
to: string;
|
|
368
379
|
}) => any;
|
|
369
|
-
}>, "displaySrc" | "retried" | ("backgroundColor" | "scale" | "zIndex" | "infinite" | "lazy" | "teleported" | "loading" | "preview" | "closeOnPressEscape" | "src" | "hideOnClickModal" | "previewSrcList" | "previewTeleported" | "fit" | "defImgPreviewIndex" | "toolbarBgColor" | "toolbarIconColor" | "simpleExtraTools" | "renderExtraTools" | "originalToolbar" | "zoomRate" | "minScale" | "maxScale" | "showProgress" | "initialIndex" | "errorColor" | "errorOffset" | "errorText" | "ossProcess" | "ossLinks" | "imgSize" | "previewStripQuery")> & {
|
|
380
|
+
}>, "displaySrc" | "retried" | "openPreview" | ("backgroundColor" | "scale" | "zIndex" | "infinite" | "lazy" | "teleported" | "loading" | "preview" | "closeOnPressEscape" | "src" | "hideOnClickModal" | "previewSrcList" | "previewTeleported" | "fit" | "defImgPreviewIndex" | "toolbarBgColor" | "toolbarIconColor" | "simpleExtraTools" | "renderExtraTools" | "originalToolbar" | "previewSideNav" | "zoomRate" | "minScale" | "maxScale" | "showProgress" | "initialIndex" | "errorColor" | "errorOffset" | "errorText" | "ossProcess" | "ossLinks" | "imgSize" | "previewStripQuery")> & {
|
|
370
381
|
displaySrc: string;
|
|
371
382
|
retried: boolean;
|
|
383
|
+
openPreview: () => void;
|
|
372
384
|
} & {} & import('vue').ComponentCustomProperties & {} & {
|
|
373
385
|
$slots: {
|
|
374
386
|
placeholder?(_: {}): any;
|
|
@@ -406,6 +418,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
406
418
|
hoverPopoverProps: Record<string, unknown>;
|
|
407
419
|
isShowWatermark: boolean;
|
|
408
420
|
waterMarkTitle: string;
|
|
421
|
+
showPreviewIcon: boolean;
|
|
409
422
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
410
423
|
viewImgRef: {
|
|
411
424
|
$: import('vue').ComponentInternalInstance;
|
|
@@ -431,6 +444,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
431
444
|
simpleExtraTools: SimpleCustomTool[];
|
|
432
445
|
renderExtraTools: VNode | null;
|
|
433
446
|
originalToolbar: OriginalToolbarItem[];
|
|
447
|
+
previewSideNav: import('..').PreviewSideNav;
|
|
434
448
|
zoomRate: number;
|
|
435
449
|
minScale: number;
|
|
436
450
|
maxScale: number;
|
|
@@ -476,6 +490,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
476
490
|
readonly ossLinks?: string[];
|
|
477
491
|
readonly imgSize?: ImgSizeOptions;
|
|
478
492
|
readonly previewStripQuery?: boolean;
|
|
493
|
+
readonly previewSideNav?: import('..').PreviewSideNav;
|
|
479
494
|
readonly onSwitch?: (index: number) => any;
|
|
480
495
|
readonly onShow?: (payload: PreviewShowPayload) => any;
|
|
481
496
|
readonly onClose?: () => any;
|
|
@@ -485,7 +500,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
485
500
|
from: string;
|
|
486
501
|
to: string;
|
|
487
502
|
}) => any;
|
|
488
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "backgroundColor" | "scale" | "zIndex" | "infinite" | "lazy" | "teleported" | "loading" | "preview" | "closeOnPressEscape" | "src" | "hideOnClickModal" | "previewSrcList" | "previewTeleported" | "fit" | "defImgPreviewIndex" | "toolbarBgColor" | "toolbarIconColor" | "simpleExtraTools" | "renderExtraTools" | "originalToolbar" | "zoomRate" | "minScale" | "maxScale" | "showProgress" | "initialIndex" | "errorColor" | "errorOffset" | "errorText" | "ossProcess" | "ossLinks" | "imgSize" | "previewStripQuery">;
|
|
503
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "backgroundColor" | "scale" | "zIndex" | "infinite" | "lazy" | "teleported" | "loading" | "preview" | "closeOnPressEscape" | "src" | "hideOnClickModal" | "previewSrcList" | "previewTeleported" | "fit" | "defImgPreviewIndex" | "toolbarBgColor" | "toolbarIconColor" | "simpleExtraTools" | "renderExtraTools" | "originalToolbar" | "previewSideNav" | "zoomRate" | "minScale" | "maxScale" | "showProgress" | "initialIndex" | "errorColor" | "errorOffset" | "errorText" | "ossProcess" | "ossLinks" | "imgSize" | "previewStripQuery">;
|
|
489
504
|
$attrs: import('vue').Attrs;
|
|
490
505
|
$refs: {
|
|
491
506
|
[x: string]: unknown;
|
|
@@ -534,6 +549,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
534
549
|
ossLinks?: string[];
|
|
535
550
|
imgSize?: ImgSizeOptions;
|
|
536
551
|
previewStripQuery?: boolean;
|
|
552
|
+
previewSideNav?: import('..').PreviewSideNav;
|
|
537
553
|
}> & Readonly<{
|
|
538
554
|
onSwitch?: (index: number) => any;
|
|
539
555
|
onShow?: (payload: PreviewShowPayload) => any;
|
|
@@ -547,6 +563,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
547
563
|
}>, {
|
|
548
564
|
displaySrc: import('vue').Ref<string, string>;
|
|
549
565
|
retried: import('vue').Ref<boolean, boolean>;
|
|
566
|
+
openPreview: () => void;
|
|
550
567
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
551
568
|
switch: (index: number) => any;
|
|
552
569
|
show: (payload: PreviewShowPayload) => any;
|
|
@@ -578,6 +595,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
578
595
|
simpleExtraTools: SimpleCustomTool[];
|
|
579
596
|
renderExtraTools: VNode | null;
|
|
580
597
|
originalToolbar: OriginalToolbarItem[];
|
|
598
|
+
previewSideNav: import('..').PreviewSideNav;
|
|
581
599
|
zoomRate: number;
|
|
582
600
|
minScale: number;
|
|
583
601
|
maxScale: number;
|
|
@@ -631,6 +649,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
631
649
|
simpleExtraTools: SimpleCustomTool[];
|
|
632
650
|
renderExtraTools: VNode | null;
|
|
633
651
|
originalToolbar: OriginalToolbarItem[];
|
|
652
|
+
previewSideNav: import('..').PreviewSideNav;
|
|
634
653
|
zoomRate: number;
|
|
635
654
|
minScale: number;
|
|
636
655
|
maxScale: number;
|
|
@@ -676,6 +695,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
676
695
|
ossLinks?: string[];
|
|
677
696
|
imgSize?: ImgSizeOptions;
|
|
678
697
|
previewStripQuery?: boolean;
|
|
698
|
+
previewSideNav?: import('..').PreviewSideNav;
|
|
679
699
|
}> & Readonly<{
|
|
680
700
|
onSwitch?: (index: number) => any;
|
|
681
701
|
onShow?: (payload: PreviewShowPayload) => any;
|
|
@@ -686,9 +706,10 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
686
706
|
from: string;
|
|
687
707
|
to: string;
|
|
688
708
|
}) => any;
|
|
689
|
-
}>, "displaySrc" | "retried" | ("backgroundColor" | "scale" | "zIndex" | "infinite" | "lazy" | "teleported" | "loading" | "preview" | "closeOnPressEscape" | "src" | "hideOnClickModal" | "previewSrcList" | "previewTeleported" | "fit" | "defImgPreviewIndex" | "toolbarBgColor" | "toolbarIconColor" | "simpleExtraTools" | "renderExtraTools" | "originalToolbar" | "zoomRate" | "minScale" | "maxScale" | "showProgress" | "initialIndex" | "errorColor" | "errorOffset" | "errorText" | "ossProcess" | "ossLinks" | "imgSize" | "previewStripQuery")> & {
|
|
709
|
+
}>, "displaySrc" | "retried" | "openPreview" | ("backgroundColor" | "scale" | "zIndex" | "infinite" | "lazy" | "teleported" | "loading" | "preview" | "closeOnPressEscape" | "src" | "hideOnClickModal" | "previewSrcList" | "previewTeleported" | "fit" | "defImgPreviewIndex" | "toolbarBgColor" | "toolbarIconColor" | "simpleExtraTools" | "renderExtraTools" | "originalToolbar" | "previewSideNav" | "zoomRate" | "minScale" | "maxScale" | "showProgress" | "initialIndex" | "errorColor" | "errorOffset" | "errorText" | "ossProcess" | "ossLinks" | "imgSize" | "previewStripQuery")> & {
|
|
690
710
|
displaySrc: string;
|
|
691
711
|
retried: boolean;
|
|
712
|
+
openPreview: () => void;
|
|
692
713
|
} & {} & import('vue').ComponentCustomProperties & {} & {
|
|
693
714
|
$slots: {
|
|
694
715
|
placeholder?(_: {}): any;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OriginalToolbarItem, SimpleCustomTool, PreviewShowPayload } from './types';
|
|
1
|
+
import { OriginalToolbarItem, SimpleCustomTool, PreviewShowPayload, PreviewSideNav } from './types';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
visible?: boolean;
|
|
4
4
|
urlList?: string[];
|
|
@@ -18,6 +18,8 @@ type __VLS_Props = {
|
|
|
18
18
|
simpleExtraTools?: SimpleCustomTool[];
|
|
19
19
|
renderExtraTools?: import('vue').VNode | null;
|
|
20
20
|
originalToolbar?: OriginalToolbarItem[];
|
|
21
|
+
/** 多图预览两侧箭头:`false` 隐藏;`'prev'` / `'next'` 仅一侧;`'both'` 两侧(默认) */
|
|
22
|
+
previewSideNav?: PreviewSideNav;
|
|
21
23
|
};
|
|
22
24
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
23
25
|
switch: (index: number) => any;
|
|
@@ -40,6 +42,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
40
42
|
simpleExtraTools: SimpleCustomTool[];
|
|
41
43
|
renderExtraTools: import('vue').VNode | null;
|
|
42
44
|
originalToolbar: OriginalToolbarItem[];
|
|
45
|
+
previewSideNav: PreviewSideNav;
|
|
43
46
|
zoomRate: number;
|
|
44
47
|
minScale: number;
|
|
45
48
|
maxScale: number;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { default as FgViewImgPreview } from './ViewImgPreview.vue';
|
|
2
|
-
export type { OriginalToolbarItem, SimpleCustomTool, ToolHandlerParams, ViewImgPreviewProps, ViewImgPreviewViewerOptions, PreviewShowPayload, } from './types';
|
|
3
|
-
export { DEFAULT_ORIGINAL_TOOLBAR, DEFAULT_TOOLBAR_BG_COLOR, DEFAULT_TOOLBAR_ICON_COLOR, DEFAULT_PREVIEW_HIDE_ON_CLICK_MODAL, DEFAULT_PREVIEW_CLOSE_ON_PRESS_ESCAPE, DEFAULT_PREVIEW_TELEPORTED, DEFAULT_PREVIEW_INFINITE, DEFAULT_PREVIEW_ZOOM_RATE, DEFAULT_PREVIEW_SCALE, DEFAULT_PREVIEW_MIN_SCALE, DEFAULT_PREVIEW_MAX_SCALE, DEFAULT_PREVIEW_SHOW_PROGRESS, } from './types';
|
|
2
|
+
export type { OriginalToolbarItem, SimpleCustomTool, ToolHandlerParams, ViewImgPreviewProps, ViewImgPreviewViewerOptions, PreviewShowPayload, PreviewSideNav, ResolvedPreviewSideNav, } from './types';
|
|
3
|
+
export { DEFAULT_ORIGINAL_TOOLBAR, NAV_TOOLBAR_KEYS, resolvePreviewSideNav, shouldShowPreviewSideNav, DEFAULT_PREVIEW_SIDE_NAV, DEFAULT_TOOLBAR_BG_COLOR, DEFAULT_TOOLBAR_ICON_COLOR, DEFAULT_PREVIEW_HIDE_ON_CLICK_MODAL, DEFAULT_PREVIEW_CLOSE_ON_PRESS_ESCAPE, DEFAULT_PREVIEW_TELEPORTED, DEFAULT_PREVIEW_INFINITE, DEFAULT_PREVIEW_ZOOM_RATE, DEFAULT_PREVIEW_SCALE, DEFAULT_PREVIEW_MIN_SCALE, DEFAULT_PREVIEW_MAX_SCALE, DEFAULT_PREVIEW_SHOW_PROGRESS, } from './types';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ } from "../../ViewImgPreview.vue_vue_type_style_index_0_lang-
|
|
2
|
-
import { D, a, b, c, d, e, f, g, h, i, j, k } from "../../types-
|
|
1
|
+
import { _ } from "../../ViewImgPreview.vue_vue_type_style_index_0_lang-C2i0p5IK.js";
|
|
2
|
+
import { D, a, b, c, d, e, f, g, h, i, j, k, l, N, r, s } from "../../types-Ccn_sb6f.js";
|
|
3
3
|
export {
|
|
4
4
|
D as DEFAULT_ORIGINAL_TOOLBAR,
|
|
5
5
|
a as DEFAULT_PREVIEW_CLOSE_ON_PRESS_ESCAPE,
|
|
@@ -9,9 +9,13 @@ export {
|
|
|
9
9
|
e as DEFAULT_PREVIEW_MIN_SCALE,
|
|
10
10
|
f as DEFAULT_PREVIEW_SCALE,
|
|
11
11
|
g as DEFAULT_PREVIEW_SHOW_PROGRESS,
|
|
12
|
-
h as
|
|
13
|
-
i as
|
|
14
|
-
j as
|
|
15
|
-
k as
|
|
16
|
-
|
|
12
|
+
h as DEFAULT_PREVIEW_SIDE_NAV,
|
|
13
|
+
i as DEFAULT_PREVIEW_TELEPORTED,
|
|
14
|
+
j as DEFAULT_PREVIEW_ZOOM_RATE,
|
|
15
|
+
k as DEFAULT_TOOLBAR_BG_COLOR,
|
|
16
|
+
l as DEFAULT_TOOLBAR_ICON_COLOR,
|
|
17
|
+
_ as FgViewImgPreview,
|
|
18
|
+
N as NAV_TOOLBAR_KEYS,
|
|
19
|
+
r as resolvePreviewSideNav,
|
|
20
|
+
s as shouldShowPreviewSideNav
|
|
17
21
|
};
|
|
@@ -23,6 +23,19 @@ export interface SimpleCustomTool extends Record<string, unknown> {
|
|
|
23
23
|
handler: (params: ToolHandlerParams) => void;
|
|
24
24
|
}
|
|
25
25
|
export declare const DEFAULT_ORIGINAL_TOOLBAR: OriginalToolbarItem[];
|
|
26
|
+
/** 左右切换类工具栏项 */
|
|
27
|
+
export declare const NAV_TOOLBAR_KEYS: OriginalToolbarItem[];
|
|
28
|
+
/** 多图预览两侧箭头:`false` 隐藏;`'prev'` / `'next'` 仅一侧;`'both'` 两侧(默认) */
|
|
29
|
+
export type PreviewSideNav = false | "prev" | "next" | "both";
|
|
30
|
+
export declare const DEFAULT_PREVIEW_SIDE_NAV: PreviewSideNav;
|
|
31
|
+
export type ResolvedPreviewSideNav = "none" | "prev" | "next" | "both";
|
|
32
|
+
/**
|
|
33
|
+
* 解析多图预览两侧箭头的展示方式。
|
|
34
|
+
* `both` 时与默认行为一致:多图且底部工具栏/自定义工具未全关才展示两侧箭头。
|
|
35
|
+
*/
|
|
36
|
+
export declare function resolvePreviewSideNav(previewSideNav: PreviewSideNav, imageCount: number, toolbar: OriginalToolbarItem[], hasExtraTools?: boolean): ResolvedPreviewSideNav;
|
|
37
|
+
/** @deprecated 使用 resolvePreviewSideNav */
|
|
38
|
+
export declare function shouldShowPreviewSideNav(imageCount: number, toolbar: OriginalToolbarItem[], hasExtraTools?: boolean): boolean;
|
|
26
39
|
/** 预览工具栏默认背景色(与 Element Plus ImageViewer 工具栏一致) */
|
|
27
40
|
export declare const DEFAULT_TOOLBAR_BG_COLOR = "#606266";
|
|
28
41
|
/** 预览工具栏默认图标色 */
|
|
@@ -68,6 +81,8 @@ export type ViewImgPreviewProps = ViewImgPreviewViewerOptions & {
|
|
|
68
81
|
simpleExtraTools?: SimpleCustomTool[];
|
|
69
82
|
renderExtraTools?: VNode | null;
|
|
70
83
|
originalToolbar?: OriginalToolbarItem[];
|
|
84
|
+
/** 多图预览两侧箭头:`false` 隐藏;`'prev'` / `'next'` 仅一侧;`'both'` 两侧(默认) */
|
|
85
|
+
previewSideNav?: PreviewSideNav;
|
|
71
86
|
};
|
|
72
87
|
/** 预览层打开时回调参数 */
|
|
73
88
|
export type PreviewShowPayload = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { reactive } from "vue";
|
|
2
|
-
import { D as DEFAULT_ORIGINAL_TOOLBAR, g as DEFAULT_PREVIEW_SHOW_PROGRESS, d as DEFAULT_PREVIEW_MAX_SCALE, e as DEFAULT_PREVIEW_MIN_SCALE, f as DEFAULT_PREVIEW_SCALE,
|
|
2
|
+
import { h as DEFAULT_PREVIEW_SIDE_NAV, D as DEFAULT_ORIGINAL_TOOLBAR, g as DEFAULT_PREVIEW_SHOW_PROGRESS, d as DEFAULT_PREVIEW_MAX_SCALE, e as DEFAULT_PREVIEW_MIN_SCALE, f as DEFAULT_PREVIEW_SCALE, j as DEFAULT_PREVIEW_ZOOM_RATE, i as DEFAULT_PREVIEW_TELEPORTED, a as DEFAULT_PREVIEW_CLOSE_ON_PRESS_ESCAPE, b as DEFAULT_PREVIEW_HIDE_ON_CLICK_MODAL, l as DEFAULT_TOOLBAR_ICON_COLOR, k as DEFAULT_TOOLBAR_BG_COLOR, c as DEFAULT_PREVIEW_INFINITE } from "./types-Ccn_sb6f.js";
|
|
3
3
|
const PREVIEW_BASE_Z_INDEX = 2e3;
|
|
4
4
|
function getDialogZindex() {
|
|
5
5
|
const dialogs = Array.from(document.querySelectorAll(".el-overlay"));
|
|
@@ -30,6 +30,7 @@ const state = reactive({
|
|
|
30
30
|
simpleExtraTools: [],
|
|
31
31
|
renderExtraTools: null,
|
|
32
32
|
originalToolbar: [...DEFAULT_ORIGINAL_TOOLBAR],
|
|
33
|
+
previewSideNav: DEFAULT_PREVIEW_SIDE_NAV,
|
|
33
34
|
onShow: null,
|
|
34
35
|
onClose: null,
|
|
35
36
|
onSwitch: null
|
|
@@ -112,6 +113,9 @@ function createImgViewerStore() {
|
|
|
112
113
|
get originalToolbar() {
|
|
113
114
|
return state.originalToolbar;
|
|
114
115
|
},
|
|
116
|
+
get previewSideNav() {
|
|
117
|
+
return state.previewSideNav;
|
|
118
|
+
},
|
|
115
119
|
/**
|
|
116
120
|
* 显示预览层
|
|
117
121
|
* @param options 配置选项
|
|
@@ -157,6 +161,7 @@ function createImgViewerStore() {
|
|
|
157
161
|
simpleExtraTools = [],
|
|
158
162
|
renderExtraTools = null,
|
|
159
163
|
originalToolbar = [...DEFAULT_ORIGINAL_TOOLBAR],
|
|
164
|
+
previewSideNav = DEFAULT_PREVIEW_SIDE_NAV,
|
|
160
165
|
onShow,
|
|
161
166
|
onClose,
|
|
162
167
|
onSwitch
|
|
@@ -183,6 +188,7 @@ function createImgViewerStore() {
|
|
|
183
188
|
state.simpleExtraTools = simpleExtraTools;
|
|
184
189
|
state.renderExtraTools = renderExtraTools;
|
|
185
190
|
state.originalToolbar = originalToolbar;
|
|
191
|
+
state.previewSideNav = previewSideNav;
|
|
186
192
|
state.onShow = onShow != null ? onShow : null;
|
|
187
193
|
state.onClose = onClose != null ? onClose : null;
|
|
188
194
|
state.onSwitch = onSwitch != null ? onSwitch : null;
|