fangguo-component 1.2.0 → 1.2.1
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/{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 +1 -1
- package/dist/ViewImgPopover-b9PDEYbP.js +0 -275
- package/dist/types-BNFeGRer.js +0 -32
package/dist/index.js
CHANGED
|
@@ -14,20 +14,20 @@ var __spreadValues = (a10, b4) => {
|
|
|
14
14
|
}
|
|
15
15
|
return a10;
|
|
16
16
|
};
|
|
17
|
-
import { c as components } from "./index-
|
|
17
|
+
import { c as components } from "./index-Ce_edAQB.js";
|
|
18
18
|
import { t as tools } from "./index-Qkq7I01c.js";
|
|
19
19
|
import { d as directives } from "./index-CSMWzzp0.js";
|
|
20
20
|
import { h as hooks } from "./index-DfQiknXJ.js";
|
|
21
21
|
import { c as configureImgUrl } from "./montageImgUrl-CwgYnB2h.js";
|
|
22
22
|
import { D, g, a, b, i, d, e, m, n, f, r, t } from "./montageImgUrl-CwgYnB2h.js";
|
|
23
23
|
import { _ } from "./ArgHover.vue_vue_type_style_index_0_lang-CSymSDRl.js";
|
|
24
|
-
import { _ as _2 } from "./FgCascader.vue_vue_type_style_index_0_lang-
|
|
24
|
+
import { _ as _2 } from "./FgCascader.vue_vue_type_style_index_0_lang-CstlYwHs.js";
|
|
25
25
|
import { _ as _3 } from "./CitySelect.vue_vue_type_script_setup_true_lang-DZp6834K.js";
|
|
26
26
|
import { _ as _4 } from "./DragResizable.vue_vue_type_style_index_0_lang-BePpQHve.js";
|
|
27
27
|
import { _ as _5 } from "./HSelectAll.vue_vue_type_script_setup_true_lang-C6qzdQT-.js";
|
|
28
28
|
import { _ as _6 } from "./IdentifyAddress.vue_vue_type_script_setup_true_lang-BCIOF-Oy.js";
|
|
29
29
|
import { _ as _7 } from "./ImageLoupe.vue_vue_type_script_setup_true_lang-BaXHYlDu.js";
|
|
30
|
-
import { _ as _8 } from "./ImgViewerHost.vue_vue_type_script_setup_true_lang-
|
|
30
|
+
import { _ as _8 } from "./ImgViewerHost.vue_vue_type_script_setup_true_lang-DBs42WOq.js";
|
|
31
31
|
import { _ as _9 } from "./LazyComponent.vue_vue_type_script_setup_true_lang-D5KGqlj4.js";
|
|
32
32
|
import { _ as _10 } from "./NoRender.vue_vue_type_script_setup_true_lang-B0G6jxPg.js";
|
|
33
33
|
import { _ as _11 } from "./SelectAll.vue_vue_type_script_setup_true_lang-CyzY8ams.js";
|
|
@@ -35,8 +35,8 @@ import { _ as _12 } from "./SelectAll2.vue_vue_type_script_setup_true_lang-Crsao
|
|
|
35
35
|
import { _ as _13 } from "./SelectCustomAll.vue_vue_type_style_index_0_lang-BEZwlGXa.js";
|
|
36
36
|
import { _ as _14 } from "./SelectTimePicker.vue_vue_type_script_setup_true_lang-Dk4TpTBN.js";
|
|
37
37
|
import { _ as _15 } from "./TextEllipsisTooltip.vue_vue_type_script_setup_true_lang-DVE1CxPm.js";
|
|
38
|
-
import { _ as _16 } from "./ViewImgPreview.vue_vue_type_style_index_0_lang-
|
|
39
|
-
import { D as D2, a as a2, b as b2, c, d as d2, e as e2, f as f2, g as g2, h, i as i2, j, k } from "./types-
|
|
38
|
+
import { _ as _16 } from "./ViewImgPreview.vue_vue_type_style_index_0_lang-C2i0p5IK.js";
|
|
39
|
+
import { D as D2, a as a2, b as b2, c, d as d2, e as e2, f as f2, g as g2, h, i as i2, j, k, l, N, r as r2, s } from "./types-Ccn_sb6f.js";
|
|
40
40
|
import { B } from "./ButtonGroup-DqViorHX.js";
|
|
41
41
|
import { C } from "./ContentTitle-By0Zk1u7.js";
|
|
42
42
|
import { C as C2 } from "./CustomInputV2-BqhBSO53.js";
|
|
@@ -46,7 +46,7 @@ import { F } from "./ErrorImage-CFVt1ht_.js";
|
|
|
46
46
|
import { H } from "./HSelect-DgFjd08Y.js";
|
|
47
47
|
import { H as H2 } from "./HSelectSJ-DOFUzTZV.js";
|
|
48
48
|
import { L } from "./LazyPopover-7ebuh-QG.js";
|
|
49
|
-
import { l } from "./loading-CGrVcnNl.js";
|
|
49
|
+
import { l as l2 } from "./loading-CGrVcnNl.js";
|
|
50
50
|
import { L as L2 } from "./LoadingBtn-DWm2cY9k.js";
|
|
51
51
|
import { M } from "./MInput-s_P63myh.js";
|
|
52
52
|
import { M as M2 } from "./MyTable-CHvxPYgk.js";
|
|
@@ -54,13 +54,13 @@ import { S } from "./SelectAddress-CCepDxu8.js";
|
|
|
54
54
|
import { S as S2 } from "./SelectTree-DUH92Iwr.js";
|
|
55
55
|
import { S as S3 } from "./SvgIcon-DIg0upEk.js";
|
|
56
56
|
import { T } from "./TextCopy-lpbeqOUI.js";
|
|
57
|
-
import { F as F2 } from "./ViewImg-
|
|
58
|
-
import { V } from "./ViewImgPopover-
|
|
59
|
-
import { I, P, g as g3, u, a as a3 } from "./imgViewerStore-
|
|
57
|
+
import { F as F2 } from "./ViewImg-DXhF20SL.js";
|
|
58
|
+
import { V } from "./ViewImgPopover-QblZG0z5.js";
|
|
59
|
+
import { I, P, g as g3, u, a as a3 } from "./imgViewerStore-DK3zvGf4.js";
|
|
60
60
|
import { V as V2 } from "./VirtualTable-Cm_L7q9W.js";
|
|
61
|
-
import { a as a4, b as b3, c as c2, d as d3, e as e3, f as f3, g as g4, h as h2, i as i3, j as j2, k as k2, l as
|
|
61
|
+
import { a as a4, b as b3, c as c2, d as d3, e as e3, f as f3, g as g4, h as h2, i as i3, j as j2, k as k2, l as l3, m as m2, n as n2, o, p, q, r as r3, s as s2, t as t2, u as u2, v, w, x, y, z, A, B as B2, C as C4, D as D4, E, F as F3, G, H as H3, I as I2, J, K, L as L3, M as M3, N as N2, O, P as P2, Q, R, S as S4, T as T2, U, V as V3, W, X, Y, Z, _ as _17, $, a0, a1, a2 as a22, a3 as a32, a4 as a42, a5, a6, a7, a8, a9, aa, ab, ac, ad, ae, af, ag, ah, ai, aj, ak, al, am, an, ao, ap, aq, ar, as } from "./common-D0EYVGB2.js";
|
|
62
62
|
import { detectFileType, formatFileSize, parseFile, parseFiles, parseImage, parseImageFile, parsePSD, parsePSDFile, parseTIFF, parseTIFFFile } from "./tools/ImageParserUtils/index.js";
|
|
63
|
-
import { s as
|
|
63
|
+
import { s as s3 } from "./dateShortcuts-DjFC_Txu.js";
|
|
64
64
|
import { u as u3 } from "./usePagination-C63IRXjZ.js";
|
|
65
65
|
function isDirectiveDef(v2) {
|
|
66
66
|
if (!v2 || typeof v2 !== "object") return false;
|
|
@@ -97,10 +97,11 @@ export {
|
|
|
97
97
|
e2 as DEFAULT_PREVIEW_MIN_SCALE,
|
|
98
98
|
f2 as DEFAULT_PREVIEW_SCALE,
|
|
99
99
|
g2 as DEFAULT_PREVIEW_SHOW_PROGRESS,
|
|
100
|
-
h as
|
|
101
|
-
i2 as
|
|
102
|
-
j as
|
|
103
|
-
k as
|
|
100
|
+
h as DEFAULT_PREVIEW_SIDE_NAV,
|
|
101
|
+
i2 as DEFAULT_PREVIEW_TELEPORTED,
|
|
102
|
+
j as DEFAULT_PREVIEW_ZOOM_RATE,
|
|
103
|
+
k as DEFAULT_TOOLBAR_BG_COLOR,
|
|
104
|
+
l as DEFAULT_TOOLBAR_ICON_COLOR,
|
|
104
105
|
_ as FgArgHover,
|
|
105
106
|
B as FgButtonGroup,
|
|
106
107
|
_2 as FgCascader,
|
|
@@ -119,7 +120,7 @@ export {
|
|
|
119
120
|
_8 as FgImgViewerHost,
|
|
120
121
|
_9 as FgLazyComponent,
|
|
121
122
|
L as FgLazyPopover,
|
|
122
|
-
|
|
123
|
+
l2 as FgLoading,
|
|
123
124
|
L2 as FgLoadingBtn,
|
|
124
125
|
M as FgMInput,
|
|
125
126
|
M2 as FgMyTable,
|
|
@@ -137,6 +138,7 @@ export {
|
|
|
137
138
|
V as FgViewImgPopover,
|
|
138
139
|
_16 as FgViewImgPreview,
|
|
139
140
|
I as ImgViewerStore,
|
|
141
|
+
N as NAV_TOOLBAR_KEYS,
|
|
140
142
|
P as PREVIEW_BASE_Z_INDEX,
|
|
141
143
|
V2 as VirtualTable,
|
|
142
144
|
a4 as aesDecrypt,
|
|
@@ -151,7 +153,7 @@ export {
|
|
|
151
153
|
j2 as cleanEmptyFields,
|
|
152
154
|
configureImgUrl,
|
|
153
155
|
k2 as convertImageFormat,
|
|
154
|
-
|
|
156
|
+
l3 as copyText,
|
|
155
157
|
m2 as copyWord,
|
|
156
158
|
n2 as createFileLocalUrl,
|
|
157
159
|
o as createUuid,
|
|
@@ -159,8 +161,8 @@ export {
|
|
|
159
161
|
q as debounce,
|
|
160
162
|
index as default,
|
|
161
163
|
detectFileType,
|
|
162
|
-
|
|
163
|
-
|
|
164
|
+
r3 as dropperColor,
|
|
165
|
+
s2 as fileUrlToBase64,
|
|
164
166
|
t2 as filterCountryAreaCodeList,
|
|
165
167
|
u2 as filterMethodLowerCase,
|
|
166
168
|
v as filterSearch,
|
|
@@ -183,7 +185,7 @@ export {
|
|
|
183
185
|
g3 as getDialogZindex,
|
|
184
186
|
L3 as getFileFolderToEnums,
|
|
185
187
|
M3 as getFilenameAndExtension,
|
|
186
|
-
|
|
188
|
+
N2 as getImageSizeByFile,
|
|
187
189
|
g as getImgFasten,
|
|
188
190
|
O as getMobileSubmitParams,
|
|
189
191
|
a as getNetworkAdaptiveOptions,
|
|
@@ -236,7 +238,9 @@ export {
|
|
|
236
238
|
ag as pwdReg,
|
|
237
239
|
ah as ratioToNumber,
|
|
238
240
|
r as replaceUnsupportedImg,
|
|
239
|
-
|
|
241
|
+
r2 as resolvePreviewSideNav,
|
|
242
|
+
s3 as shortcuts,
|
|
243
|
+
s as shouldShowPreviewSideNav,
|
|
240
244
|
ai as sleep,
|
|
241
245
|
aj as splitArray,
|
|
242
246
|
ak as strPasteJson,
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
const DEFAULT_ORIGINAL_TOOLBAR = [
|
|
2
|
+
"zoomOut",
|
|
3
|
+
"zoomIn",
|
|
4
|
+
"anticlockwise",
|
|
5
|
+
"clockwise",
|
|
6
|
+
"reset"
|
|
7
|
+
];
|
|
8
|
+
const NAV_TOOLBAR_KEYS = ["prev", "next", "fistImg", "lastImg"];
|
|
9
|
+
const DEFAULT_PREVIEW_SIDE_NAV = "both";
|
|
10
|
+
function resolvePreviewSideNav(previewSideNav, imageCount, toolbar, hasExtraTools = false) {
|
|
11
|
+
if (imageCount <= 1) return "none";
|
|
12
|
+
if (previewSideNav === false) return "none";
|
|
13
|
+
if (previewSideNav === "prev") return "prev";
|
|
14
|
+
if (previewSideNav === "next") return "next";
|
|
15
|
+
if (toolbar.length > 0 || hasExtraTools) return "both";
|
|
16
|
+
return "none";
|
|
17
|
+
}
|
|
18
|
+
function shouldShowPreviewSideNav(imageCount, toolbar, hasExtraTools = false) {
|
|
19
|
+
return resolvePreviewSideNav(DEFAULT_PREVIEW_SIDE_NAV, imageCount, toolbar, hasExtraTools) === "both";
|
|
20
|
+
}
|
|
21
|
+
const DEFAULT_TOOLBAR_BG_COLOR = "#606266";
|
|
22
|
+
const DEFAULT_TOOLBAR_ICON_COLOR = "#ffffff";
|
|
23
|
+
const DEFAULT_PREVIEW_HIDE_ON_CLICK_MODAL = false;
|
|
24
|
+
const DEFAULT_PREVIEW_CLOSE_ON_PRESS_ESCAPE = true;
|
|
25
|
+
const DEFAULT_PREVIEW_TELEPORTED = true;
|
|
26
|
+
const DEFAULT_PREVIEW_INFINITE = true;
|
|
27
|
+
const DEFAULT_PREVIEW_ZOOM_RATE = 1.2;
|
|
28
|
+
const DEFAULT_PREVIEW_SCALE = 1;
|
|
29
|
+
const DEFAULT_PREVIEW_MIN_SCALE = 0.2;
|
|
30
|
+
const DEFAULT_PREVIEW_MAX_SCALE = 7;
|
|
31
|
+
const DEFAULT_PREVIEW_SHOW_PROGRESS = false;
|
|
32
|
+
export {
|
|
33
|
+
DEFAULT_ORIGINAL_TOOLBAR as D,
|
|
34
|
+
NAV_TOOLBAR_KEYS as N,
|
|
35
|
+
DEFAULT_PREVIEW_CLOSE_ON_PRESS_ESCAPE as a,
|
|
36
|
+
DEFAULT_PREVIEW_HIDE_ON_CLICK_MODAL as b,
|
|
37
|
+
DEFAULT_PREVIEW_INFINITE as c,
|
|
38
|
+
DEFAULT_PREVIEW_MAX_SCALE as d,
|
|
39
|
+
DEFAULT_PREVIEW_MIN_SCALE as e,
|
|
40
|
+
DEFAULT_PREVIEW_SCALE as f,
|
|
41
|
+
DEFAULT_PREVIEW_SHOW_PROGRESS as g,
|
|
42
|
+
DEFAULT_PREVIEW_SIDE_NAV as h,
|
|
43
|
+
DEFAULT_PREVIEW_TELEPORTED as i,
|
|
44
|
+
DEFAULT_PREVIEW_ZOOM_RATE as j,
|
|
45
|
+
DEFAULT_TOOLBAR_BG_COLOR as k,
|
|
46
|
+
DEFAULT_TOOLBAR_ICON_COLOR as l,
|
|
47
|
+
resolvePreviewSideNav as r,
|
|
48
|
+
shouldShowPreviewSideNav as s
|
|
49
|
+
};
|
package/package.json
CHANGED
|
@@ -1,275 +0,0 @@
|
|
|
1
|
-
import './ViewImgPopover.css';var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
var __objRest = (source, exclude) => {
|
|
21
|
-
var target = {};
|
|
22
|
-
for (var prop in source)
|
|
23
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
-
target[prop] = source[prop];
|
|
25
|
-
if (source != null && __getOwnPropSymbols)
|
|
26
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
-
target[prop] = source[prop];
|
|
29
|
-
}
|
|
30
|
-
return target;
|
|
31
|
-
};
|
|
32
|
-
import { ElWatermark } from "element-plus/es";
|
|
33
|
-
import { defineComponent, useAttrs, ref, computed, openBlock, createBlock, withCtx, createElementBlock, Fragment, normalizeStyle, createSlots, renderSlot, createVNode, createCommentVNode, mergeProps, unref } from "vue";
|
|
34
|
-
import { L as LazyPopover } from "./LazyPopover-7ebuh-QG.js";
|
|
35
|
-
import { F as FgViewImg } from "./ViewImg-Bg1AQ0T6.js";
|
|
36
|
-
import { m as montageImgUrl } from "./montageImgUrl-CwgYnB2h.js";
|
|
37
|
-
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.js";
|
|
38
|
-
const HOVER_POPOVER_PADDING = 10;
|
|
39
|
-
const HOVER_POPOVER_MAX_HEIGHT = 400;
|
|
40
|
-
const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
|
|
41
|
-
inheritAttrs: false
|
|
42
|
-
}), {
|
|
43
|
-
__name: "ViewImgPopover",
|
|
44
|
-
props: {
|
|
45
|
-
src: { default: "" },
|
|
46
|
-
fit: {},
|
|
47
|
-
lazy: { type: Boolean },
|
|
48
|
-
loading: { type: Boolean },
|
|
49
|
-
preview: { type: Boolean },
|
|
50
|
-
previewSrcList: {},
|
|
51
|
-
initialIndex: {},
|
|
52
|
-
defImgPreviewIndex: {},
|
|
53
|
-
infinite: { type: Boolean },
|
|
54
|
-
zIndex: {},
|
|
55
|
-
hideOnClickModal: { type: Boolean },
|
|
56
|
-
closeOnPressEscape: { type: Boolean },
|
|
57
|
-
previewTeleported: { type: Boolean },
|
|
58
|
-
teleported: { type: Boolean },
|
|
59
|
-
zoomRate: {},
|
|
60
|
-
scale: {},
|
|
61
|
-
minScale: {},
|
|
62
|
-
maxScale: {},
|
|
63
|
-
showProgress: { type: Boolean },
|
|
64
|
-
toolbarBgColor: {},
|
|
65
|
-
backgroundColor: {},
|
|
66
|
-
toolbarIconColor: {},
|
|
67
|
-
simpleExtraTools: {},
|
|
68
|
-
renderExtraTools: {},
|
|
69
|
-
originalToolbar: {},
|
|
70
|
-
errorColor: {},
|
|
71
|
-
errorOffset: {},
|
|
72
|
-
errorText: {},
|
|
73
|
-
ossProcess: { type: Boolean },
|
|
74
|
-
ossLinks: {},
|
|
75
|
-
imgSize: {},
|
|
76
|
-
previewStripQuery: { type: Boolean },
|
|
77
|
-
hoverSrc: { default: "" },
|
|
78
|
-
hoverImgSize: { default: void 0 },
|
|
79
|
-
hoverPopoverProps: { default: () => ({}) },
|
|
80
|
-
isShowWatermark: { type: Boolean, default: false },
|
|
81
|
-
waterMarkTitle: { default: "" }
|
|
82
|
-
},
|
|
83
|
-
emits: ["load", "error", "retry", "show", "close", "switch"],
|
|
84
|
-
setup(__props, { emit: __emit }) {
|
|
85
|
-
const props = __props;
|
|
86
|
-
const emit = __emit;
|
|
87
|
-
const attrs = useAttrs();
|
|
88
|
-
const viewImgRef = ref(null);
|
|
89
|
-
const viewImgProps = computed(() => {
|
|
90
|
-
const _a = props, {
|
|
91
|
-
hoverSrc: _h,
|
|
92
|
-
hoverImgSize: _hi,
|
|
93
|
-
hoverPopoverProps: _hp,
|
|
94
|
-
isShowWatermark: _w,
|
|
95
|
-
waterMarkTitle: _wt
|
|
96
|
-
} = _a, rest = __objRest(_a, [
|
|
97
|
-
"hoverSrc",
|
|
98
|
-
"hoverImgSize",
|
|
99
|
-
"hoverPopoverProps",
|
|
100
|
-
"isShowWatermark",
|
|
101
|
-
"waterMarkTitle"
|
|
102
|
-
]);
|
|
103
|
-
return rest;
|
|
104
|
-
});
|
|
105
|
-
function mergePopperStyle(base, extra) {
|
|
106
|
-
if (!extra) return base;
|
|
107
|
-
if (typeof extra === "string") return extra;
|
|
108
|
-
return __spreadValues(__spreadValues({}, base), extra);
|
|
109
|
-
}
|
|
110
|
-
const HOVER_POPOVER_MAX_HEIGHT_CSS = `${HOVER_POPOVER_MAX_HEIGHT}px`;
|
|
111
|
-
const HOVER_IMAGE_MAX_HEIGHT_CSS = `${HOVER_POPOVER_MAX_HEIGHT - HOVER_POPOVER_PADDING * 2}px`;
|
|
112
|
-
const hoverPopoverPropsMerged = computed(() => {
|
|
113
|
-
var _a;
|
|
114
|
-
const _b = (_a = props.hoverPopoverProps) != null ? _a : {}, { popperStyle: userPopperStyle, popperClass: userPopperClass } = _b, restHoverPopoverProps = __objRest(_b, ["popperStyle", "popperClass"]);
|
|
115
|
-
const popperClass = [userPopperClass, "fg-view-img-popover"].filter(Boolean).join(" ");
|
|
116
|
-
return __spreadValues({
|
|
117
|
-
placement: "right",
|
|
118
|
-
trigger: "hover",
|
|
119
|
-
width: 400,
|
|
120
|
-
teleported: true,
|
|
121
|
-
popperClass,
|
|
122
|
-
popperStyle: mergePopperStyle(
|
|
123
|
-
{
|
|
124
|
-
maxHeight: HOVER_POPOVER_MAX_HEIGHT_CSS,
|
|
125
|
-
overflow: "hidden",
|
|
126
|
-
padding: `${HOVER_POPOVER_PADDING}px`,
|
|
127
|
-
boxSizing: "border-box"
|
|
128
|
-
},
|
|
129
|
-
userPopperStyle
|
|
130
|
-
)
|
|
131
|
-
}, restHoverPopoverProps);
|
|
132
|
-
});
|
|
133
|
-
function stripQueryParams(url) {
|
|
134
|
-
const index = url.indexOf("?");
|
|
135
|
-
return index === -1 ? url : url.slice(0, index);
|
|
136
|
-
}
|
|
137
|
-
function resolveImgUrl(url, imgSize) {
|
|
138
|
-
if (!props.ossProcess) return url;
|
|
139
|
-
return montageImgUrl(url, imgSize, props.ossLinks ? { ossLinks: props.ossLinks } : void 0);
|
|
140
|
-
}
|
|
141
|
-
function applyPreviewUrlFallback(url) {
|
|
142
|
-
if (!props.previewStripQuery || !url) return url;
|
|
143
|
-
return stripQueryParams(url);
|
|
144
|
-
}
|
|
145
|
-
function resolvePreviewImgUrl(url, imgSize) {
|
|
146
|
-
return applyPreviewUrlFallback(resolveImgUrl(url, imgSize));
|
|
147
|
-
}
|
|
148
|
-
function resolveViewImgDisplaySrc() {
|
|
149
|
-
var _a;
|
|
150
|
-
const fromRef = (_a = viewImgRef.value) == null ? void 0 : _a.displaySrc;
|
|
151
|
-
if (fromRef) return fromRef;
|
|
152
|
-
if (!props.src) return "";
|
|
153
|
-
return resolveImgUrl(props.src, props.imgSize);
|
|
154
|
-
}
|
|
155
|
-
const hoverPreviewSrc = computed(() => {
|
|
156
|
-
var _a, _b, _c;
|
|
157
|
-
const displaySrc = resolveViewImgDisplaySrc();
|
|
158
|
-
const retried = (_b = (_a = viewImgRef.value) == null ? void 0 : _a.retried) != null ? _b : false;
|
|
159
|
-
if (props.hoverSrc) {
|
|
160
|
-
return resolvePreviewImgUrl(props.hoverSrc, (_c = props.hoverImgSize) != null ? _c : props.imgSize);
|
|
161
|
-
}
|
|
162
|
-
if (!props.src) return displaySrc || "";
|
|
163
|
-
if (!props.hoverImgSize) return displaySrc || "";
|
|
164
|
-
let url = resolveImgUrl(props.src, props.hoverImgSize);
|
|
165
|
-
if (retried) url = stripQueryParams(url);
|
|
166
|
-
return applyPreviewUrlFallback(url);
|
|
167
|
-
});
|
|
168
|
-
const hoverImgStyle = computed(() => ({
|
|
169
|
-
display: "block",
|
|
170
|
-
maxWidth: "100%",
|
|
171
|
-
maxHeight: HOVER_IMAGE_MAX_HEIGHT_CSS,
|
|
172
|
-
width: "auto",
|
|
173
|
-
height: "auto",
|
|
174
|
-
minWidth: "120px",
|
|
175
|
-
minHeight: "120px",
|
|
176
|
-
objectFit: "contain"
|
|
177
|
-
}));
|
|
178
|
-
return (_ctx, _cache) => {
|
|
179
|
-
const _component_el_watermark = ElWatermark;
|
|
180
|
-
return openBlock(), createBlock(LazyPopover, {
|
|
181
|
-
class: "fg-view-img-popover__trigger",
|
|
182
|
-
props: hoverPopoverPropsMerged.value
|
|
183
|
-
}, {
|
|
184
|
-
reference: withCtx(() => [
|
|
185
|
-
createVNode(FgViewImg, mergeProps({
|
|
186
|
-
ref_key: "viewImgRef",
|
|
187
|
-
ref: viewImgRef,
|
|
188
|
-
class: unref(attrs).class,
|
|
189
|
-
style: unref(attrs).style
|
|
190
|
-
}, viewImgProps.value, {
|
|
191
|
-
onLoad: _cache[0] || (_cache[0] = (e) => emit("load", e)),
|
|
192
|
-
onError: _cache[1] || (_cache[1] = (e) => emit("error", e)),
|
|
193
|
-
onRetry: _cache[2] || (_cache[2] = (p) => emit("retry", p)),
|
|
194
|
-
onShow: _cache[3] || (_cache[3] = (p) => emit("show", p)),
|
|
195
|
-
onClose: _cache[4] || (_cache[4] = ($event) => emit("close")),
|
|
196
|
-
onSwitch: _cache[5] || (_cache[5] = (i) => emit("switch", i))
|
|
197
|
-
}), createSlots({ _: 2 }, [
|
|
198
|
-
_ctx.$slots.placeholder ? {
|
|
199
|
-
name: "placeholder",
|
|
200
|
-
fn: withCtx(() => [
|
|
201
|
-
renderSlot(_ctx.$slots, "placeholder", {}, void 0, true)
|
|
202
|
-
]),
|
|
203
|
-
key: "0"
|
|
204
|
-
} : void 0,
|
|
205
|
-
_ctx.$slots.error ? {
|
|
206
|
-
name: "error",
|
|
207
|
-
fn: withCtx(() => [
|
|
208
|
-
renderSlot(_ctx.$slots, "error", {}, void 0, true)
|
|
209
|
-
]),
|
|
210
|
-
key: "1"
|
|
211
|
-
} : void 0
|
|
212
|
-
]), 1040, ["class", "style"])
|
|
213
|
-
]),
|
|
214
|
-
default: withCtx(() => [
|
|
215
|
-
hoverPreviewSrc.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
216
|
-
!__props.isShowWatermark ? (openBlock(), createBlock(FgViewImg, {
|
|
217
|
-
key: 0,
|
|
218
|
-
class: "fg-view-img-popover__hover-image",
|
|
219
|
-
src: hoverPreviewSrc.value,
|
|
220
|
-
style: normalizeStyle(hoverImgStyle.value),
|
|
221
|
-
preview: false,
|
|
222
|
-
"oss-process": false,
|
|
223
|
-
"error-color": __props.errorColor,
|
|
224
|
-
"error-offset": __props.errorOffset,
|
|
225
|
-
"error-text": __props.errorText,
|
|
226
|
-
fit: "contain"
|
|
227
|
-
}, createSlots({ _: 2 }, [
|
|
228
|
-
_ctx.$slots.error ? {
|
|
229
|
-
name: "error",
|
|
230
|
-
fn: withCtx(() => [
|
|
231
|
-
renderSlot(_ctx.$slots, "error", {}, void 0, true)
|
|
232
|
-
]),
|
|
233
|
-
key: "0"
|
|
234
|
-
} : void 0
|
|
235
|
-
]), 1032, ["src", "style", "error-color", "error-offset", "error-text"])) : (openBlock(), createBlock(_component_el_watermark, {
|
|
236
|
-
key: 1,
|
|
237
|
-
class: "fg-view-img-popover__watermark",
|
|
238
|
-
content: [__props.waterMarkTitle],
|
|
239
|
-
gap: [10, 10],
|
|
240
|
-
font: { fontSize: 16, color: "rgba(0, 0, 0, 0.3)" }
|
|
241
|
-
}, {
|
|
242
|
-
default: withCtx(() => [
|
|
243
|
-
createVNode(FgViewImg, {
|
|
244
|
-
class: "fg-view-img-popover__hover-image",
|
|
245
|
-
src: hoverPreviewSrc.value,
|
|
246
|
-
style: normalizeStyle(hoverImgStyle.value),
|
|
247
|
-
preview: false,
|
|
248
|
-
"oss-process": false,
|
|
249
|
-
"error-color": __props.errorColor,
|
|
250
|
-
"error-offset": __props.errorOffset,
|
|
251
|
-
"error-text": __props.errorText,
|
|
252
|
-
fit: "contain"
|
|
253
|
-
}, createSlots({ _: 2 }, [
|
|
254
|
-
_ctx.$slots.error ? {
|
|
255
|
-
name: "error",
|
|
256
|
-
fn: withCtx(() => [
|
|
257
|
-
renderSlot(_ctx.$slots, "error", {}, void 0, true)
|
|
258
|
-
]),
|
|
259
|
-
key: "0"
|
|
260
|
-
} : void 0
|
|
261
|
-
]), 1032, ["src", "style", "error-color", "error-offset", "error-text"])
|
|
262
|
-
]),
|
|
263
|
-
_: 3
|
|
264
|
-
}, 8, ["content"]))
|
|
265
|
-
], 64)) : createCommentVNode("", true)
|
|
266
|
-
]),
|
|
267
|
-
_: 3
|
|
268
|
-
}, 8, ["props"]);
|
|
269
|
-
};
|
|
270
|
-
}
|
|
271
|
-
}));
|
|
272
|
-
const ViewImgPopover = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6955cede"]]);
|
|
273
|
-
export {
|
|
274
|
-
ViewImgPopover as V
|
|
275
|
-
};
|
package/dist/types-BNFeGRer.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
const DEFAULT_ORIGINAL_TOOLBAR = [
|
|
2
|
-
"zoomOut",
|
|
3
|
-
"zoomIn",
|
|
4
|
-
"anticlockwise",
|
|
5
|
-
"clockwise",
|
|
6
|
-
"reset"
|
|
7
|
-
];
|
|
8
|
-
const DEFAULT_TOOLBAR_BG_COLOR = "#606266";
|
|
9
|
-
const DEFAULT_TOOLBAR_ICON_COLOR = "#ffffff";
|
|
10
|
-
const DEFAULT_PREVIEW_HIDE_ON_CLICK_MODAL = false;
|
|
11
|
-
const DEFAULT_PREVIEW_CLOSE_ON_PRESS_ESCAPE = true;
|
|
12
|
-
const DEFAULT_PREVIEW_TELEPORTED = true;
|
|
13
|
-
const DEFAULT_PREVIEW_INFINITE = true;
|
|
14
|
-
const DEFAULT_PREVIEW_ZOOM_RATE = 1.2;
|
|
15
|
-
const DEFAULT_PREVIEW_SCALE = 1;
|
|
16
|
-
const DEFAULT_PREVIEW_MIN_SCALE = 0.2;
|
|
17
|
-
const DEFAULT_PREVIEW_MAX_SCALE = 7;
|
|
18
|
-
const DEFAULT_PREVIEW_SHOW_PROGRESS = false;
|
|
19
|
-
export {
|
|
20
|
-
DEFAULT_ORIGINAL_TOOLBAR as D,
|
|
21
|
-
DEFAULT_PREVIEW_CLOSE_ON_PRESS_ESCAPE as a,
|
|
22
|
-
DEFAULT_PREVIEW_HIDE_ON_CLICK_MODAL as b,
|
|
23
|
-
DEFAULT_PREVIEW_INFINITE as c,
|
|
24
|
-
DEFAULT_PREVIEW_MAX_SCALE as d,
|
|
25
|
-
DEFAULT_PREVIEW_MIN_SCALE as e,
|
|
26
|
-
DEFAULT_PREVIEW_SCALE as f,
|
|
27
|
-
DEFAULT_PREVIEW_SHOW_PROGRESS as g,
|
|
28
|
-
DEFAULT_PREVIEW_TELEPORTED as h,
|
|
29
|
-
DEFAULT_PREVIEW_ZOOM_RATE as i,
|
|
30
|
-
DEFAULT_TOOLBAR_BG_COLOR as j,
|
|
31
|
-
DEFAULT_TOOLBAR_ICON_COLOR as k
|
|
32
|
-
};
|