savor-ui 0.15.5 → 0.15.7
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 +15 -0
- package/dist/es/components/src/descriptions/descriptions-item.vue_vue_type_script_setup_true_vapor_true_lang.mjs +2 -2
- package/dist/es/components/src/descriptions/descriptions.vue_vue_type_script_setup_true_vapor_true_lang.mjs +1 -1
- package/dist/es/components/src/dropdown/doption.vue_vue_type_script_setup_true_vapor_true_lang.mjs +2 -2
- package/dist/es/components/src/dropdown/dropdown.vue_vue_type_script_setup_true_vapor_true_lang.mjs +10 -8
- package/dist/es/components/src/dropdown/types.d.ts +1 -1
- package/dist/es/components/src/popover/index.d.ts +3 -2
- package/dist/es/components/src/popover/popover.d.ts +2 -1
- package/dist/es/components/src/popover/popover.vue_vue_type_script_setup_true_vapor_true_lang.mjs +124 -131
- package/dist/es/components/src/popover/types.d.ts +2 -2
- package/dist/json/web-types.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
## [0.15.7](https://gitee.com/mach552/savor-ui/compare/v0.15.6...v0.15.7) (2026-08-05)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **descriptions:** 修复label宽度不一致问题 ([cb2ca97](https://gitee.com/mach552/savor-ui/commits/cb2ca9762533c4baee9fe4e17bf8f5071824a2d8))
|
|
11
|
+
|
|
12
|
+
## [0.15.6](https://gitee.com/mach552/savor-ui/compare/v0.15.5...v0.15.6) (2026-08-04)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* **dropdown:** 修复选择选项切换页面后无法关闭问题 ([1b835ab](https://gitee.com/mach552/savor-ui/commits/1b835ab8ce95e3571f7e7bea55f7c2396bb0486b))
|
|
18
|
+
* **popover:** 修复右键模式时再次右键不刷新位置的问题 ([86c0842](https://gitee.com/mach552/savor-ui/commits/86c08422edc51806ae1ecd3741c96c195da41281))
|
|
19
|
+
|
|
5
20
|
## [0.15.5](https://gitee.com/mach552/savor-ui/compare/v0.15.4...v0.15.5) (2026-08-04)
|
|
6
21
|
|
|
7
22
|
|
|
@@ -42,12 +42,12 @@ var y = h(" "), b = h("<div><div></div><div>", 1), x = /*@__PURE__*/ a({
|
|
|
42
42
|
alignItems: "stretch"
|
|
43
43
|
};
|
|
44
44
|
}), T = r(() => {
|
|
45
|
-
let e = S?.labelAlign || h.labelAlign, t =
|
|
45
|
+
let e = S?.labelAlign || h.labelAlign, t = h.labelWidth || S?.labelWidth, n = {
|
|
46
46
|
textAlign: e ?? "left",
|
|
47
47
|
whiteSpace: "nowrap",
|
|
48
48
|
flexShrink: "0"
|
|
49
49
|
};
|
|
50
|
-
return
|
|
50
|
+
return t != null && (n.width = typeof t == "number" ? `${t}px` : t), n;
|
|
51
51
|
}), E = b(), D = n(E), O = s(D, 1);
|
|
52
52
|
return u(() => {
|
|
53
53
|
let e = _(x);
|
|
@@ -16,7 +16,7 @@ var _ = m(" "), v = m("<div>"), y = m("<div><div>", 1), b = /*@__PURE__*/ o({
|
|
|
16
16
|
labelAlign: { default: "left" },
|
|
17
17
|
title: {},
|
|
18
18
|
size: { default: "default" },
|
|
19
|
-
labelWidth: {},
|
|
19
|
+
labelWidth: { default: 120 },
|
|
20
20
|
tableLayout: {}
|
|
21
21
|
},
|
|
22
22
|
setup(o, { slots: m }) {
|
package/dist/es/components/src/dropdown/doption.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -11,8 +11,8 @@ var y = /*@__PURE__*/ o({
|
|
|
11
11
|
props: { title: {} },
|
|
12
12
|
emits: ["click"],
|
|
13
13
|
setup(o, { emit: s, slots: p }) {
|
|
14
|
-
let y = s, b = e("droption"), x = c(t, void 0), S = () => {
|
|
15
|
-
x?.itemClick?.(), y("click");
|
|
14
|
+
let y = s, b = e("droption"), x = c(t, void 0), S = async () => {
|
|
15
|
+
await x?.itemClick?.(), y("click");
|
|
16
16
|
}, C = v(), w = n(C, 1);
|
|
17
17
|
return l(() => u(C, [h(b).b()])), d(C, 0, 0), r(() => p.icon, () => {
|
|
18
18
|
let e = g();
|
package/dist/es/components/src/dropdown/dropdown.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -9,23 +9,25 @@ var m = d("<div>"), h = d("<div>", 1), g = /*@__PURE__*/ a({
|
|
|
9
9
|
__name: "dropdown",
|
|
10
10
|
props: { popoverProps: {} },
|
|
11
11
|
setup(a) {
|
|
12
|
-
let d = e("dropdown"), g = p("popoverRef")
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
let d = e("dropdown"), g = p("popoverRef"), _ = null, v = () => {
|
|
13
|
+
_ &&= (_(), null);
|
|
14
|
+
};
|
|
15
|
+
o(n, { itemClick: () => (g.value?.hide(), new Promise((e) => {
|
|
16
|
+
_ = e;
|
|
17
|
+
})) });
|
|
18
|
+
let y = h();
|
|
19
|
+
return s(() => c(y, [f(d).b()])), l(y, null, 0), u(r(f(t), { $: [() => ({
|
|
18
20
|
trigger: "click",
|
|
19
21
|
placement: a.popoverProps?.trigger === "contextmenu" ? "bottom-start" : "bottom",
|
|
20
22
|
alignPoint: a.popoverProps?.trigger === "contextmenu",
|
|
21
23
|
...a.popoverProps
|
|
22
|
-
})] }, {
|
|
24
|
+
}), { onAfterLeave: () => v }] }, {
|
|
23
25
|
content: () => {
|
|
24
26
|
let e = m();
|
|
25
27
|
return s(() => c(e, f(d).e("list"))), l(e, null, 0), i("content"), e;
|
|
26
28
|
},
|
|
27
29
|
default: () => i("default", null, null, 4)
|
|
28
|
-
}), g, null, "popoverRef"),
|
|
30
|
+
}), g, null, "popoverRef"), y;
|
|
29
31
|
}
|
|
30
32
|
});
|
|
31
33
|
//#endregion
|
|
@@ -3,7 +3,7 @@ import { PublicProps, ShallowUnwrapRef, VNode, Plugin } from 'vue';
|
|
|
3
3
|
export declare const SPopover: ((__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
|
|
4
4
|
attrs: any;
|
|
5
5
|
slots: PopoverSlots;
|
|
6
|
-
emit: ((evt: "change", visible: boolean) => void) & ((evt: "click-outside", evt: Event) => void);
|
|
6
|
+
emit: ((evt: "change", visible: boolean) => void) & ((evt: "click-outside", evt: Event) => void) & ((evt: "after-leave") => void);
|
|
7
7
|
}, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
8
8
|
props: PublicProps & {
|
|
9
9
|
content?: string | undefined;
|
|
@@ -22,13 +22,14 @@ export declare const SPopover: ((__VLS_props: NonNullable<Awaited<typeof __VLS_s
|
|
|
22
22
|
teleport?: string | undefined;
|
|
23
23
|
onChange?: ((visible: boolean) => any) | undefined;
|
|
24
24
|
"onClick-outside"?: ((evt: Event) => any) | undefined;
|
|
25
|
+
"onAfter-leave"?: (() => any) | undefined;
|
|
25
26
|
} & (typeof globalThis extends {
|
|
26
27
|
__VLS_PROPS_FALLBACK: infer P;
|
|
27
28
|
} ? P : {});
|
|
28
29
|
expose: (exposed: ShallowUnwrapRef<PopoverExpose>) => void;
|
|
29
30
|
attrs: any;
|
|
30
31
|
slots: PopoverSlots;
|
|
31
|
-
emit: ((evt: "change", visible: boolean) => void) & ((evt: "click-outside", evt: Event) => void);
|
|
32
|
+
emit: ((evt: "change", visible: boolean) => void) & ((evt: "click-outside", evt: Event) => void) & ((evt: "after-leave") => void);
|
|
32
33
|
}>) => VNode & {
|
|
33
34
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
34
35
|
}) & Plugin;
|
|
@@ -4,13 +4,14 @@ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup
|
|
|
4
4
|
props: PublicProps & __VLS_PrettifyLocal<PopoverProps & {
|
|
5
5
|
onChange?: ((visible: boolean) => any) | undefined;
|
|
6
6
|
"onClick-outside"?: ((evt: Event) => any) | undefined;
|
|
7
|
+
"onAfter-leave"?: (() => any) | undefined;
|
|
7
8
|
}> & (typeof globalThis extends {
|
|
8
9
|
__VLS_PROPS_FALLBACK: infer P;
|
|
9
10
|
} ? P : {});
|
|
10
11
|
expose: (exposed: ShallowUnwrapRef<PopoverExpose>) => void;
|
|
11
12
|
attrs: any;
|
|
12
13
|
slots: PopoverSlots;
|
|
13
|
-
emit: ((evt: "change", visible: boolean) => void) & ((evt: "click-outside", evt: Event) => void);
|
|
14
|
+
emit: ((evt: "change", visible: boolean) => void) & ((evt: "click-outside", evt: Event) => void) & ((evt: "after-leave") => void);
|
|
14
15
|
}>) => VNode & {
|
|
15
16
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
16
17
|
};
|
package/dist/es/components/src/popover/popover.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -4,10 +4,10 @@ import { useNamespace as t } from "../../../hooks/src/use-namespace.mjs";
|
|
|
4
4
|
import { useOutsideClick as n } from "../../../hooks/src/use-outside-click.mjs";
|
|
5
5
|
import { useZIndex as r } from "../../../hooks/src/use-zIndex.mjs";
|
|
6
6
|
import "../../../hooks/index.mjs";
|
|
7
|
-
import { VaporTeleport as i, VaporTransition as a, applyVShow as o, child as s, computed as c, createComponent as l, createDynamicComponent as ee, createIf as
|
|
8
|
-
import { arrow as
|
|
7
|
+
import { VaporTeleport as i, VaporTransition as a, applyVShow as o, child as s, computed as c, createComponent as l, createDynamicComponent as ee, createIf as u, createSlot as te, createTemplateRefSetter as ne, defineVaporComponent as d, nextTick as f, onMounted as re, onUnmounted as ie, ref as p, renderEffect as m, setClass as h, setDynamicEvents as g, setInsertionState as _, setStyle as v, setText as ae, template as y, toDisplayString as oe, unref as b, useSlots as se, useTemplateRef as x, watch as S, watchEffect as ce } from "vue";
|
|
8
|
+
import { arrow as le, autoUpdate as ue, computePosition as de, flip as fe, offset as pe, shift as me } from "@floating-ui/dom";
|
|
9
9
|
//#region ../components/src/popover/popover.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
10
|
-
var
|
|
10
|
+
var he = y(" "), ge = y("<div data-popover-arrow>"), _e = y("<div>"), ve = y("<div><div>"), C = /*@__PURE__*/ d({
|
|
11
11
|
name: "SPopover",
|
|
12
12
|
__name: "popover",
|
|
13
13
|
props: {
|
|
@@ -32,61 +32,65 @@ var _e = v(" "), ve = v("<div data-popover-arrow>"), ye = v("<div>"), be = v("<d
|
|
|
32
32
|
},
|
|
33
33
|
teleport: { default: "body" }
|
|
34
34
|
},
|
|
35
|
-
emits: [
|
|
35
|
+
emits: [
|
|
36
|
+
"change",
|
|
37
|
+
"click-outside",
|
|
38
|
+
"after-leave"
|
|
39
|
+
],
|
|
36
40
|
__multiRoot: !0,
|
|
37
|
-
setup(
|
|
38
|
-
let
|
|
39
|
-
let e =
|
|
40
|
-
return
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
setup(d, { expose: y, emit: C }) {
|
|
42
|
+
let w = d, T = C, E = t("popover"), ye = se(), D = p(!1), O = p(!1), { nextZIndex: be } = r(), k = p(), A = x("containerNode"), j = x("wrapperNode"), M = x("contentNode"), N = p(null), xe = () => {
|
|
43
|
+
let e = ye.default?.();
|
|
44
|
+
return N.value = e, e;
|
|
45
|
+
}, P = p(null), F = p({}), I = p({}), L = p({}), R = p(null), z = () => {
|
|
46
|
+
P.value && Object.entries(I.value).forEach(([e, t]) => {
|
|
47
|
+
P.value.removeEventListener(e, t);
|
|
44
48
|
});
|
|
45
|
-
},
|
|
49
|
+
}, B = (e) => e == null ? [] : Array.isArray(e) ? e : [e], V = (e) => {
|
|
46
50
|
if (!e) return null;
|
|
47
51
|
if (e instanceof Node) return e;
|
|
48
52
|
if (e.block instanceof Node) return e.block;
|
|
49
53
|
if (e.el instanceof Node) return e.el;
|
|
50
54
|
if (e.branches) {
|
|
51
|
-
let t = typeof e.activeBranch == "number" ? e.activeBranch : 0, n =
|
|
55
|
+
let t = typeof e.activeBranch == "number" ? e.activeBranch : 0, n = V(e.branches[t] || e.branches[0]);
|
|
52
56
|
if (n) return n;
|
|
53
57
|
}
|
|
54
|
-
for (let t of
|
|
55
|
-
let e =
|
|
58
|
+
for (let t of B(e.children)) {
|
|
59
|
+
let e = V(t);
|
|
56
60
|
if (e) return e;
|
|
57
61
|
}
|
|
58
|
-
for (let t of
|
|
62
|
+
for (let t of B(e.nodes)) {
|
|
59
63
|
if (t instanceof Node) return t;
|
|
60
|
-
let e =
|
|
64
|
+
let e = V(t);
|
|
61
65
|
if (e) return e;
|
|
62
66
|
}
|
|
63
67
|
return null;
|
|
64
68
|
};
|
|
65
|
-
|
|
66
|
-
if (!e ||
|
|
69
|
+
S(N, (e) => {
|
|
70
|
+
if (!e || P.value) return;
|
|
67
71
|
let t = null;
|
|
68
|
-
t = e instanceof HTMLElement ? e :
|
|
69
|
-
}, { flush: "post" }),
|
|
70
|
-
if (
|
|
71
|
-
let e =
|
|
72
|
+
t = e instanceof HTMLElement ? e : V(e), t && t !== P.value && (z(), P.value = t);
|
|
73
|
+
}, { flush: "post" }), re(() => {
|
|
74
|
+
if (P.value) return;
|
|
75
|
+
let e = N.value;
|
|
72
76
|
if (!e) return;
|
|
73
|
-
let t = e instanceof HTMLElement ? e :
|
|
74
|
-
t && t !==
|
|
75
|
-
}),
|
|
76
|
-
e &&
|
|
77
|
-
Object.entries(
|
|
77
|
+
let t = e instanceof HTMLElement ? e : V(e);
|
|
78
|
+
t && t !== P.value && (z(), P.value = t);
|
|
79
|
+
}), S(P, (e) => {
|
|
80
|
+
e && f().then(() => {
|
|
81
|
+
Object.entries(I.value).forEach(([t, n]) => {
|
|
78
82
|
e.addEventListener(t, n);
|
|
79
83
|
});
|
|
80
84
|
});
|
|
81
85
|
}, { flush: "post" });
|
|
82
|
-
let
|
|
83
|
-
if (!
|
|
84
|
-
|
|
86
|
+
let Se = () => {
|
|
87
|
+
if (!M.value || !P.value) return;
|
|
88
|
+
M.value.style.width = "";
|
|
85
89
|
let e = "";
|
|
86
|
-
typeof
|
|
87
|
-
},
|
|
88
|
-
if (
|
|
89
|
-
let e =
|
|
90
|
+
typeof w.width == "number" ? (e = `${w.width}px`, M.value.style.width = e) : w.width === "sameWidth" ? (e = `${P.value.getBoundingClientRect().width}px`, M.value.style.width = e) : w.width === "auto" && (e = "", M.value.style.width = e);
|
|
91
|
+
}, Ce = c(() => w.offset ? w.offset : w.trigger === "contextmenu" && w.alignPoint ? [0, 0] : w.showArrow ? [0, 8] : [0, 0]), H = () => {
|
|
92
|
+
if (w.trigger === "contextmenu" && w.alignPoint && R.value) {
|
|
93
|
+
let e = R.value;
|
|
90
94
|
return { getBoundingClientRect() {
|
|
91
95
|
return {
|
|
92
96
|
top: e.y,
|
|
@@ -101,144 +105,133 @@ var _e = v(" "), ve = v("<div data-popover-arrow>"), ye = v("<div>"), be = v("<d
|
|
|
101
105
|
};
|
|
102
106
|
} };
|
|
103
107
|
}
|
|
104
|
-
return
|
|
105
|
-
},
|
|
106
|
-
|
|
107
|
-
},
|
|
108
|
-
if (!
|
|
109
|
-
let e =
|
|
110
|
-
|
|
108
|
+
return P.value;
|
|
109
|
+
}, U = null, W = () => {
|
|
110
|
+
U &&= (U(), null);
|
|
111
|
+
}, G = async () => {
|
|
112
|
+
if (!j.value || !P.value) return;
|
|
113
|
+
let e = H(), t = M.value?.querySelector("[data-popover-arrow]"), [n, r] = Ce.value, i = [
|
|
114
|
+
pe({
|
|
111
115
|
mainAxis: r,
|
|
112
116
|
crossAxis: n
|
|
113
117
|
}),
|
|
114
|
-
|
|
115
|
-
|
|
118
|
+
fe(),
|
|
119
|
+
me()
|
|
116
120
|
];
|
|
117
|
-
t && i.push(
|
|
121
|
+
t && i.push(le({
|
|
118
122
|
element: t,
|
|
119
123
|
padding: 8
|
|
120
124
|
}));
|
|
121
|
-
let { x: a, y: o, placement: s, middlewareData: c } = await
|
|
122
|
-
placement:
|
|
125
|
+
let { x: a, y: o, placement: s, middlewareData: c } = await de(e, j.value, {
|
|
126
|
+
placement: w.placement,
|
|
123
127
|
strategy: "fixed",
|
|
124
128
|
middleware: i
|
|
125
129
|
});
|
|
126
|
-
if (
|
|
130
|
+
if (j.value && (Object.assign(j.value.style, {
|
|
127
131
|
position: "fixed",
|
|
128
132
|
left: `${a}px`,
|
|
129
133
|
top: `${o}px`
|
|
130
|
-
}),
|
|
134
|
+
}), j.value.setAttribute("data-popover-placement", s), t && c.arrow)) {
|
|
131
135
|
let { x: e, y: n } = c.arrow;
|
|
132
136
|
Object.assign(t.style, {
|
|
133
137
|
left: e == null ? "" : `${e}px`,
|
|
134
138
|
top: n == null ? "" : `${n}px`
|
|
135
139
|
});
|
|
136
140
|
}
|
|
137
|
-
},
|
|
141
|
+
}, K = c(() => w.manual ? {
|
|
138
142
|
openDelay: 0,
|
|
139
143
|
closeDelay: 0
|
|
140
144
|
} : {
|
|
141
|
-
openDelay: typeof
|
|
142
|
-
closeDelay: typeof
|
|
143
|
-
}),
|
|
144
|
-
|
|
145
|
-
|
|
145
|
+
openDelay: typeof w.delay == "number" ? w.delay : w.delay[0],
|
|
146
|
+
closeDelay: typeof w.delay == "number" ? 50 : w.delay[1]
|
|
147
|
+
}), we = () => {
|
|
148
|
+
w.disabled || (O.value = !0, f(() => {
|
|
149
|
+
D.value = !0, T("change", !0);
|
|
146
150
|
}));
|
|
147
|
-
},
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
}, q = f(null), J = f(null), Oe = () => {
|
|
152
|
-
q.value?.cancel(), J.value?.cancel(), q.value = e(De, W.value.openDelay), J.value = e(K, W.value.closeDelay);
|
|
151
|
+
}, Te = () => {
|
|
152
|
+
D.value = !1, R.value = null, T("change", !1);
|
|
153
|
+
}, q = p(null), J = p(null), Y = () => {
|
|
154
|
+
q.value?.cancel(), J.value?.cancel(), q.value = e(we, K.value.openDelay), J.value = e(Te, K.value.closeDelay);
|
|
153
155
|
};
|
|
154
|
-
|
|
155
|
-
let
|
|
156
|
+
Y(), S(K, Y);
|
|
157
|
+
let X = () => {
|
|
156
158
|
J.value?.cancel(), q.value?.();
|
|
157
|
-
},
|
|
159
|
+
}, Z = () => {
|
|
158
160
|
q.value?.cancel(), J.value?.();
|
|
159
|
-
}, ke = () => {
|
|
160
|
-
q.value?.cancel(), J.value?.cancel(), K();
|
|
161
161
|
};
|
|
162
|
-
n(
|
|
163
|
-
|
|
162
|
+
n(A, (e) => {
|
|
163
|
+
P.value && e.target && typeof P.value.contains == "function" && P.value.contains(e.target) || (D.value && T("click-outside", e), !w.manual && (w.trigger === "hover" || w.trigger === "contextmenu" || w.trigger === "click") && Z());
|
|
164
164
|
});
|
|
165
|
-
let
|
|
166
|
-
|
|
167
|
-
},
|
|
168
|
-
|
|
169
|
-
let e =
|
|
170
|
-
(
|
|
171
|
-
}),
|
|
172
|
-
|
|
173
|
-
},
|
|
174
|
-
|
|
165
|
+
let Ee = () => {
|
|
166
|
+
I.value = {}, F.value = {}, L.value = {}, Q();
|
|
167
|
+
}, Q = () => {
|
|
168
|
+
w.manual || (w.trigger === "hover" && (I.value.mouseenter = X, I.value.mouseleave = Z, F.value.mouseenter = X, F.value.mouseleave = Z), w.trigger === "click" && (I.value.click = () => {
|
|
169
|
+
let e = D.value ? J.value : q.value;
|
|
170
|
+
(D.value ? q.value : J.value)?.cancel(), e?.();
|
|
171
|
+
}), w.trigger === "contextmenu" && (I.value.click = () => {
|
|
172
|
+
Z();
|
|
173
|
+
}, I.value.contextmenu = (e) => {
|
|
174
|
+
e.preventDefault();
|
|
175
175
|
let t = e;
|
|
176
|
-
|
|
176
|
+
R.value = {
|
|
177
177
|
x: t.clientX,
|
|
178
178
|
y: t.clientY
|
|
179
|
-
},
|
|
179
|
+
}, D.value ? G() : X();
|
|
180
180
|
}));
|
|
181
181
|
};
|
|
182
|
-
|
|
183
|
-
|
|
182
|
+
ce(() => {
|
|
183
|
+
w.manual || Q();
|
|
184
184
|
});
|
|
185
|
-
let
|
|
186
|
-
|
|
185
|
+
let De = () => {
|
|
186
|
+
D.value || (T("after-leave"), w.destroyOnClose && (O.value = !1), W());
|
|
187
187
|
};
|
|
188
|
-
|
|
189
|
-
e && (!
|
|
190
|
-
}, { flush: "post" }),
|
|
191
|
-
() =>
|
|
192
|
-
() =>
|
|
193
|
-
() =>
|
|
188
|
+
S(D, (e) => {
|
|
189
|
+
e && (!j.value || !P.value || (k.value = be(), Se(), W(), U = ue(H(), j.value, G)));
|
|
190
|
+
}, { flush: "post" }), S([
|
|
191
|
+
() => w.placement,
|
|
192
|
+
() => w.offset,
|
|
193
|
+
() => w.showArrow
|
|
194
194
|
], () => {
|
|
195
|
-
|
|
196
|
-
}),
|
|
197
|
-
e ?
|
|
198
|
-
}),
|
|
199
|
-
e !== t && (q.value?.cancel(),
|
|
200
|
-
})
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
Q();
|
|
206
|
-
}), oe(() => {
|
|
207
|
-
Q(), R();
|
|
208
|
-
}), v({
|
|
209
|
-
show: Y,
|
|
210
|
-
hide: X,
|
|
211
|
-
hideImmediate: ke
|
|
195
|
+
D.value && G();
|
|
196
|
+
}), S(() => w.manual, (e) => {
|
|
197
|
+
e ? Ee() : Q();
|
|
198
|
+
}), S(() => w.trigger, (e, t) => {
|
|
199
|
+
e !== t && (q.value?.cancel(), D.value = !1, T("change", !1), Ee());
|
|
200
|
+
}), ie(() => {
|
|
201
|
+
W(), z();
|
|
202
|
+
}), y({
|
|
203
|
+
show: X,
|
|
204
|
+
hide: Z
|
|
212
205
|
});
|
|
213
|
-
let $ =
|
|
214
|
-
return [ee(() =>
|
|
215
|
-
disabled: () => !
|
|
216
|
-
to: () =>
|
|
217
|
-
}, () =>
|
|
218
|
-
let e =
|
|
219
|
-
return
|
|
220
|
-
let n =
|
|
221
|
-
|
|
222
|
-
}),
|
|
206
|
+
let $ = ne();
|
|
207
|
+
return [ee(() => xe()), l(i, {
|
|
208
|
+
disabled: () => !d.teleportBody,
|
|
209
|
+
to: () => d.teleport
|
|
210
|
+
}, () => u(() => O.value, () => {
|
|
211
|
+
let e = ve(), t = s(e);
|
|
212
|
+
return m(() => {
|
|
213
|
+
let n = b(E);
|
|
214
|
+
g(e, F.value), h(e, [n.b()]), h(t, [n.e("wrapper")]), v(t, { zIndex: k.value });
|
|
215
|
+
}), _(t, null, 0), l(a, {
|
|
223
216
|
name: "popover-fade",
|
|
224
|
-
onAfterLeave: () =>
|
|
217
|
+
onAfterLeave: () => De,
|
|
225
218
|
persisted: ""
|
|
226
219
|
}, () => {
|
|
227
|
-
let e =
|
|
228
|
-
return
|
|
229
|
-
|
|
230
|
-
}),
|
|
231
|
-
let e =
|
|
232
|
-
return
|
|
233
|
-
}),
|
|
234
|
-
let e =
|
|
235
|
-
return
|
|
236
|
-
|
|
220
|
+
let e = _e();
|
|
221
|
+
return m(() => {
|
|
222
|
+
g(e, L.value), h(e, [b(E).e("content")]);
|
|
223
|
+
}), _(e, null, 0), te("content", null, () => {
|
|
224
|
+
let e = he();
|
|
225
|
+
return m(() => ae(e, oe(d.content))), e;
|
|
226
|
+
}), _(e, null, 1), u(() => d.showArrow, () => {
|
|
227
|
+
let e = ge();
|
|
228
|
+
return m(() => {
|
|
229
|
+
h(e, [b(E).e("arrow")]), v(e, d.arrowStyle);
|
|
237
230
|
}), e;
|
|
238
|
-
}), o(e, () =>
|
|
239
|
-
}), $(t,
|
|
231
|
+
}), o(e, () => D.value), $(e, M, null, "contentNode"), e;
|
|
232
|
+
}), $(t, j, null, "wrapperNode"), $(e, A, null, "containerNode"), e;
|
|
240
233
|
}, null, 129))];
|
|
241
234
|
}
|
|
242
235
|
});
|
|
243
236
|
//#endregion
|
|
244
|
-
export {
|
|
237
|
+
export { C as default };
|
|
@@ -63,12 +63,12 @@ export interface PopoverEmits {
|
|
|
63
63
|
change: [visible: boolean];
|
|
64
64
|
/** 隐藏时触发 */
|
|
65
65
|
"click-outside": [evt: Event];
|
|
66
|
+
/** 离开动画结束时触发 */
|
|
67
|
+
"after-leave": [];
|
|
66
68
|
}
|
|
67
69
|
export interface PopoverExpose {
|
|
68
70
|
/** 显示 */
|
|
69
71
|
show: () => void;
|
|
70
72
|
/** 隐藏 */
|
|
71
73
|
hide: () => void;
|
|
72
|
-
/** 立即隐藏(同步,跳过关闭延时,用于点击后立即切换路由等场景) */
|
|
73
|
-
hideImmediate: () => void;
|
|
74
74
|
}
|
package/dist/json/web-types.json
CHANGED