savor-ui 0.15.6 → 0.16.0
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 +22 -0
- package/dist/es/components/src/descriptions/descriptions-item.vue_vue_type_script_setup_true_vapor_true_lang.mjs +35 -33
- package/dist/es/components/src/descriptions/descriptions.vue_vue_type_script_setup_true_vapor_true_lang.mjs +1 -1
- package/dist/es/components/src/menu/index.d.ts +2 -0
- package/dist/es/components/src/menu/menu.vue_vue_type_script_setup_true_vapor_true_lang.mjs +6 -2
- package/dist/es/components/src/menu/types.d.ts +3 -0
- package/dist/es/components/src/popover/popover.vue_vue_type_script_setup_true_vapor_true_lang.mjs +113 -115
- package/dist/es/components/src/statistic/index.d.ts +1 -0
- package/dist/es/components/src/statistic/statistic.vue_vue_type_script_setup_true_vapor_true_lang.mjs +52 -36
- package/dist/es/components/src/statistic/types.d.ts +2 -0
- package/dist/es/components/src/table/index.d.ts +7 -4
- package/dist/es/components/src/table/table-body.vue_vue_type_script_setup_true_vapor_true_lang.mjs +24 -35
- package/dist/es/components/src/table/table-header.vue_vue_type_script_setup_true_vapor_true_lang.mjs +51 -46
- package/dist/es/components/src/table/table.d.ts +5 -3
- package/dist/es/components/src/table/table.vue_vue_type_script_setup_true_vapor_true_lang.mjs +100 -82
- package/dist/es/components/src/table/types.d.ts +12 -1
- package/dist/es/components/src/tree/index.d.ts +3 -3
- package/dist/es/components/src/tree/tree.d.ts +2 -2
- package/dist/es/core/index.d.ts +1 -0
- package/dist/es/core/index.mjs +3 -2
- package/dist/es/theme/components/radio.scss +7 -0
- package/dist/json/vetur-attributes.json +20 -0
- package/dist/json/vetur-tags.json +8 -2
- package/dist/json/web-types.json +49 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
# [0.16.0](https://gitee.com/mach552/savor-ui/compare/v0.15.7...v0.16.0) (2026-08-06)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **descriptions:** 修复竖向布局时label宽度没有撑满的问题 ([d460cd0](https://gitee.com/mach552/savor-ui/commits/d460cd0a3df7c420a67e94a9deae7589a5bc7a1c))
|
|
11
|
+
* **radio:** 修复button的禁用样式无效问题 ([d647d8e](https://gitee.com/mach552/savor-ui/commits/d647d8e8e60b6cf41430b4ca0c6f44600cbef1d9))
|
|
12
|
+
* **statistic:** 修复动画无效的问题 ([3db3653](https://gitee.com/mach552/savor-ui/commits/3db3653c7ac933bcf4d554c5b39ab75ebbd10ea2))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **menu:** 新增滚动条属性 ([b6b3485](https://gitee.com/mach552/savor-ui/commits/b6b34857afb6aab2a0c7e4d897b55266ce8ec5d8))
|
|
18
|
+
* **table:** 新增隐藏头部属性 ([d1954d9](https://gitee.com/mach552/savor-ui/commits/d1954d978921f876a1230c43ff92d719645c1dcd))
|
|
19
|
+
|
|
20
|
+
## [0.15.7](https://gitee.com/mach552/savor-ui/compare/v0.15.6...v0.15.7) (2026-08-05)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* **descriptions:** 修复label宽度不一致问题 ([cb2ca97](https://gitee.com/mach552/savor-ui/commits/cb2ca9762533c4baee9fe4e17bf8f5071824a2d8))
|
|
26
|
+
|
|
5
27
|
## [0.15.6](https://gitee.com/mach552/savor-ui/compare/v0.15.5...v0.15.6) (2026-08-04)
|
|
6
28
|
|
|
7
29
|
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getSize as e } from "../../../utils/src/tool.mjs";
|
|
2
|
+
import "../../../utils/index.mjs";
|
|
3
|
+
import { useNamespace as t } from "../../../hooks/src/use-namespace.mjs";
|
|
2
4
|
import "../../../hooks/index.mjs";
|
|
3
|
-
import { descriptionsContextKey as
|
|
4
|
-
import { child as
|
|
5
|
+
import { descriptionsContextKey as n } from "./types.mjs";
|
|
6
|
+
import { child as r, computed as i, createSlot as a, defineVaporComponent as o, inject as s, next as c, onMounted as l, onUnmounted as u, renderEffect as d, setClass as f, setInsertionState as p, setStyle as m, setText as h, template as g, toDisplayString as _, unref as v, useId as y } from "vue";
|
|
5
7
|
//#region ../components/src/descriptions/descriptions-item.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
6
|
-
var
|
|
8
|
+
var b = g(" "), x = g("<div><div></div><div>", 1), S = /*@__PURE__*/ o({
|
|
7
9
|
name: "SDescriptionsItem",
|
|
8
10
|
__name: "descriptions-item",
|
|
9
11
|
props: {
|
|
@@ -12,51 +14,51 @@ var y = h(" "), b = h("<div><div></div><div>", 1), x = /*@__PURE__*/ a({
|
|
|
12
14
|
labelWidth: {},
|
|
13
15
|
labelAlign: {}
|
|
14
16
|
},
|
|
15
|
-
setup(
|
|
16
|
-
let
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
uid:
|
|
20
|
-
label:
|
|
21
|
-
span:
|
|
22
|
-
labelWidth:
|
|
23
|
-
labelAlign:
|
|
17
|
+
setup(o) {
|
|
18
|
+
let g = o, S = t("descriptions"), C = s(n, void 0), w = "desc-item-" + y();
|
|
19
|
+
l(() => {
|
|
20
|
+
C?.addItem?.({
|
|
21
|
+
uid: w,
|
|
22
|
+
label: g.label,
|
|
23
|
+
span: g.span,
|
|
24
|
+
labelWidth: g.labelWidth,
|
|
25
|
+
labelAlign: g.labelAlign
|
|
24
26
|
});
|
|
25
|
-
}),
|
|
26
|
-
|
|
27
|
+
}), u(() => {
|
|
28
|
+
C?.removeItem?.(w);
|
|
27
29
|
});
|
|
28
|
-
let
|
|
29
|
-
if (!
|
|
30
|
-
gridColumn: `span ${
|
|
30
|
+
let T = i(() => {
|
|
31
|
+
if (!C?.positionList) return {
|
|
32
|
+
gridColumn: `span ${g.span}`,
|
|
31
33
|
display: "flex",
|
|
32
34
|
alignItems: "stretch"
|
|
33
35
|
};
|
|
34
|
-
let e =
|
|
36
|
+
let e = C.positionList.value[w];
|
|
35
37
|
return e ? {
|
|
36
38
|
gridColumn: `${e.start} / ${e.end}`,
|
|
37
39
|
display: "flex",
|
|
38
40
|
alignItems: "stretch"
|
|
39
41
|
} : {
|
|
40
|
-
gridColumn: `span ${
|
|
42
|
+
gridColumn: `span ${g.span}`,
|
|
41
43
|
display: "flex",
|
|
42
44
|
alignItems: "stretch"
|
|
43
45
|
};
|
|
44
|
-
}),
|
|
45
|
-
let
|
|
46
|
-
textAlign:
|
|
46
|
+
}), E = i(() => {
|
|
47
|
+
let t = C?.labelAlign || g.labelAlign, n = C?.direction === "vertical" ? "100%" : g.labelWidth || C?.labelWidth, r = {
|
|
48
|
+
textAlign: t ?? "left",
|
|
47
49
|
whiteSpace: "nowrap",
|
|
48
50
|
flexShrink: "0"
|
|
49
51
|
};
|
|
50
|
-
return n && (r.width =
|
|
51
|
-
}),
|
|
52
|
-
return
|
|
53
|
-
let e =
|
|
54
|
-
|
|
55
|
-
}),
|
|
56
|
-
let e =
|
|
57
|
-
return
|
|
58
|
-
}),
|
|
52
|
+
return n != null && (r.width = e(n)), r;
|
|
53
|
+
}), D = x(), O = r(D), k = c(O, 1);
|
|
54
|
+
return d(() => {
|
|
55
|
+
let e = v(S);
|
|
56
|
+
f(D, [e.e("item")]), m(D, T.value), f(O, e.e("label")), m(O, E.value);
|
|
57
|
+
}), p(O, null, 0), a("label", null, () => {
|
|
58
|
+
let e = b();
|
|
59
|
+
return d(() => h(e, _(o.label))), e;
|
|
60
|
+
}), d(() => f(k, v(S).e("content"))), p(k, null, 0), a(), D;
|
|
59
61
|
}
|
|
60
62
|
});
|
|
61
63
|
//#endregion
|
|
62
|
-
export {
|
|
64
|
+
export { S as default };
|
|
@@ -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: 100 },
|
|
20
20
|
tableLayout: {}
|
|
21
21
|
},
|
|
22
22
|
setup(o, { slots: m }) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { MenuGroupSlots, MenuItemSlots, MenuSlots, SubMenuSlots } from './types';
|
|
2
2
|
import { PublicProps, VNode, Plugin } from 'vue';
|
|
3
|
+
import { ScrollbarProps } from '../scrollbar';
|
|
3
4
|
export declare const SMenuGroup: ((__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
|
|
4
5
|
attrs: any;
|
|
5
6
|
slots: MenuGroupSlots;
|
|
@@ -53,6 +54,7 @@ export declare const SMenu: ((__VLS_props: NonNullable<Awaited<typeof __VLS_setu
|
|
|
53
54
|
openKeys?: (string[] & (string | number)[]) | undefined;
|
|
54
55
|
selectedKey?: string | undefined;
|
|
55
56
|
accordion?: boolean | undefined;
|
|
57
|
+
scrollbarProps?: ScrollbarProps | undefined;
|
|
56
58
|
activeKey?: string | number | undefined;
|
|
57
59
|
onItemClick?: ((name: string | number, item: any) => any) | undefined;
|
|
58
60
|
onOpenChange?: ((keys: string[]) => any) | undefined;
|
|
@@ -16,7 +16,8 @@ var S = _("<div>"), C = _("<div>", 1), w = /*@__PURE__*/ c({
|
|
|
16
16
|
collapsedWidth: { default: 48 },
|
|
17
17
|
openKeys: {},
|
|
18
18
|
selectedKey: {},
|
|
19
|
-
accordion: { type: Boolean }
|
|
19
|
+
accordion: { type: Boolean },
|
|
20
|
+
scrollbarProps: {}
|
|
20
21
|
}, {
|
|
21
22
|
activeKey: {},
|
|
22
23
|
activeKeyModifiers: {},
|
|
@@ -55,7 +56,10 @@ var S = _("<div>"), C = _("<div>", 1), w = /*@__PURE__*/ c({
|
|
|
55
56
|
let R = C();
|
|
56
57
|
return f(() => {
|
|
57
58
|
p(R, [y(T).b()]), g(R, E.value);
|
|
58
|
-
}), m(R, null, 0), o(y(r), {
|
|
59
|
+
}), m(R, null, 0), o(y(r), { $: [() => ({
|
|
60
|
+
padding: "4px",
|
|
61
|
+
...c.scrollbarProps
|
|
62
|
+
})] }, () => {
|
|
59
63
|
let e = S();
|
|
60
64
|
return f(() => p(e, [y(T).e("content")])), m(e, null, 0), s(), e;
|
|
61
65
|
}), h(R, L, null, "menuRef"), R;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { InjectionKey, Ref } from 'vue';
|
|
2
|
+
import { ScrollbarProps } from '../scrollbar';
|
|
2
3
|
export interface MenuProps {
|
|
3
4
|
/** 是否折叠 */
|
|
4
5
|
collapsed?: boolean;
|
|
@@ -12,6 +13,8 @@ export interface MenuProps {
|
|
|
12
13
|
selectedKey?: string;
|
|
13
14
|
/** 是否开启手风琴模式 */
|
|
14
15
|
accordion?: boolean;
|
|
16
|
+
/** 滚动条属性 */
|
|
17
|
+
scrollbarProps?: ScrollbarProps;
|
|
15
18
|
}
|
|
16
19
|
export interface MenuSlots {
|
|
17
20
|
/** 默认 */
|
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 u, createSlot as te, createTemplateRefSetter as ne, defineVaporComponent as d, nextTick 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: {
|
|
@@ -38,59 +38,59 @@ var ge = v(" "), _e = v("<div data-popover-arrow>"), ve = v("<div>"), ye = v("<d
|
|
|
38
38
|
"after-leave"
|
|
39
39
|
],
|
|
40
40
|
__multiRoot: !0,
|
|
41
|
-
setup(d, { expose:
|
|
42
|
-
let
|
|
43
|
-
let e =
|
|
44
|
-
return
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
-
|
|
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);
|
|
48
48
|
});
|
|
49
|
-
},
|
|
49
|
+
}, B = (e) => e == null ? [] : Array.isArray(e) ? e : [e], V = (e) => {
|
|
50
50
|
if (!e) return null;
|
|
51
51
|
if (e instanceof Node) return e;
|
|
52
52
|
if (e.block instanceof Node) return e.block;
|
|
53
53
|
if (e.el instanceof Node) return e.el;
|
|
54
54
|
if (e.branches) {
|
|
55
|
-
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]);
|
|
56
56
|
if (n) return n;
|
|
57
57
|
}
|
|
58
|
-
for (let t of
|
|
59
|
-
let e =
|
|
58
|
+
for (let t of B(e.children)) {
|
|
59
|
+
let e = V(t);
|
|
60
60
|
if (e) return e;
|
|
61
61
|
}
|
|
62
|
-
for (let t of
|
|
62
|
+
for (let t of B(e.nodes)) {
|
|
63
63
|
if (t instanceof Node) return t;
|
|
64
|
-
let e =
|
|
64
|
+
let e = V(t);
|
|
65
65
|
if (e) return e;
|
|
66
66
|
}
|
|
67
67
|
return null;
|
|
68
68
|
};
|
|
69
|
-
|
|
70
|
-
if (!e ||
|
|
69
|
+
S(N, (e) => {
|
|
70
|
+
if (!e || P.value) return;
|
|
71
71
|
let t = null;
|
|
72
|
-
t = e instanceof HTMLElement ? e :
|
|
73
|
-
}, { flush: "post" }),
|
|
74
|
-
if (
|
|
75
|
-
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;
|
|
76
76
|
if (!e) return;
|
|
77
|
-
let t = e instanceof HTMLElement ? e :
|
|
78
|
-
t && t !==
|
|
79
|
-
}),
|
|
80
|
-
e &&
|
|
81
|
-
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]) => {
|
|
82
82
|
e.addEventListener(t, n);
|
|
83
83
|
});
|
|
84
84
|
});
|
|
85
85
|
}, { flush: "post" });
|
|
86
|
-
let
|
|
87
|
-
if (!
|
|
88
|
-
|
|
86
|
+
let Se = () => {
|
|
87
|
+
if (!M.value || !P.value) return;
|
|
88
|
+
M.value.style.width = "";
|
|
89
89
|
let e = "";
|
|
90
|
-
typeof
|
|
91
|
-
},
|
|
92
|
-
if (
|
|
93
|
-
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;
|
|
94
94
|
return { getBoundingClientRect() {
|
|
95
95
|
return {
|
|
96
96
|
top: e.y,
|
|
@@ -105,135 +105,133 @@ var ge = v(" "), _e = v("<div data-popover-arrow>"), ve = v("<div>"), ye = v("<d
|
|
|
105
105
|
};
|
|
106
106
|
} };
|
|
107
107
|
}
|
|
108
|
-
return
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
},
|
|
112
|
-
if (!
|
|
113
|
-
let e =
|
|
114
|
-
|
|
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({
|
|
115
115
|
mainAxis: r,
|
|
116
116
|
crossAxis: n
|
|
117
117
|
}),
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
fe(),
|
|
119
|
+
me()
|
|
120
120
|
];
|
|
121
|
-
t && i.push(
|
|
121
|
+
t && i.push(le({
|
|
122
122
|
element: t,
|
|
123
123
|
padding: 8
|
|
124
124
|
}));
|
|
125
|
-
let { x: a, y: o, placement: s, middlewareData: c } = await
|
|
126
|
-
placement:
|
|
125
|
+
let { x: a, y: o, placement: s, middlewareData: c } = await de(e, j.value, {
|
|
126
|
+
placement: w.placement,
|
|
127
127
|
strategy: "fixed",
|
|
128
128
|
middleware: i
|
|
129
129
|
});
|
|
130
|
-
if (
|
|
130
|
+
if (j.value && (Object.assign(j.value.style, {
|
|
131
131
|
position: "fixed",
|
|
132
132
|
left: `${a}px`,
|
|
133
133
|
top: `${o}px`
|
|
134
|
-
}),
|
|
134
|
+
}), j.value.setAttribute("data-popover-placement", s), t && c.arrow)) {
|
|
135
135
|
let { x: e, y: n } = c.arrow;
|
|
136
136
|
Object.assign(t.style, {
|
|
137
137
|
left: e == null ? "" : `${e}px`,
|
|
138
138
|
top: n == null ? "" : `${n}px`
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
|
-
},
|
|
141
|
+
}, K = c(() => w.manual ? {
|
|
142
142
|
openDelay: 0,
|
|
143
143
|
closeDelay: 0
|
|
144
144
|
} : {
|
|
145
|
-
openDelay: typeof
|
|
146
|
-
closeDelay: typeof
|
|
147
|
-
}),
|
|
148
|
-
|
|
149
|
-
|
|
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);
|
|
150
150
|
}));
|
|
151
|
-
},
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
}, q = f(null), J = f(null), De = () => {
|
|
156
|
-
q.value?.cancel(), J.value?.cancel(), q.value = e(Te, G.value.openDelay), J.value = e(Ee, G.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);
|
|
157
155
|
};
|
|
158
|
-
|
|
159
|
-
let
|
|
156
|
+
Y(), S(K, Y);
|
|
157
|
+
let X = () => {
|
|
160
158
|
J.value?.cancel(), q.value?.();
|
|
161
|
-
},
|
|
159
|
+
}, Z = () => {
|
|
162
160
|
q.value?.cancel(), J.value?.();
|
|
163
161
|
};
|
|
164
|
-
n(
|
|
165
|
-
|
|
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());
|
|
166
164
|
});
|
|
167
|
-
let
|
|
168
|
-
|
|
165
|
+
let Ee = () => {
|
|
166
|
+
I.value = {}, F.value = {}, L.value = {}, Q();
|
|
169
167
|
}, Q = () => {
|
|
170
|
-
|
|
171
|
-
let e =
|
|
172
|
-
(
|
|
173
|
-
}),
|
|
174
|
-
|
|
175
|
-
},
|
|
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) => {
|
|
176
174
|
e.preventDefault();
|
|
177
175
|
let t = e;
|
|
178
|
-
|
|
176
|
+
R.value = {
|
|
179
177
|
x: t.clientX,
|
|
180
178
|
y: t.clientY
|
|
181
|
-
},
|
|
179
|
+
}, D.value ? G() : X();
|
|
182
180
|
}));
|
|
183
181
|
};
|
|
184
|
-
|
|
185
|
-
|
|
182
|
+
ce(() => {
|
|
183
|
+
w.manual || Q();
|
|
186
184
|
});
|
|
187
|
-
let
|
|
188
|
-
|
|
185
|
+
let De = () => {
|
|
186
|
+
D.value || (T("after-leave"), w.destroyOnClose && (O.value = !1), W());
|
|
189
187
|
};
|
|
190
|
-
|
|
191
|
-
e && (!
|
|
192
|
-
}, { flush: "post" }),
|
|
193
|
-
() =>
|
|
194
|
-
() =>
|
|
195
|
-
() =>
|
|
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
|
|
196
194
|
], () => {
|
|
197
|
-
|
|
198
|
-
}),
|
|
199
|
-
e ?
|
|
200
|
-
}),
|
|
201
|
-
e !== t && (q.value?.cancel(),
|
|
202
|
-
}),
|
|
203
|
-
|
|
204
|
-
}),
|
|
205
|
-
show:
|
|
206
|
-
hide:
|
|
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
|
|
207
205
|
});
|
|
208
206
|
let $ = ne();
|
|
209
|
-
return [ee(() =>
|
|
207
|
+
return [ee(() => xe()), l(i, {
|
|
210
208
|
disabled: () => !d.teleportBody,
|
|
211
209
|
to: () => d.teleport
|
|
212
|
-
}, () => u(() =>
|
|
213
|
-
let e =
|
|
214
|
-
return
|
|
215
|
-
let n =
|
|
216
|
-
|
|
217
|
-
}),
|
|
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, {
|
|
218
216
|
name: "popover-fade",
|
|
219
|
-
onAfterLeave: () =>
|
|
217
|
+
onAfterLeave: () => De,
|
|
220
218
|
persisted: ""
|
|
221
219
|
}, () => {
|
|
222
|
-
let e =
|
|
223
|
-
return
|
|
224
|
-
|
|
225
|
-
}),
|
|
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, () => {
|
|
226
227
|
let e = ge();
|
|
227
|
-
return
|
|
228
|
-
|
|
229
|
-
let e = _e();
|
|
230
|
-
return p(() => {
|
|
231
|
-
m(e, [y(T).e("arrow")]), _(e, d.arrowStyle);
|
|
228
|
+
return m(() => {
|
|
229
|
+
h(e, [b(E).e("arrow")]), v(e, d.arrowStyle);
|
|
232
230
|
}), e;
|
|
233
|
-
}), o(e, () =>
|
|
234
|
-
}), $(t,
|
|
231
|
+
}), o(e, () => D.value), $(e, M, null, "contentNode"), e;
|
|
232
|
+
}), $(t, j, null, "wrapperNode"), $(e, A, null, "containerNode"), e;
|
|
235
233
|
}, null, 129))];
|
|
236
234
|
}
|
|
237
235
|
});
|
|
238
236
|
//#endregion
|
|
239
|
-
export {
|
|
237
|
+
export { C as default };
|
|
@@ -12,6 +12,7 @@ export declare const SStatistic: ((__VLS_props: NonNullable<Awaited<typeof __VLS
|
|
|
12
12
|
precision?: number | undefined;
|
|
13
13
|
showGroupSeparator?: boolean | undefined;
|
|
14
14
|
animation?: boolean | undefined;
|
|
15
|
+
duration?: number | undefined;
|
|
15
16
|
countdown?: boolean | undefined;
|
|
16
17
|
format?: string | undefined;
|
|
17
18
|
start?: boolean | undefined;
|