vft 0.0.128 → 0.0.129
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 +1 -1
- package/es/components/backtop/backtop.vue2.js +21 -21
- package/es/components/button/button.vue2.js +1 -1
- package/es/components/button/use-button.js +3 -3
- package/es/components/color-picker/color-picker.vue2.js +2 -2
- package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +33 -33
- package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +26 -26
- package/es/components/date-picker/date-picker-com/panel-month-range.vue2.js +13 -13
- package/es/components/date-time-select/date-time-select.vue2.js +3 -3
- package/es/components/dialog/dialog-content.vue2.js +1 -1
- package/es/components/drawer/drawer.vue2.js +9 -9
- package/es/components/dropdown/dropdown.vue2.js +1 -1
- package/es/components/full-screen/full-screen.vue2.js +11 -11
- package/es/components/icon/icon.vue2.js +3 -1
- package/es/components/icon-text/icon-text.vue2.js +22 -22
- package/es/components/image-viewer/image-viewer.vue2.js +35 -35
- package/es/components/index.js +113 -113
- package/es/components/input/input.vue2.js +37 -33
- package/es/components/input-number/input-number.vue2.js +25 -25
- package/es/components/list-cell/list-cell.vue2.js +14 -14
- package/es/components/md-code-demo/md-code-demo.js +3 -3
- package/es/components/md-container/md-container.vue2.js +13 -13
- package/es/components/md-vue-playground/md-vue-playground.vue2.js +8 -8
- package/es/components/menu/menu.vue2.js +1 -1
- package/es/components/menu/sub-menu.vue2.js +2 -2
- package/es/components/message/message.vue2.js +4 -4
- package/es/components/multiple-tabs/use/use-tab-dropdown.js +10 -10
- package/es/components/pagination/components/next.vue2.js +5 -5
- package/es/components/pagination/components/pager.vue2.js +40 -40
- package/es/components/pagination/components/prev.vue2.js +5 -5
- package/es/components/popconfirm/popconfirm.vue2.js +1 -1
- package/es/components/progress/progress.vue2.js +13 -13
- package/es/components/search/search.vue2.js +1 -1
- package/es/components/select/select.vue.js +1 -1
- package/es/components/select/useSelect.js +1 -1
- package/es/components/side-menu/side-menu.vue2.js +24 -24
- package/es/components/skeleton/skeleton-item.vue2.js +5 -5
- package/es/components/switch/switch.vue2.js +1 -1
- package/es/components/tabs/tabs.vue2.js +4 -4
- package/es/components/tag/tag.vue2.js +1 -1
- package/es/components/time-picker/common/picker.vue2.js +1 -1
- package/es/components/time-picker/common/props.js +1 -1
- package/es/components/time-picker/time-picker-com/basic-time-spinner.vue2.js +2 -2
- package/es/components/tree/tree-node.vue.js +9 -9
- package/es/components/upload/upload-list.vue2.js +33 -33
- package/es/index.js +113 -113
- package/es/package.json.js +1 -1
- package/lib/components/backtop/backtop.vue2.cjs +1 -1
- package/lib/components/button/button.vue2.cjs +1 -1
- package/lib/components/button/use-button.cjs +1 -1
- package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-date-range.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-month-range.vue2.cjs +1 -1
- package/lib/components/date-time-select/date-time-select.vue2.cjs +1 -1
- package/lib/components/dialog/dialog-content.vue2.cjs +1 -1
- package/lib/components/drawer/drawer.vue2.cjs +1 -1
- package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
- package/lib/components/full-screen/full-screen.vue2.cjs +1 -1
- package/lib/components/icon/icon.vue2.cjs +1 -1
- package/lib/components/icon-text/icon-text.vue2.cjs +1 -1
- package/lib/components/image-viewer/image-viewer.vue2.cjs +1 -1
- package/lib/components/index.cjs +1 -1
- package/lib/components/input/input.vue2.cjs +1 -1
- package/lib/components/input-number/input-number.vue2.cjs +1 -1
- package/lib/components/list-cell/list-cell.vue2.cjs +1 -1
- package/lib/components/md-code-demo/md-code-demo.cjs +1 -1
- package/lib/components/md-container/md-container.vue2.cjs +1 -1
- package/lib/components/md-vue-playground/md-vue-playground.vue2.cjs +1 -1
- package/lib/components/menu/menu.vue2.cjs +1 -1
- package/lib/components/menu/sub-menu.vue2.cjs +1 -1
- package/lib/components/message/message.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/use/use-tab-dropdown.cjs +1 -1
- package/lib/components/pagination/components/next.vue2.cjs +1 -1
- package/lib/components/pagination/components/pager.vue2.cjs +1 -1
- package/lib/components/pagination/components/prev.vue2.cjs +1 -1
- package/lib/components/popconfirm/popconfirm.vue2.cjs +1 -1
- package/lib/components/progress/progress.vue2.cjs +2 -2
- package/lib/components/search/search.vue2.cjs +1 -1
- package/lib/components/select/select.vue.cjs +1 -1
- package/lib/components/select/useSelect.cjs +1 -1
- package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
- package/lib/components/skeleton/skeleton-item.vue2.cjs +1 -1
- package/lib/components/switch/switch.vue2.cjs +1 -1
- package/lib/components/tabs/tabs.vue2.cjs +1 -1
- package/lib/components/tag/tag.vue2.cjs +1 -1
- package/lib/components/time-picker/common/picker.vue2.cjs +1 -1
- package/lib/components/time-picker/common/props.cjs +1 -1
- package/lib/components/time-picker/time-picker-com/basic-time-spinner.vue2.cjs +1 -1
- package/lib/components/tree/tree-node.vue.cjs +1 -1
- package/lib/components/upload/upload-list.vue2.cjs +1 -1
- package/lib/index.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/package.json +2 -2
- package/theme-style/index.css +1 -1
- package/theme-style/src/backtop.scss +4 -0
- package/theme-style/src/button.scss +4 -0
- package/theme-style/src/color-picker.scss +3 -0
- package/theme-style/src/common/icon.scss +65 -0
- package/theme-style/src/common/var.scss +4 -0
- package/theme-style/src/date-picker/date-picker.scss +14 -0
- package/theme-style/src/date-picker/time-picker.scss +4 -0
- package/theme-style/src/date-picker.scss +1 -0
- package/theme-style/src/date-time-select.scss +8 -1
- package/theme-style/src/dialog.scss +2 -0
- package/theme-style/src/drawer.scss +2 -0
- package/theme-style/src/dropdown.scss +2 -0
- package/theme-style/src/full-screen.scss +8 -1
- package/theme-style/src/icon-text.scss +4 -0
- package/theme-style/src/image-viewer.scss +19 -1
- package/theme-style/src/input-number.scss +9 -0
- package/theme-style/src/input.scss +22 -0
- package/theme-style/src/list-cell.scss +2 -0
- package/theme-style/src/md-container.scss +28 -0
- package/theme-style/src/menu.scss +11 -4
- package/theme-style/src/message.scss +10 -0
- package/theme-style/src/mixins/icon.scss +52 -0
- package/theme-style/src/mixins/mixins.scss +1 -0
- package/theme-style/src/multiple-tabs.scss +22 -0
- package/theme-style/src/pagination.scss +15 -0
- package/theme-style/src/popconfirm.scss +4 -0
- package/theme-style/src/progress.scss +16 -0
- package/theme-style/src/select.scss +3 -0
- package/theme-style/src/side-menu.scss +4 -0
- package/theme-style/src/skeleton-item.scss +5 -0
- package/theme-style/src/switch.scss +4 -0
- package/theme-style/src/tabs.scss +7 -0
- package/theme-style/src/tag.scss +2 -0
- package/theme-style/src/tree.scss +7 -0
- package/theme-style/src/upload.scss +25 -4
- package/theme-style/vft-backtop.css +1 -1
- package/theme-style/vft-button.css +1 -1
- package/theme-style/vft-color-picker.css +1 -1
- package/theme-style/vft-date-picker.css +1 -1
- package/theme-style/vft-date-time-select.css +1 -1
- package/theme-style/vft-dialog.css +1 -1
- package/theme-style/vft-drawer.css +1 -1
- package/theme-style/vft-dropdown.css +1 -1
- package/theme-style/vft-full-screen.css +1 -1
- package/theme-style/vft-icon-text.css +1 -1
- package/theme-style/vft-image-viewer.css +1 -1
- package/theme-style/vft-input-number.css +1 -1
- package/theme-style/vft-input.css +1 -1
- package/theme-style/vft-list-cell.css +1 -1
- package/theme-style/vft-md-container.css +1 -1
- package/theme-style/vft-menu.css +1 -1
- package/theme-style/vft-message.css +1 -1
- package/theme-style/vft-multiple-tabs.css +1 -1
- package/theme-style/vft-pagination.css +1 -1
- package/theme-style/vft-popconfirm.css +1 -1
- package/theme-style/vft-progress.css +1 -1
- package/theme-style/vft-select.css +1 -1
- package/theme-style/vft-side-menu.css +1 -1
- package/theme-style/vft-skeleton-item.css +1 -1
- package/theme-style/vft-switch.css +1 -1
- package/theme-style/vft-tabs.css +1 -1
- package/theme-style/vft-tag.css +1 -1
- package/theme-style/vft-time-picker.css +1 -1
- package/theme-style/vft-time-select.css +1 -1
- package/theme-style/vft-tree.css +1 -1
- package/theme-style/vft-upload.css +1 -1
- package/web-types.json +1 -1
|
@@ -59,7 +59,7 @@ const Z = ["aria-label", "aria-labelledby", "aria-describedby"], _ = ["id"], x =
|
|
|
59
59
|
closeAutoFocus: () => !0
|
|
60
60
|
},
|
|
61
61
|
setup(s, { expose: g }) {
|
|
62
|
-
const E = L(),
|
|
62
|
+
const E = L(), c = B(), {
|
|
63
63
|
afterEnter: z,
|
|
64
64
|
afterLeave: A,
|
|
65
65
|
beforeLeave: R,
|
|
@@ -71,7 +71,7 @@ const Z = ["aria-label", "aria-labelledby", "aria-describedby"], _ = ["id"], x =
|
|
|
71
71
|
onCloseAutoFocus: ae,
|
|
72
72
|
onCloseRequested: F,
|
|
73
73
|
onFocusoutPrevented: se,
|
|
74
|
-
titleId:
|
|
74
|
+
titleId: p,
|
|
75
75
|
bodyId: b,
|
|
76
76
|
closed: re,
|
|
77
77
|
style: de,
|
|
@@ -79,7 +79,7 @@ const Z = ["aria-label", "aria-labelledby", "aria-describedby"], _ = ["id"], x =
|
|
|
79
79
|
rendered: I,
|
|
80
80
|
visible: m,
|
|
81
81
|
zIndex: S
|
|
82
|
-
} = Y(E.props,
|
|
82
|
+
} = Y(E.props, c), v = B(), V = k(
|
|
83
83
|
() => s.direction === "rtl" || s.direction === "ltr"
|
|
84
84
|
), C = k(() => G(s.size));
|
|
85
85
|
return g({
|
|
@@ -105,17 +105,17 @@ const Z = ["aria-label", "aria-labelledby", "aria-describedby"], _ = ["id"], x =
|
|
|
105
105
|
u(e(J), {
|
|
106
106
|
loop: "",
|
|
107
107
|
trapped: e(m),
|
|
108
|
-
"focus-trap-el":
|
|
108
|
+
"focus-trap-el": c.value,
|
|
109
109
|
"focus-start-el": v.value,
|
|
110
110
|
onReleaseRequested: e(F)
|
|
111
111
|
}, {
|
|
112
112
|
default: y(() => [
|
|
113
113
|
h("div", P({
|
|
114
114
|
ref_key: "drawerRef",
|
|
115
|
-
ref:
|
|
115
|
+
ref: c,
|
|
116
116
|
"aria-modal": "true",
|
|
117
117
|
"aria-label": o.title || void 0,
|
|
118
|
-
"aria-labelledby": o.title ? void 0 : e(
|
|
118
|
+
"aria-labelledby": o.title ? void 0 : e(p),
|
|
119
119
|
"aria-describedby": e(b)
|
|
120
120
|
}, o.$attrs, {
|
|
121
121
|
class: [e(t).b(), o.direction, e(m) && "open", o.customClass],
|
|
@@ -137,12 +137,12 @@ const Z = ["aria-label", "aria-labelledby", "aria-describedby"], _ = ["id"], x =
|
|
|
137
137
|
o.$slots.title ? f(o.$slots, "title", { key: 1 }) : f(o.$slots, "header", {
|
|
138
138
|
key: 0,
|
|
139
139
|
close: e(n),
|
|
140
|
-
titleId: e(
|
|
140
|
+
titleId: e(p),
|
|
141
141
|
titleClass: e(t).e("title")
|
|
142
142
|
}, () => [
|
|
143
143
|
o.$slots.title ? d("", !0) : (a(), r("span", {
|
|
144
144
|
key: 0,
|
|
145
|
-
id: e(
|
|
145
|
+
id: e(p),
|
|
146
146
|
role: "heading",
|
|
147
147
|
class: l(e(t).e("title"))
|
|
148
148
|
}, H(o.title), 11, _))
|
|
@@ -155,7 +155,7 @@ const Z = ["aria-label", "aria-labelledby", "aria-describedby"], _ = ["id"], x =
|
|
|
155
155
|
(...$) => e(n) && e(n)(...$))
|
|
156
156
|
}, [
|
|
157
157
|
u(e(K), {
|
|
158
|
-
icon: "
|
|
158
|
+
icon: "icon-close",
|
|
159
159
|
class: l(e(t).e("close"))
|
|
160
160
|
}, null, 8, ["class"])
|
|
161
161
|
], 2)) : d("", !0)
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as r, openBlock as
|
|
1
|
+
import { defineComponent as r, openBlock as i, createBlock as s, unref as o, mergeProps as p } from "vue";
|
|
2
2
|
import { useFullscreen as m } from "@vft/use";
|
|
3
3
|
import { delObjAttrNotExist as a } from "@vft/utils";
|
|
4
4
|
import { VftIconText as u } from "../icon-text/index.js";
|
|
5
5
|
import "@vueuse/core";
|
|
6
6
|
import { primaryColor as f } from "../../utils/ns-cover.js";
|
|
7
7
|
import "lodash";
|
|
8
|
-
import { useNamespace as
|
|
8
|
+
import { useNamespace as _ } from "../../hooks/use-namespace/index.js";
|
|
9
9
|
import "@popperjs/core";
|
|
10
10
|
import "../../hooks/use-z-index/index.js";
|
|
11
|
-
const
|
|
11
|
+
const d = (
|
|
12
12
|
/* hoist-static*/
|
|
13
|
-
|
|
14
|
-
),
|
|
13
|
+
_("full-screen")
|
|
14
|
+
), x = r({
|
|
15
15
|
name: "vft-full-screen"
|
|
16
16
|
}), z = /* @__PURE__ */ r({
|
|
17
|
-
...
|
|
17
|
+
...x,
|
|
18
18
|
props: {
|
|
19
19
|
text: {},
|
|
20
20
|
icon: {},
|
|
@@ -28,13 +28,13 @@ const x = (
|
|
|
28
28
|
adjustOrigin: { type: Boolean }
|
|
29
29
|
},
|
|
30
30
|
setup(t) {
|
|
31
|
-
const n = t, { toggle: c, isFullscreen: e } = m(),
|
|
32
|
-
return (v, C) => (
|
|
33
|
-
class: o(
|
|
31
|
+
const n = t, { toggle: c, isFullscreen: e } = m(), l = f().value;
|
|
32
|
+
return (v, C) => (i(), s(o(u), p({
|
|
33
|
+
class: o(d).b(),
|
|
34
34
|
distance: 2,
|
|
35
|
-
"hover-color": o(
|
|
35
|
+
"hover-color": o(l),
|
|
36
36
|
onClick: o(c),
|
|
37
|
-
icon: o(e) ? "
|
|
37
|
+
icon: o(e) ? "icon-exit-full-screen" : "icon-full-screen",
|
|
38
38
|
text: o(e) ? "退出全屏" : "全屏"
|
|
39
39
|
}, o(a)(n, !0, !0), { pointer: "" }), null, 16, ["class", "hover-color", "onClick", "icon", "text"]));
|
|
40
40
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { singleAttrToObj as
|
|
1
|
+
import { defineComponent as z, computed as o, openBlock as a, createElementBlock as x, normalizeClass as O, unref as n, normalizeStyle as V, createBlock as v, mergeProps as d, createCommentVNode as f, createElementVNode as j, toDisplayString as N } from "vue";
|
|
2
|
+
import { singleAttrToObj as b, addUnit as y, removeUnit as p } from "@vft/utils";
|
|
3
3
|
import { VftIcon as g } from "../icon/index.js";
|
|
4
4
|
import "@vueuse/core";
|
|
5
|
-
import { generateCssVars as
|
|
5
|
+
import { generateCssVars as E } from "../../utils/ns-cover.js";
|
|
6
6
|
import "lodash";
|
|
7
|
-
import { useNamespace as
|
|
7
|
+
import { useNamespace as T } from "../../hooks/use-namespace/index.js";
|
|
8
8
|
import "@popperjs/core";
|
|
9
9
|
import "../../hooks/use-z-index/index.js";
|
|
10
|
-
const
|
|
10
|
+
const h = (
|
|
11
11
|
/* hoist-static*/
|
|
12
|
-
|
|
13
|
-
), U =
|
|
12
|
+
T("icon-text")
|
|
13
|
+
), U = z({
|
|
14
14
|
name: "vft-icon-text"
|
|
15
|
-
}), F = /* @__PURE__ */
|
|
15
|
+
}), F = /* @__PURE__ */ z({
|
|
16
16
|
...U,
|
|
17
17
|
props: {
|
|
18
18
|
text: {},
|
|
@@ -27,31 +27,31 @@ const T = (
|
|
|
27
27
|
adjustOrigin: { type: Boolean, default: !0 }
|
|
28
28
|
},
|
|
29
29
|
setup(e) {
|
|
30
|
-
const
|
|
30
|
+
const C = o(() => e.hoverColor ? e.hoverColor : e.color), r = o(() => b(e.icon, "icon", { size: e.size, color: e.color })), c = o(() => e.direction === "col"), s = o(() => {
|
|
31
31
|
const t = y(e.distance);
|
|
32
32
|
return c.value ? e.reverse ? { marginTop: t } : { marginBottom: t } : e.reverse ? { marginLeft: t } : { marginRight: t };
|
|
33
|
-
}),
|
|
34
|
-
const t =
|
|
33
|
+
}), l = o(() => p(e.size)), i = o(() => l.value < 12), S = o(() => l.value && i.value ? { transform: `scale(${l.value / 12})` } : {}), B = o(() => {
|
|
34
|
+
const t = E({
|
|
35
35
|
cursor: e.pointer ? "pointer" : void 0,
|
|
36
36
|
color: e.color,
|
|
37
|
-
"hover-color":
|
|
38
|
-
fontSize:
|
|
37
|
+
"hover-color": C.value,
|
|
38
|
+
fontSize: i.value ? "12px" : y(e.size)
|
|
39
39
|
}, "icon-text");
|
|
40
40
|
return {
|
|
41
|
-
...
|
|
41
|
+
...i.value && e.adjustOrigin ? { transformOrigin: "left top" } : {},
|
|
42
42
|
...t,
|
|
43
|
-
...
|
|
43
|
+
...S.value
|
|
44
44
|
};
|
|
45
45
|
});
|
|
46
|
-
return (t,
|
|
46
|
+
return (t, k) => {
|
|
47
47
|
var u, m;
|
|
48
|
-
return
|
|
49
|
-
class:
|
|
50
|
-
style:
|
|
48
|
+
return a(), x("span", {
|
|
49
|
+
class: O([n(h).b(), n(h).is("col", c.value)]),
|
|
50
|
+
style: V(B.value)
|
|
51
51
|
}, [
|
|
52
|
-
!t.reverse && ((u = r.value) != null && u.icon) ? (
|
|
53
|
-
|
|
54
|
-
t.reverse && ((m = r.value) != null && m.icon) ? (
|
|
52
|
+
!t.reverse && ((u = r.value) != null && u.icon) ? (a(), v(n(g), d({ key: 0 }, r.value, { style: s.value }), null, 16, ["style"])) : f("", !0),
|
|
53
|
+
j("span", null, N(t.text), 1),
|
|
54
|
+
t.reverse && ((m = r.value) != null && m.icon) ? (a(), v(n(g), d({ key: 1 }, r.value, { style: s.value }), null, 16, ["style"])) : f("", !0)
|
|
55
55
|
], 6);
|
|
56
56
|
};
|
|
57
57
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as Z, ref as z, effectScope as ee, computed as
|
|
1
|
+
import { defineComponent as Z, ref as z, effectScope as ee, computed as p, watch as R, nextTick as te, onMounted as ne, openBlock as x, createBlock as oe, Teleport as ae, createVNode as d, Transition as se, withCtx as le, createElementVNode as c, normalizeClass as i, unref as n, normalizeStyle as S, withModifiers as ie, createElementBlock as E, Fragment as V, createCommentVNode as re, renderList as ce, withDirectives as ue, vShow as fe, renderSlot as de } from "vue";
|
|
2
2
|
import { EVENT_CODE as w } from "@vft/constants";
|
|
3
3
|
import { isNumber as H } from "@vft/utils";
|
|
4
4
|
import { VftIcon as v } from "../icon/index.js";
|
|
@@ -8,13 +8,13 @@ import { throttle as T } from "lodash";
|
|
|
8
8
|
import { useNamespace as me } from "../../hooks/use-namespace/index.js";
|
|
9
9
|
import "@popperjs/core";
|
|
10
10
|
import { useZIndex as ve } from "../../hooks/use-z-index/index.js";
|
|
11
|
-
const
|
|
11
|
+
const ke = ["src"], a = (
|
|
12
12
|
/* hoist-static*/
|
|
13
13
|
me("image-viewer")
|
|
14
|
-
),
|
|
14
|
+
), ge = Z({
|
|
15
15
|
name: "vft-image-viewer"
|
|
16
16
|
}), Ee = /* @__PURE__ */ Z({
|
|
17
|
-
...
|
|
17
|
+
...ge,
|
|
18
18
|
props: {
|
|
19
19
|
urlList: { default: [] },
|
|
20
20
|
zIndex: {},
|
|
@@ -30,13 +30,13 @@ const pe = ["src"], a = (
|
|
|
30
30
|
switch: (s) => H(s)
|
|
31
31
|
},
|
|
32
32
|
setup(s, { expose: A, emit: X }) {
|
|
33
|
-
const { nextZIndex: P } = ve(), C = z(), Y = z([]), O = ee(),
|
|
33
|
+
const { nextZIndex: P } = ve(), C = z(), Y = z([]), O = ee(), g = z(!0), m = z(s.initialIndex), l = z({
|
|
34
34
|
scale: 1,
|
|
35
35
|
deg: 0,
|
|
36
36
|
offsetX: 0,
|
|
37
37
|
offsetY: 0,
|
|
38
38
|
enableTransition: !1
|
|
39
|
-
}), W =
|
|
39
|
+
}), W = p(() => s.urlList.length <= 1), $ = p(() => m.value === 0), M = p(() => m.value === s.urlList.length - 1), j = p(() => s.urlList[m.value]), q = p(() => {
|
|
40
40
|
const { scale: e, deg: t, offsetX: o, offsetY: r, enableTransition: h } = l.value;
|
|
41
41
|
let u = o / e, f = r / e;
|
|
42
42
|
switch (t % 360) {
|
|
@@ -53,12 +53,12 @@ const pe = ["src"], a = (
|
|
|
53
53
|
[u, f] = [-f, u];
|
|
54
54
|
break;
|
|
55
55
|
}
|
|
56
|
-
const
|
|
56
|
+
const b = {
|
|
57
57
|
transform: `scale(${e}) rotate(${t}deg) translate(${u}px, ${f}px)`,
|
|
58
58
|
transition: h ? "transform .3s" : ""
|
|
59
59
|
};
|
|
60
|
-
return
|
|
61
|
-
}), G =
|
|
60
|
+
return b.maxWidth = b.maxHeight = "100%", b;
|
|
61
|
+
}), G = p(() => H(s.zIndex) ? s.zIndex : P());
|
|
62
62
|
function y() {
|
|
63
63
|
K(), X("close");
|
|
64
64
|
}
|
|
@@ -75,18 +75,18 @@ const pe = ["src"], a = (
|
|
|
75
75
|
D();
|
|
76
76
|
break;
|
|
77
77
|
case w.up:
|
|
78
|
-
|
|
78
|
+
k("zoomIn");
|
|
79
79
|
break;
|
|
80
80
|
case w.right:
|
|
81
81
|
F();
|
|
82
82
|
break;
|
|
83
83
|
case w.down:
|
|
84
|
-
|
|
84
|
+
k("zoomOut");
|
|
85
85
|
break;
|
|
86
86
|
}
|
|
87
87
|
}), t = T((o) => {
|
|
88
88
|
const r = o.deltaY || o.deltaX;
|
|
89
|
-
|
|
89
|
+
k(r < 0 ? "zoomIn" : "zoomOut", {
|
|
90
90
|
zoomRate: s.zoomRate,
|
|
91
91
|
enableTransition: !1
|
|
92
92
|
});
|
|
@@ -99,20 +99,20 @@ const pe = ["src"], a = (
|
|
|
99
99
|
O.stop();
|
|
100
100
|
}
|
|
101
101
|
function Q() {
|
|
102
|
-
|
|
102
|
+
g.value = !1;
|
|
103
103
|
}
|
|
104
104
|
function U(e) {
|
|
105
|
-
|
|
105
|
+
g.value = !1, e.target.alt = "加载失败";
|
|
106
106
|
}
|
|
107
107
|
function _(e) {
|
|
108
|
-
if (
|
|
108
|
+
if (g.value || e.button !== 0 || !C.value)
|
|
109
109
|
return;
|
|
110
110
|
l.value.enableTransition = !1;
|
|
111
|
-
const { offsetX: t, offsetY: o } = l.value, r = e.pageX, h = e.pageY, u = T((
|
|
111
|
+
const { offsetX: t, offsetY: o } = l.value, r = e.pageX, h = e.pageY, u = T((b) => {
|
|
112
112
|
l.value = {
|
|
113
113
|
...l.value,
|
|
114
|
-
offsetX: t +
|
|
115
|
-
offsetY: o +
|
|
114
|
+
offsetX: t + b.pageX - r,
|
|
115
|
+
offsetY: o + b.pageY - h
|
|
116
116
|
};
|
|
117
117
|
}), f = I(document, "mousemove", u);
|
|
118
118
|
I(document, "mouseup", () => {
|
|
@@ -129,7 +129,7 @@ const pe = ["src"], a = (
|
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
131
|
function B() {
|
|
132
|
-
|
|
132
|
+
g.value || N();
|
|
133
133
|
}
|
|
134
134
|
function L(e) {
|
|
135
135
|
const t = s.urlList.length;
|
|
@@ -141,8 +141,8 @@ const pe = ["src"], a = (
|
|
|
141
141
|
function F() {
|
|
142
142
|
M.value && !s.infinite || L(m.value + 1);
|
|
143
143
|
}
|
|
144
|
-
function
|
|
145
|
-
if (
|
|
144
|
+
function k(e, t = {}) {
|
|
145
|
+
if (g.value)
|
|
146
146
|
return;
|
|
147
147
|
const { rotateDeg: o, enableTransition: r } = {
|
|
148
148
|
rotateDeg: 90,
|
|
@@ -172,7 +172,7 @@ const pe = ["src"], a = (
|
|
|
172
172
|
return R(j, () => {
|
|
173
173
|
te(() => {
|
|
174
174
|
const e = Y.value[0];
|
|
175
|
-
e != null && e.complete || (
|
|
175
|
+
e != null && e.complete || (g.value = !0);
|
|
176
176
|
});
|
|
177
177
|
}), R(m, (e) => {
|
|
178
178
|
N(), X("switch", e);
|
|
@@ -206,7 +206,7 @@ const pe = ["src"], a = (
|
|
|
206
206
|
class: i([n(a).e("btn"), n(a).e("close")]),
|
|
207
207
|
onClick: y
|
|
208
208
|
}, [
|
|
209
|
-
d(n(v), { icon: "
|
|
209
|
+
d(n(v), { icon: "icon-close" })
|
|
210
210
|
], 2),
|
|
211
211
|
W.value ? re("", !0) : (x(), E(V, { key: 0 }, [
|
|
212
212
|
c("span", {
|
|
@@ -217,7 +217,7 @@ const pe = ["src"], a = (
|
|
|
217
217
|
]),
|
|
218
218
|
onClick: D
|
|
219
219
|
}, [
|
|
220
|
-
d(n(v), { icon: "
|
|
220
|
+
d(n(v), { icon: "icon-arrow-left" })
|
|
221
221
|
], 2),
|
|
222
222
|
c("span", {
|
|
223
223
|
class: i([
|
|
@@ -227,7 +227,7 @@ const pe = ["src"], a = (
|
|
|
227
227
|
]),
|
|
228
228
|
onClick: F
|
|
229
229
|
}, [
|
|
230
|
-
d(n(v), { icon: "
|
|
230
|
+
d(n(v), { icon: "icon-arrow-right" })
|
|
231
231
|
], 2)
|
|
232
232
|
], 64)),
|
|
233
233
|
c("div", {
|
|
@@ -237,30 +237,30 @@ const pe = ["src"], a = (
|
|
|
237
237
|
class: i(n(a).e("actions__inner"))
|
|
238
238
|
}, [
|
|
239
239
|
d(n(v), {
|
|
240
|
-
icon: "
|
|
241
|
-
onClick: t[1] || (t[1] = (o) =>
|
|
240
|
+
icon: "icon-zoom-out",
|
|
241
|
+
onClick: t[1] || (t[1] = (o) => k("zoomOut"))
|
|
242
242
|
}),
|
|
243
243
|
d(n(v), {
|
|
244
|
-
icon: "
|
|
245
|
-
onClick: t[2] || (t[2] = (o) =>
|
|
244
|
+
icon: "icon-zoom-in",
|
|
245
|
+
onClick: t[2] || (t[2] = (o) => k("zoomIn"))
|
|
246
246
|
}),
|
|
247
247
|
c("i", {
|
|
248
248
|
class: i(n(a).e("actions__divider"))
|
|
249
249
|
}, null, 2),
|
|
250
250
|
d(n(v), {
|
|
251
|
-
icon: "
|
|
251
|
+
icon: "icon-scale-to-original",
|
|
252
252
|
onClick: B
|
|
253
253
|
}),
|
|
254
254
|
c("i", {
|
|
255
255
|
class: i(n(a).e("actions__divider"))
|
|
256
256
|
}, null, 2),
|
|
257
257
|
d(n(v), {
|
|
258
|
-
icon: "
|
|
259
|
-
onClick: t[3] || (t[3] = (o) =>
|
|
258
|
+
icon: "icon-refresh-left",
|
|
259
|
+
onClick: t[3] || (t[3] = (o) => k("anticlockwise"))
|
|
260
260
|
}),
|
|
261
261
|
d(n(v), {
|
|
262
|
-
icon: "
|
|
263
|
-
onClick: t[4] || (t[4] = (o) =>
|
|
262
|
+
icon: "icon-refresh-right",
|
|
263
|
+
onClick: t[4] || (t[4] = (o) => k("clockwise"))
|
|
264
264
|
})
|
|
265
265
|
], 2)
|
|
266
266
|
], 2),
|
|
@@ -277,7 +277,7 @@ const pe = ["src"], a = (
|
|
|
277
277
|
onLoad: Q,
|
|
278
278
|
onError: U,
|
|
279
279
|
onMousedown: _
|
|
280
|
-
}, null, 46,
|
|
280
|
+
}, null, 46, ke)), [
|
|
281
281
|
[fe, r === m.value]
|
|
282
282
|
])), 128))
|
|
283
283
|
], 2),
|