ep-craft 0.1.19 → 0.1.20
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/components/affix/affix.d.ts +55 -0
- package/dist/components/affix/affix.js +199 -0
- package/dist/components/affix/index.d.ts +2 -2
- package/dist/components/affix/index.js +3 -4
- package/dist/components/alert/alert.d.ts +39 -0
- package/dist/components/alert/alert.js +94 -0
- package/dist/components/alert/index.d.ts +2 -2
- package/dist/components/alert/index.js +3 -4
- package/dist/components/anchor/anchor.d.ts +54 -0
- package/dist/components/anchor/anchor.js +153 -0
- package/dist/components/anchor/index.d.ts +2 -2
- package/dist/components/anchor/index.js +3 -4
- package/dist/components/anchor-link/anchor-link.d.ts +17 -0
- package/dist/components/anchor-link/anchor-link.js +51 -0
- package/dist/components/anchor-link/index.d.ts +2 -2
- package/dist/components/anchor-link/index.js +6 -4
- package/dist/components/button/EpButton.vue.d.ts +7 -7
- package/dist/components/check-tag/EpCheckTag.vue.d.ts +1 -1
- package/dist/components/menu/menu.d.ts +6 -6
- package/dist/components/radio/radio.d.ts +2 -2
- package/dist/components/radio-button/radio-button.d.ts +2 -2
- package/dist/components/radio-group/radio-group.d.ts +2 -2
- package/dist/components/tab-pane/tab-pane.d.ts +2 -2
- package/dist/components/tabs/tabs.d.ts +1 -1
- package/dist/components/tag/EpTag.vue.d.ts +4 -4
- package/dist/node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/components/anchor/src/anchor.vue_vue_type_script_setup_true_lang.js +8 -8
- package/package.json +1 -1
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { ExtractPropTypes } from 'vue';
|
|
2
|
+
export declare const affixProps: {
|
|
3
|
+
readonly zIndex: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => string | number) | (() => string | number) | (((new (...args: any[]) => string | number) | (() => string | number)) | null)[], unknown, unknown, 100, boolean>;
|
|
4
|
+
readonly target: import("element-plus/es/utils/index.mjs").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
5
|
+
readonly offset: import("element-plus/es/utils/index.mjs").EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
|
|
6
|
+
readonly position: import("element-plus/es/utils/index.mjs").EpPropFinalized<StringConstructor, "top" | "bottom", unknown, "top", boolean>;
|
|
7
|
+
readonly teleported: BooleanConstructor;
|
|
8
|
+
readonly appendTo: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement) | (((new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement)) | null)[], unknown, unknown, "body", boolean>;
|
|
9
|
+
};
|
|
10
|
+
export type AffixProps = ExtractPropTypes<typeof affixProps>;
|
|
11
|
+
export declare const affixEmits: {
|
|
12
|
+
scroll: ({ scrollTop, fixed }: {
|
|
13
|
+
scrollTop: number;
|
|
14
|
+
fixed: boolean;
|
|
15
|
+
}) => boolean;
|
|
16
|
+
change: (fixed: boolean) => boolean;
|
|
17
|
+
};
|
|
18
|
+
export type AffixEmits = typeof affixEmits;
|
|
19
|
+
declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
20
|
+
readonly zIndex: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => string | number) | (() => string | number) | (((new (...args: any[]) => string | number) | (() => string | number)) | null)[], unknown, unknown, 100, boolean>;
|
|
21
|
+
readonly target: import("element-plus/es/utils/index.mjs").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
22
|
+
readonly offset: import("element-plus/es/utils/index.mjs").EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
|
|
23
|
+
readonly position: import("element-plus/es/utils/index.mjs").EpPropFinalized<StringConstructor, "top" | "bottom", unknown, "top", boolean>;
|
|
24
|
+
readonly teleported: BooleanConstructor;
|
|
25
|
+
readonly appendTo: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement) | (((new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement)) | null)[], unknown, unknown, "body", boolean>;
|
|
26
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
27
|
+
[key: string]: any;
|
|
28
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
29
|
+
scroll: ({ scrollTop, fixed }: {
|
|
30
|
+
scrollTop: number;
|
|
31
|
+
fixed: boolean;
|
|
32
|
+
}) => boolean;
|
|
33
|
+
change: (fixed: boolean) => boolean;
|
|
34
|
+
}, string, import("vue").PublicProps, Readonly<ExtractPropTypes<{
|
|
35
|
+
readonly zIndex: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => string | number) | (() => string | number) | (((new (...args: any[]) => string | number) | (() => string | number)) | null)[], unknown, unknown, 100, boolean>;
|
|
36
|
+
readonly target: import("element-plus/es/utils/index.mjs").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
37
|
+
readonly offset: import("element-plus/es/utils/index.mjs").EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
|
|
38
|
+
readonly position: import("element-plus/es/utils/index.mjs").EpPropFinalized<StringConstructor, "top" | "bottom", unknown, "top", boolean>;
|
|
39
|
+
readonly teleported: BooleanConstructor;
|
|
40
|
+
readonly appendTo: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement) | (((new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement)) | null)[], unknown, unknown, "body", boolean>;
|
|
41
|
+
}>> & Readonly<{
|
|
42
|
+
onChange?: ((fixed: boolean) => any) | undefined;
|
|
43
|
+
onScroll?: ((args_0: {
|
|
44
|
+
scrollTop: number;
|
|
45
|
+
fixed: boolean;
|
|
46
|
+
}) => any) | undefined;
|
|
47
|
+
}>, {
|
|
48
|
+
readonly zIndex: import("element-plus/es/utils/index.mjs").EpPropMergeType<(new (...args: any[]) => string | number) | (() => string | number) | (((new (...args: any[]) => string | number) | (() => string | number)) | null)[], unknown, unknown>;
|
|
49
|
+
readonly target: string;
|
|
50
|
+
readonly offset: number;
|
|
51
|
+
readonly position: import("element-plus/es/utils/index.mjs").EpPropMergeType<StringConstructor, "top" | "bottom", unknown>;
|
|
52
|
+
readonly appendTo: import("element-plus/es/utils/index.mjs").EpPropMergeType<(new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement) | (((new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement)) | null)[], unknown, unknown>;
|
|
53
|
+
readonly teleported: boolean;
|
|
54
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
55
|
+
export default _default;
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { defineComponent as D, shallowRef as s, ref as S, computed as T, watch as E, onMounted as C, onActivated as F, nextTick as R, onDeactivated as V, watchEffect as Y, h as z, Teleport as k, renderSlot as q } from "vue";
|
|
2
|
+
import { CHANGE_EVENT as H } from "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/constants/event.js";
|
|
3
|
+
import { isBoolean as W, isNumber as G } from "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/utils/types.js";
|
|
4
|
+
import { throwError as U } from "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/utils/error.js";
|
|
5
|
+
import { addUnit as J } from "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/utils/dom/style.js";
|
|
6
|
+
import { getScrollContainer as K } from "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/utils/dom/scroll.js";
|
|
7
|
+
import { buildProps as Q, definePropType as A } from "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/utils/vue/props/runtime.js";
|
|
8
|
+
import { useNamespace as X } from "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-namespace/index.js";
|
|
9
|
+
const Z = (e) => {
|
|
10
|
+
const t = (e == null ? void 0 : e.value) ?? e;
|
|
11
|
+
return t && typeof t == "object" && "$el" in t ? t.$el : t;
|
|
12
|
+
}, ee = (e, t) => {
|
|
13
|
+
let n;
|
|
14
|
+
const o = E(
|
|
15
|
+
e,
|
|
16
|
+
(i) => {
|
|
17
|
+
n == null || n.disconnect(), n = void 0, i && typeof ResizeObserver < "u" && (n = new ResizeObserver(t), n.observe(i));
|
|
18
|
+
},
|
|
19
|
+
{ immediate: !0, flush: "post" }
|
|
20
|
+
);
|
|
21
|
+
return {
|
|
22
|
+
stop: () => {
|
|
23
|
+
n == null || n.disconnect(), o();
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
}, te = (e, t, n) => {
|
|
27
|
+
let o;
|
|
28
|
+
const i = E(
|
|
29
|
+
e,
|
|
30
|
+
(u) => {
|
|
31
|
+
o == null || o.disconnect(), o = void 0, u && typeof MutationObserver < "u" && (o = new MutationObserver(t), o.observe(u, n));
|
|
32
|
+
},
|
|
33
|
+
{ immediate: !0, flush: "post" }
|
|
34
|
+
);
|
|
35
|
+
return {
|
|
36
|
+
stop: () => {
|
|
37
|
+
o == null || o.disconnect(), i();
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
function y(...e) {
|
|
42
|
+
const t = typeof e[0] == "string", n = t ? void 0 : e[0], o = t ? e[0] : e[1], i = t ? e[1] : e[2], u = t ? e[2] : e[3], r = E(
|
|
43
|
+
() => {
|
|
44
|
+
if (t) return window;
|
|
45
|
+
const l = n.value;
|
|
46
|
+
return l instanceof Window, l;
|
|
47
|
+
},
|
|
48
|
+
(l, c, f) => {
|
|
49
|
+
l && (l.addEventListener(o, i, u), f(() => l.removeEventListener(o, i, u)));
|
|
50
|
+
},
|
|
51
|
+
{ immediate: !0 }
|
|
52
|
+
);
|
|
53
|
+
return () => r();
|
|
54
|
+
}
|
|
55
|
+
const oe = () => {
|
|
56
|
+
const e = s(Number.POSITIVE_INFINITY), t = () => {
|
|
57
|
+
e.value = window.innerHeight;
|
|
58
|
+
};
|
|
59
|
+
return t(), y("resize", t, { passive: !0 }), { height: e };
|
|
60
|
+
}, B = (e, t = {}) => {
|
|
61
|
+
const { windowScroll: n = !0, windowResize: o = !0 } = t, i = s(0), u = s(0), r = s(0), l = s(0), c = s(0), f = s(0), d = () => {
|
|
62
|
+
const m = Z(e);
|
|
63
|
+
if (!m) {
|
|
64
|
+
i.value = 0, u.value = 0, r.value = 0, l.value = 0, c.value = 0, f.value = 0;
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
const v = m.getBoundingClientRect();
|
|
68
|
+
i.value = v.height, u.value = v.bottom, r.value = v.left, l.value = v.right, c.value = v.top, f.value = v.width;
|
|
69
|
+
};
|
|
70
|
+
return ee(e, d), te(e, d, { attributeFilter: ["style", "class"] }), n && y("scroll", d, { capture: !0, passive: !0 }), o && y("resize", d, { passive: !0 }), C(d), { height: i, bottom: u, left: r, right: l, top: c, width: f, update: d };
|
|
71
|
+
}, ne = Q({
|
|
72
|
+
/** affix element zIndex value */
|
|
73
|
+
zIndex: {
|
|
74
|
+
type: A([Number, String]),
|
|
75
|
+
default: 100
|
|
76
|
+
},
|
|
77
|
+
/** target container. (CSS selector) */
|
|
78
|
+
target: {
|
|
79
|
+
type: String,
|
|
80
|
+
default: ""
|
|
81
|
+
},
|
|
82
|
+
/** offset distance */
|
|
83
|
+
offset: {
|
|
84
|
+
type: Number,
|
|
85
|
+
default: 0
|
|
86
|
+
},
|
|
87
|
+
/** position of affix */
|
|
88
|
+
position: {
|
|
89
|
+
type: String,
|
|
90
|
+
values: ["top", "bottom"],
|
|
91
|
+
default: "top"
|
|
92
|
+
},
|
|
93
|
+
/** whether affix element is teleported, if `true` it will be teleported to where `append-to` sets */
|
|
94
|
+
teleported: Boolean,
|
|
95
|
+
/** which element the affix element appends to */
|
|
96
|
+
appendTo: {
|
|
97
|
+
type: A([String, Object]),
|
|
98
|
+
default: "body"
|
|
99
|
+
}
|
|
100
|
+
}), le = {
|
|
101
|
+
scroll: ({ scrollTop: e, fixed: t }) => G(e) && W(t),
|
|
102
|
+
[H]: (e) => W(e)
|
|
103
|
+
}, ve = D({
|
|
104
|
+
name: "EpAffix",
|
|
105
|
+
props: ne,
|
|
106
|
+
emits: le,
|
|
107
|
+
setup(e, { emit: t, slots: n, expose: o }) {
|
|
108
|
+
const i = X("affix"), u = s(), r = s(), l = s(), { height: c } = oe(), {
|
|
109
|
+
height: f,
|
|
110
|
+
width: d,
|
|
111
|
+
top: m,
|
|
112
|
+
bottom: v,
|
|
113
|
+
left: L,
|
|
114
|
+
update: g
|
|
115
|
+
} = B(r, { windowScroll: !1 }), b = B(u), a = S(!1), N = S(0), x = S(0), M = T(() => !e.teleported || !a.value), P = T(() => ({
|
|
116
|
+
display: "flow-root",
|
|
117
|
+
height: a.value ? `${f.value}px` : "",
|
|
118
|
+
width: a.value ? `${d.value}px` : ""
|
|
119
|
+
})), _ = T(() => {
|
|
120
|
+
if (!a.value) return {};
|
|
121
|
+
const p = J(e.offset);
|
|
122
|
+
return {
|
|
123
|
+
height: `${f.value}px`,
|
|
124
|
+
width: `${d.value}px`,
|
|
125
|
+
top: e.position === "top" ? p : "",
|
|
126
|
+
bottom: e.position === "bottom" ? p : "",
|
|
127
|
+
left: e.teleported ? `${L.value}px` : "",
|
|
128
|
+
transform: x.value ? `translateY(${x.value}px)` : "",
|
|
129
|
+
zIndex: e.zIndex
|
|
130
|
+
};
|
|
131
|
+
}), O = () => {
|
|
132
|
+
if (!l.value) return;
|
|
133
|
+
N.value = l.value instanceof Window ? document.documentElement.scrollTop : l.value.scrollTop || 0;
|
|
134
|
+
const { position: p, offset: h } = e, I = h + f.value;
|
|
135
|
+
if (p === "top")
|
|
136
|
+
if (e.target) {
|
|
137
|
+
const w = b.bottom.value - I;
|
|
138
|
+
a.value = h > m.value && b.bottom.value > 0, x.value = w < 0 ? w : 0;
|
|
139
|
+
} else
|
|
140
|
+
a.value = h > m.value;
|
|
141
|
+
else if (e.target) {
|
|
142
|
+
const w = c.value - b.top.value - I;
|
|
143
|
+
a.value = c.value - h < v.value && c.value > b.top.value, x.value = w < 0 ? -w : 0;
|
|
144
|
+
} else
|
|
145
|
+
a.value = c.value - h < v.value;
|
|
146
|
+
}, $ = async () => {
|
|
147
|
+
if (!a.value) {
|
|
148
|
+
g();
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
a.value = !1, await R(), g(), a.value = !0;
|
|
152
|
+
}, j = async () => {
|
|
153
|
+
g(), await R(), t("scroll", {
|
|
154
|
+
scrollTop: N.value,
|
|
155
|
+
fixed: a.value
|
|
156
|
+
});
|
|
157
|
+
};
|
|
158
|
+
return E(a, (p) => t(H, p)), C(() => {
|
|
159
|
+
e.target ? (u.value = document.querySelector(e.target) ?? void 0, u.value || U("EpAffix", `Target does not exist: ${e.target}`)) : u.value = document.documentElement, l.value = K(r.value, !0), g();
|
|
160
|
+
}), F(() => {
|
|
161
|
+
R($);
|
|
162
|
+
}), V(() => {
|
|
163
|
+
a.value = !1;
|
|
164
|
+
}), y(l, "scroll", j), Y(O), o({
|
|
165
|
+
/** update affix status */
|
|
166
|
+
update: O,
|
|
167
|
+
/** update rootRect info */
|
|
168
|
+
updateRoot: $
|
|
169
|
+
}), () => z(
|
|
170
|
+
"div",
|
|
171
|
+
{
|
|
172
|
+
ref: r,
|
|
173
|
+
class: i.b(),
|
|
174
|
+
style: P.value
|
|
175
|
+
},
|
|
176
|
+
[
|
|
177
|
+
z(
|
|
178
|
+
k,
|
|
179
|
+
{ disabled: M.value, to: e.appendTo },
|
|
180
|
+
[
|
|
181
|
+
z(
|
|
182
|
+
"div",
|
|
183
|
+
{
|
|
184
|
+
class: { [i.m("fixed")]: a.value },
|
|
185
|
+
style: _.value
|
|
186
|
+
},
|
|
187
|
+
[q(n, "default")]
|
|
188
|
+
)
|
|
189
|
+
]
|
|
190
|
+
)
|
|
191
|
+
]
|
|
192
|
+
);
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
export {
|
|
196
|
+
le as affixEmits,
|
|
197
|
+
ne as affixProps,
|
|
198
|
+
ve as default
|
|
199
|
+
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/index.js";
|
|
2
1
|
import { withInstall as f } from "../../utils/with-install.js";
|
|
3
|
-
import
|
|
4
|
-
const t =
|
|
2
|
+
import i from "./affix.js";
|
|
3
|
+
const t = f(i, "ep-affix");
|
|
5
4
|
export {
|
|
6
|
-
|
|
5
|
+
t as EpAffix
|
|
7
6
|
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EpAlert —— 从 element-plus 的 alert 源码 vendored 而来(el -> ep 命名),
|
|
3
|
+
* 样式复用仓库内置的 theme-chalk/src/alert.scss(命名空间为 el)。
|
|
4
|
+
*/
|
|
5
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
|
+
readonly title: import("element-plus/es/utils/index.mjs").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
7
|
+
readonly description: import("element-plus/es/utils/index.mjs").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
8
|
+
readonly type: import("element-plus/es/utils/index.mjs").EpPropFinalized<StringConstructor, "error" | "primary" | "success" | "info" | "warning", unknown, "info", boolean>;
|
|
9
|
+
readonly closable: import("element-plus/es/utils/index.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
10
|
+
readonly closeText: import("element-plus/es/utils/index.mjs").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
11
|
+
readonly showIcon: BooleanConstructor;
|
|
12
|
+
readonly center: BooleanConstructor;
|
|
13
|
+
readonly effect: import("element-plus/es/utils/index.mjs").EpPropFinalized<StringConstructor, "dark" | "light", unknown, "light", boolean>;
|
|
14
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
|
+
close: (evt: MouseEvent) => boolean;
|
|
18
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
19
|
+
readonly title: import("element-plus/es/utils/index.mjs").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
20
|
+
readonly description: import("element-plus/es/utils/index.mjs").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
21
|
+
readonly type: import("element-plus/es/utils/index.mjs").EpPropFinalized<StringConstructor, "error" | "primary" | "success" | "info" | "warning", unknown, "info", boolean>;
|
|
22
|
+
readonly closable: import("element-plus/es/utils/index.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
23
|
+
readonly closeText: import("element-plus/es/utils/index.mjs").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
24
|
+
readonly showIcon: BooleanConstructor;
|
|
25
|
+
readonly center: BooleanConstructor;
|
|
26
|
+
readonly effect: import("element-plus/es/utils/index.mjs").EpPropFinalized<StringConstructor, "dark" | "light", unknown, "light", boolean>;
|
|
27
|
+
}>> & Readonly<{
|
|
28
|
+
onClose?: ((evt: MouseEvent) => any) | undefined;
|
|
29
|
+
}>, {
|
|
30
|
+
readonly type: import("element-plus/es/utils/index.mjs").EpPropMergeType<StringConstructor, "error" | "primary" | "success" | "info" | "warning", unknown>;
|
|
31
|
+
readonly title: string;
|
|
32
|
+
readonly center: boolean;
|
|
33
|
+
readonly description: string;
|
|
34
|
+
readonly closable: import("element-plus/es/utils/index.mjs").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
35
|
+
readonly closeText: string;
|
|
36
|
+
readonly showIcon: boolean;
|
|
37
|
+
readonly effect: import("element-plus/es/utils/index.mjs").EpPropMergeType<StringConstructor, "dark" | "light", unknown>;
|
|
38
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
39
|
+
export default _default;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { defineComponent as p, ref as b, computed as u, h as n, Transition as h, withDirectives as T, renderSlot as o, vShow as w } from "vue";
|
|
2
|
+
import { alertEmits as y, alertProps as E } from "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/components/alert/src/alert.js";
|
|
3
|
+
import { useNamespace as x } from "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-namespace/index.js";
|
|
4
|
+
import { ElIcon as f } from "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/components/icon/index.js";
|
|
5
|
+
import { TypeComponentsMap as k, TypeComponents as A } from "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/utils/vue/icon.js";
|
|
6
|
+
import { flattedChildren as D, isComment as I } from "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/utils/vue/vnode.js";
|
|
7
|
+
const j = p({
|
|
8
|
+
name: "EpAlert",
|
|
9
|
+
props: E,
|
|
10
|
+
emits: y,
|
|
11
|
+
setup(t, { emit: d, slots: l }) {
|
|
12
|
+
const { Close: v } = A, e = x("alert"), a = b(!0), r = u(() => k[t.type]), c = u(() => {
|
|
13
|
+
var m;
|
|
14
|
+
if (t.description) return !0;
|
|
15
|
+
const i = (m = l.default) == null ? void 0 : m.call(l);
|
|
16
|
+
return i ? D(i).some((C) => !I(C)) : !1;
|
|
17
|
+
}), s = (i) => {
|
|
18
|
+
a.value = !1, d("close", i);
|
|
19
|
+
};
|
|
20
|
+
return () => n(
|
|
21
|
+
h,
|
|
22
|
+
{ name: e.b("fade") },
|
|
23
|
+
{
|
|
24
|
+
default: () => [
|
|
25
|
+
T(
|
|
26
|
+
n(
|
|
27
|
+
"div",
|
|
28
|
+
{
|
|
29
|
+
class: [
|
|
30
|
+
e.b(),
|
|
31
|
+
e.m(t.type),
|
|
32
|
+
e.is("center", t.center),
|
|
33
|
+
e.is(t.effect)
|
|
34
|
+
],
|
|
35
|
+
role: "alert"
|
|
36
|
+
},
|
|
37
|
+
[
|
|
38
|
+
t.showIcon && (l.icon || r.value) ? n(
|
|
39
|
+
f,
|
|
40
|
+
{
|
|
41
|
+
class: [e.e("icon"), e.is("big", c.value)]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
default: () => o(l, "icon", {}, () => [
|
|
45
|
+
n(r.value)
|
|
46
|
+
])
|
|
47
|
+
}
|
|
48
|
+
) : null,
|
|
49
|
+
n("div", { class: e.e("content") }, [
|
|
50
|
+
t.title || l.title ? n(
|
|
51
|
+
"span",
|
|
52
|
+
{
|
|
53
|
+
class: [
|
|
54
|
+
e.e("title"),
|
|
55
|
+
{ "with-description": c.value }
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
[
|
|
59
|
+
o(l, "title", {}, () => [t.title])
|
|
60
|
+
]
|
|
61
|
+
) : null,
|
|
62
|
+
c.value ? n("p", { class: e.e("description") }, [
|
|
63
|
+
o(l, "default", {}, () => [
|
|
64
|
+
t.description
|
|
65
|
+
])
|
|
66
|
+
]) : null,
|
|
67
|
+
t.closable ? t.closeText ? n(
|
|
68
|
+
"div",
|
|
69
|
+
{
|
|
70
|
+
class: [e.e("close-btn"), e.is("customed")],
|
|
71
|
+
onClick: s
|
|
72
|
+
},
|
|
73
|
+
t.closeText
|
|
74
|
+
) : n(
|
|
75
|
+
f,
|
|
76
|
+
{
|
|
77
|
+
class: e.e("close-btn"),
|
|
78
|
+
onClick: s
|
|
79
|
+
},
|
|
80
|
+
{ default: () => [n(v)] }
|
|
81
|
+
) : null
|
|
82
|
+
])
|
|
83
|
+
]
|
|
84
|
+
),
|
|
85
|
+
[[w, a.value]]
|
|
86
|
+
)
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
export {
|
|
93
|
+
j as default
|
|
94
|
+
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/index.js";
|
|
2
1
|
import { withInstall as t } from "../../utils/with-install.js";
|
|
3
|
-
import
|
|
4
|
-
const e =
|
|
2
|
+
import r from "./alert.js";
|
|
3
|
+
const e = t(r, "ep-alert");
|
|
5
4
|
export {
|
|
6
|
-
|
|
5
|
+
e as EpAlert
|
|
7
6
|
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EpAnchor —— 从 element-plus 的 anchor 源码 vendored 而来(el -> ep 命名),
|
|
3
|
+
* 样式复用仓库内置的 theme-chalk/src/anchor.scss(命名空间为 el)。
|
|
4
|
+
*
|
|
5
|
+
* 注意:anchor 依赖 @vueuse/core 的 useEventListener,本仓库未直接依赖
|
|
6
|
+
* @vueuse/core,按 affix 的做法内联了精简实现。anchorKey 与 EpAnchorLink
|
|
7
|
+
* 共用 element-plus constants.mjs 中的同一 Symbol,父子识别不受组件改名影响。
|
|
8
|
+
*/
|
|
9
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
10
|
+
container: {
|
|
11
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<(new (...args: any[]) => string | Window | HTMLElement) | (() => string | Window | HTMLElement | null) | (((new (...args: any[]) => string | Window | HTMLElement) | (() => string | Window | HTMLElement | null)) | null)[], unknown, unknown>>;
|
|
12
|
+
readonly required: false;
|
|
13
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
14
|
+
__epPropKey: true;
|
|
15
|
+
};
|
|
16
|
+
offset: import("element-plus/es/utils/index.mjs").EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
|
|
17
|
+
bound: import("element-plus/es/utils/index.mjs").EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
|
|
18
|
+
duration: import("element-plus/es/utils/index.mjs").EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
|
|
19
|
+
marker: import("element-plus/es/utils/index.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
|
|
20
|
+
type: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => "default" | "underline") | (() => "default" | "underline") | (((new (...args: any[]) => "default" | "underline") | (() => "default" | "underline")) | null)[], unknown, unknown, string, boolean>;
|
|
21
|
+
direction: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical") | (((new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical")) | null)[], unknown, unknown, string, boolean>;
|
|
22
|
+
selectScrollTop: BooleanConstructor;
|
|
23
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
26
|
+
change: (href: string) => boolean;
|
|
27
|
+
click: (e: MouseEvent, href?: string) => boolean;
|
|
28
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
29
|
+
container: {
|
|
30
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<(new (...args: any[]) => string | Window | HTMLElement) | (() => string | Window | HTMLElement | null) | (((new (...args: any[]) => string | Window | HTMLElement) | (() => string | Window | HTMLElement | null)) | null)[], unknown, unknown>>;
|
|
31
|
+
readonly required: false;
|
|
32
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
33
|
+
__epPropKey: true;
|
|
34
|
+
};
|
|
35
|
+
offset: import("element-plus/es/utils/index.mjs").EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
|
|
36
|
+
bound: import("element-plus/es/utils/index.mjs").EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
|
|
37
|
+
duration: import("element-plus/es/utils/index.mjs").EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
|
|
38
|
+
marker: import("element-plus/es/utils/index.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
|
|
39
|
+
type: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => "default" | "underline") | (() => "default" | "underline") | (((new (...args: any[]) => "default" | "underline") | (() => "default" | "underline")) | null)[], unknown, unknown, string, boolean>;
|
|
40
|
+
direction: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical") | (((new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical")) | null)[], unknown, unknown, string, boolean>;
|
|
41
|
+
selectScrollTop: BooleanConstructor;
|
|
42
|
+
}>> & Readonly<{
|
|
43
|
+
onChange?: ((href: string) => any) | undefined;
|
|
44
|
+
onClick?: ((e: MouseEvent, href?: string | undefined) => any) | undefined;
|
|
45
|
+
}>, {
|
|
46
|
+
type: import("element-plus/es/utils/index.mjs").EpPropMergeType<(new (...args: any[]) => "default" | "underline") | (() => "default" | "underline") | ((new (...args: any[]) => "default" | "underline") | (() => "default" | "underline") | null)[], unknown, unknown>;
|
|
47
|
+
offset: number;
|
|
48
|
+
marker: import("element-plus/es/utils/index.mjs").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
49
|
+
direction: import("element-plus/es/utils/index.mjs").EpPropMergeType<(new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical") | ((new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical") | null)[], unknown, unknown>;
|
|
50
|
+
duration: number;
|
|
51
|
+
bound: number;
|
|
52
|
+
selectScrollTop: boolean;
|
|
53
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
54
|
+
export default _default;
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { defineComponent as j, ref as d, computed as z, watch as k, onMounted as D, provide as G, h as S, renderSlot as I, nextTick as K } from "vue";
|
|
2
|
+
import { CHANGE_EVENT as P } from "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/constants/event.js";
|
|
3
|
+
import { getOffsetTopDistance as H } from "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/utils/dom/position.js";
|
|
4
|
+
import { isWindow as V, isUndefined as q } from "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/utils/types.js";
|
|
5
|
+
import { getScrollElement as B, animateScrollTo as F, getScrollTop as b } from "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/utils/dom/scroll.js";
|
|
6
|
+
import { getElement as g } from "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/utils/dom/element.js";
|
|
7
|
+
import { throttleByRaf as J } from "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/utils/throttleByRaf.js";
|
|
8
|
+
import { useNamespace as Q } from "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-namespace/index.js";
|
|
9
|
+
import { anchorEmits as X, anchorProps as Y } from "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/components/anchor/src/anchor.js";
|
|
10
|
+
import { anchorKey as Z } from "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/components/anchor/src/constants.js";
|
|
11
|
+
function ee(r, f, a, v) {
|
|
12
|
+
const l = k(
|
|
13
|
+
() => {
|
|
14
|
+
const c = r.value;
|
|
15
|
+
return c instanceof Window, c;
|
|
16
|
+
},
|
|
17
|
+
(c, h, m) => {
|
|
18
|
+
c && (c.addEventListener(f, a, v), m(() => c.removeEventListener(f, a, v)));
|
|
19
|
+
},
|
|
20
|
+
{ immediate: !0 }
|
|
21
|
+
);
|
|
22
|
+
return () => l();
|
|
23
|
+
}
|
|
24
|
+
const fe = j({
|
|
25
|
+
name: "EpAnchor",
|
|
26
|
+
props: Y,
|
|
27
|
+
emits: X,
|
|
28
|
+
setup(r, { emit: f, slots: a, expose: v }) {
|
|
29
|
+
const l = d(""), c = d({}), h = d(), m = d(), i = d(), p = {};
|
|
30
|
+
let E = !1, w = 0;
|
|
31
|
+
const u = Q("anchor"), M = z(() => [
|
|
32
|
+
u.b(),
|
|
33
|
+
r.type === "underline" ? u.m("underline") : "",
|
|
34
|
+
u.m(r.direction)
|
|
35
|
+
]), N = (e) => {
|
|
36
|
+
p[e.href] = e.el;
|
|
37
|
+
}, W = (e) => {
|
|
38
|
+
delete p[e];
|
|
39
|
+
}, y = (e) => {
|
|
40
|
+
l.value !== e && (l.value = e, f(P, e));
|
|
41
|
+
};
|
|
42
|
+
let T = null, C = "";
|
|
43
|
+
const _ = (e) => {
|
|
44
|
+
if (!i.value) return;
|
|
45
|
+
const o = g(e);
|
|
46
|
+
if (!o) return;
|
|
47
|
+
if (T) {
|
|
48
|
+
if (C === e) return;
|
|
49
|
+
T();
|
|
50
|
+
}
|
|
51
|
+
C = e, E = !0;
|
|
52
|
+
const t = B(o, i.value), n = H(o, t), s = t.scrollHeight - t.clientHeight, U = Math.min(n - r.offset, s);
|
|
53
|
+
T = F(
|
|
54
|
+
i.value,
|
|
55
|
+
w,
|
|
56
|
+
U,
|
|
57
|
+
r.duration,
|
|
58
|
+
() => {
|
|
59
|
+
setTimeout(() => {
|
|
60
|
+
E = !1, C = "";
|
|
61
|
+
}, 20);
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
}, R = (e) => {
|
|
65
|
+
e && (y(e), _(e));
|
|
66
|
+
}, $ = (e, o) => {
|
|
67
|
+
f("click", e, o), R(o);
|
|
68
|
+
}, O = () => {
|
|
69
|
+
if (!i.value) return;
|
|
70
|
+
const e = b(i.value), o = [];
|
|
71
|
+
for (const t of Object.keys(p)) {
|
|
72
|
+
const n = g(t);
|
|
73
|
+
if (!n) continue;
|
|
74
|
+
const s = H(
|
|
75
|
+
n,
|
|
76
|
+
B(n, i.value)
|
|
77
|
+
);
|
|
78
|
+
o.push({
|
|
79
|
+
top: s - r.offset - r.bound,
|
|
80
|
+
href: t
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
o.sort((t, n) => t.top - n.top);
|
|
84
|
+
for (let t = 0; t < o.length; t++) {
|
|
85
|
+
const n = o[t], s = o[t + 1];
|
|
86
|
+
if (t === 0 && e === 0)
|
|
87
|
+
return r.selectScrollTop ? n.href : "";
|
|
88
|
+
if (n.top <= e && (!s || s.top > e))
|
|
89
|
+
return n.href;
|
|
90
|
+
}
|
|
91
|
+
}, x = J(() => {
|
|
92
|
+
i.value && (w = b(i.value));
|
|
93
|
+
const e = O();
|
|
94
|
+
E || q(e) || y(e);
|
|
95
|
+
}), A = () => {
|
|
96
|
+
const e = g(r.container);
|
|
97
|
+
!e || V(e) ? i.value = window : i.value = e;
|
|
98
|
+
};
|
|
99
|
+
ee(i, "scroll", x);
|
|
100
|
+
const L = () => {
|
|
101
|
+
K(() => {
|
|
102
|
+
if (!h.value || !m.value || !l.value) {
|
|
103
|
+
c.value = {};
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
const e = p[l.value];
|
|
107
|
+
if (!e) {
|
|
108
|
+
c.value = {};
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
const o = h.value.getBoundingClientRect(), t = m.value.getBoundingClientRect(), n = e.getBoundingClientRect();
|
|
112
|
+
r.direction === "horizontal" ? c.value = {
|
|
113
|
+
left: `${n.left - o.left}px`,
|
|
114
|
+
width: `${n.width}px`,
|
|
115
|
+
opacity: 1
|
|
116
|
+
} : c.value = {
|
|
117
|
+
top: `${n.top - o.top + (n.height - t.height) / 2}px`,
|
|
118
|
+
opacity: 1
|
|
119
|
+
};
|
|
120
|
+
});
|
|
121
|
+
};
|
|
122
|
+
return k(l, L), k(() => {
|
|
123
|
+
var e;
|
|
124
|
+
return (e = a.default) == null ? void 0 : e.call(a);
|
|
125
|
+
}, L), D(() => {
|
|
126
|
+
A();
|
|
127
|
+
const e = decodeURIComponent(window.location.hash);
|
|
128
|
+
g(e) ? R(e) : x();
|
|
129
|
+
}), k(
|
|
130
|
+
() => r.container,
|
|
131
|
+
() => {
|
|
132
|
+
A();
|
|
133
|
+
}
|
|
134
|
+
), G(Z, {
|
|
135
|
+
ns: u,
|
|
136
|
+
direction: r.direction,
|
|
137
|
+
currentAnchor: l,
|
|
138
|
+
addLink: N,
|
|
139
|
+
removeLink: W,
|
|
140
|
+
handleClick: $
|
|
141
|
+
}), v({ scrollTo: R }), () => S("div", { ref: h, class: M.value }, [
|
|
142
|
+
r.marker ? S("div", {
|
|
143
|
+
ref: m,
|
|
144
|
+
class: u.e("marker"),
|
|
145
|
+
style: c.value
|
|
146
|
+
}) : null,
|
|
147
|
+
S("div", { class: u.e("list") }, [I(a, "default")])
|
|
148
|
+
]);
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
export {
|
|
152
|
+
fe as default
|
|
153
|
+
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/index.js";
|
|
2
1
|
import { withInstall as o } from "../../utils/with-install.js";
|
|
3
|
-
import
|
|
4
|
-
const n =
|
|
2
|
+
import r from "./anchor.js";
|
|
3
|
+
const n = o(r, "ep-anchor");
|
|
5
4
|
export {
|
|
6
|
-
|
|
5
|
+
n as EpAnchor
|
|
7
6
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EpAnchorLink —— 从 element-plus 的 anchor-link 源码 vendored 而来(el -> ep 命名),
|
|
3
|
+
* 样式复用仓库内置的 theme-chalk/src/anchor.scss(命名空间为 el)。
|
|
4
|
+
*
|
|
5
|
+
* 通过 inject(anchorKey) 识别父级 EpAnchor,anchorKey 与 EpAnchor 共用
|
|
6
|
+
* element-plus constants.mjs 中的同一 Symbol,父子识别不受组件改名影响。
|
|
7
|
+
*/
|
|
8
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
9
|
+
title: StringConstructor;
|
|
10
|
+
href: StringConstructor;
|
|
11
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
14
|
+
title: StringConstructor;
|
|
15
|
+
href: StringConstructor;
|
|
16
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { defineComponent as m, ref as v, inject as C, computed as L, watch as x, nextTick as A, onMounted as b, onBeforeUnmount as E, h as r, renderSlot as a } from "vue";
|
|
2
|
+
import { anchorKey as j } from "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/components/anchor/src/constants.js";
|
|
3
|
+
import { anchorLinkProps as w } from "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/components/anchor/src/anchor-link.js";
|
|
4
|
+
const K = m({
|
|
5
|
+
name: "EpAnchorLink",
|
|
6
|
+
props: w,
|
|
7
|
+
setup(n, { slots: t }) {
|
|
8
|
+
const c = v(), {
|
|
9
|
+
ns: i,
|
|
10
|
+
direction: h,
|
|
11
|
+
currentAnchor: u,
|
|
12
|
+
addLink: o,
|
|
13
|
+
removeLink: l,
|
|
14
|
+
handleClick: k
|
|
15
|
+
} = C(j), d = L(() => [
|
|
16
|
+
i.e("link"),
|
|
17
|
+
i.is("active", u.value === n.href)
|
|
18
|
+
]), s = (e) => {
|
|
19
|
+
k(e, n.href);
|
|
20
|
+
};
|
|
21
|
+
return x(
|
|
22
|
+
() => n.href,
|
|
23
|
+
(e, f) => {
|
|
24
|
+
A(() => {
|
|
25
|
+
f && l(f), e && o({ href: e, el: c.value });
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
), b(() => {
|
|
29
|
+
const { href: e } = n;
|
|
30
|
+
e && o({ href: e, el: c.value });
|
|
31
|
+
}), E(() => {
|
|
32
|
+
const { href: e } = n;
|
|
33
|
+
e && l(e);
|
|
34
|
+
}), () => r("div", { class: i.e("item") }, [
|
|
35
|
+
r(
|
|
36
|
+
"a",
|
|
37
|
+
{
|
|
38
|
+
ref: c,
|
|
39
|
+
class: d.value,
|
|
40
|
+
href: n.href,
|
|
41
|
+
onClick: s
|
|
42
|
+
},
|
|
43
|
+
[a(t, "default", {}, () => [n.title])]
|
|
44
|
+
),
|
|
45
|
+
t["sub-link"] && h === "vertical" ? r("div", { class: i.e("list") }, [a(t, "sub-link")]) : null
|
|
46
|
+
]);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
export {
|
|
50
|
+
K as default
|
|
51
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Plugin } from 'vue';
|
|
2
|
-
import
|
|
3
|
-
export declare const EpAnchorLink: typeof
|
|
2
|
+
import _EpAnchorLink from './anchor-link';
|
|
3
|
+
export declare const EpAnchorLink: typeof _EpAnchorLink & Plugin;
|
|
4
4
|
export default EpAnchorLink;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import "../../
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { withInstall as o } from "../../utils/with-install.js";
|
|
2
|
+
import n from "./anchor-link.js";
|
|
3
|
+
const p = o(
|
|
4
|
+
n,
|
|
5
|
+
"ep-anchor-link"
|
|
6
|
+
);
|
|
5
7
|
export {
|
|
6
8
|
p as EpAnchorLink
|
|
7
9
|
};
|
|
@@ -66,7 +66,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
66
66
|
}>, {
|
|
67
67
|
ref: import("vue").Ref<HTMLButtonElement | undefined, HTMLButtonElement | undefined>;
|
|
68
68
|
size: import("vue").ComputedRef<"" | "default" | "small" | "large">;
|
|
69
|
-
type: import("vue").ComputedRef<"
|
|
69
|
+
type: import("vue").ComputedRef<"text" | "primary" | "success" | "info" | "warning" | "danger">;
|
|
70
70
|
disabled: import("vue").ComputedRef<boolean>;
|
|
71
71
|
shouldAddSpace: import("vue").ComputedRef<boolean>;
|
|
72
72
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -131,17 +131,17 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
131
131
|
}>> & Readonly<{
|
|
132
132
|
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
133
133
|
}>, {
|
|
134
|
-
readonly type: "
|
|
135
|
-
readonly
|
|
134
|
+
readonly type: "text" | "primary" | "success" | "info" | "warning" | "danger";
|
|
135
|
+
readonly link: boolean;
|
|
136
136
|
readonly disabled: boolean;
|
|
137
|
-
readonly
|
|
137
|
+
readonly circle: boolean;
|
|
138
138
|
readonly text: boolean;
|
|
139
|
+
readonly dark: boolean;
|
|
140
|
+
readonly autofocus: boolean;
|
|
139
141
|
readonly loading: boolean;
|
|
140
|
-
readonly
|
|
141
|
-
readonly nativeType: "button" | "submit" | "reset";
|
|
142
|
+
readonly nativeType: "button" | "reset" | "submit";
|
|
142
143
|
readonly loadingIcon: any;
|
|
143
144
|
readonly plain: boolean;
|
|
144
|
-
readonly link: boolean;
|
|
145
145
|
readonly bg: boolean;
|
|
146
146
|
readonly round: boolean;
|
|
147
147
|
readonly dashed: boolean;
|
|
@@ -25,7 +25,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
25
25
|
onChange?: ((value: boolean) => any) | undefined;
|
|
26
26
|
"onUpdate:checked"?: ((value: boolean) => any) | undefined;
|
|
27
27
|
}>, {
|
|
28
|
-
readonly type: "primary" | "success" | "
|
|
28
|
+
readonly type: "primary" | "success" | "info" | "warning" | "danger";
|
|
29
29
|
readonly disabled: boolean;
|
|
30
30
|
readonly checked: boolean;
|
|
31
31
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -16,7 +16,7 @@ export declare const menuProps: {
|
|
|
16
16
|
readonly ellipsis: import("element-plus/es/utils/index.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
17
17
|
readonly popperOffset: import("element-plus/es/utils/index.mjs").EpPropFinalized<NumberConstructor, unknown, unknown, 6, boolean>;
|
|
18
18
|
readonly ellipsisIcon: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown, () => import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, boolean>;
|
|
19
|
-
readonly popperEffect: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => "
|
|
19
|
+
readonly popperEffect: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => "dark" | "light") | (() => "dark" | "light") | (((new (...args: any[]) => "dark" | "light") | (() => "dark" | "light")) | null)[], unknown, unknown, "dark", boolean>;
|
|
20
20
|
readonly popperClass: StringConstructor;
|
|
21
21
|
readonly popperStyle: {
|
|
22
22
|
readonly type: import("vue").PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<(new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties) | (((new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties)) | null)[], unknown, unknown>>;
|
|
@@ -51,7 +51,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
51
51
|
readonly ellipsis: import("element-plus/es/utils/index.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
52
52
|
readonly popperOffset: import("element-plus/es/utils/index.mjs").EpPropFinalized<NumberConstructor, unknown, unknown, 6, boolean>;
|
|
53
53
|
readonly ellipsisIcon: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown, () => import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, boolean>;
|
|
54
|
-
readonly popperEffect: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => "
|
|
54
|
+
readonly popperEffect: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => "dark" | "light") | (() => "dark" | "light") | (((new (...args: any[]) => "dark" | "light") | (() => "dark" | "light")) | null)[], unknown, unknown, "dark", boolean>;
|
|
55
55
|
readonly popperClass: StringConstructor;
|
|
56
56
|
readonly popperStyle: {
|
|
57
57
|
readonly type: import("vue").PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<(new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties) | (((new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties)) | null)[], unknown, unknown>>;
|
|
@@ -84,7 +84,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
84
84
|
readonly ellipsis: import("element-plus/es/utils/index.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
85
85
|
readonly popperOffset: import("element-plus/es/utils/index.mjs").EpPropFinalized<NumberConstructor, unknown, unknown, 6, boolean>;
|
|
86
86
|
readonly ellipsisIcon: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown, () => import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, boolean>;
|
|
87
|
-
readonly popperEffect: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => "
|
|
87
|
+
readonly popperEffect: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => "dark" | "light") | (() => "dark" | "light") | (((new (...args: any[]) => "dark" | "light") | (() => "dark" | "light")) | null)[], unknown, unknown, "dark", boolean>;
|
|
88
88
|
readonly popperClass: StringConstructor;
|
|
89
89
|
readonly popperStyle: {
|
|
90
90
|
readonly type: import("vue").PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<(new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties) | (((new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties)) | null)[], unknown, unknown>>;
|
|
@@ -96,14 +96,14 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
96
96
|
readonly hideTimeout: import("element-plus/es/utils/index.mjs").EpPropFinalized<NumberConstructor, unknown, unknown, 300, boolean>;
|
|
97
97
|
readonly persistent: import("element-plus/es/utils/index.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
98
98
|
}>> & Readonly<{
|
|
99
|
-
onClose?: ((index: string, indexPath: string[]) => any) | undefined;
|
|
100
99
|
onSelect?: ((index: string, indexPath: string[], item: MenuItemClicked, routerResult?: Promise<unknown> | undefined) => any) | undefined;
|
|
100
|
+
onClose?: ((index: string, indexPath: string[]) => any) | undefined;
|
|
101
101
|
onOpen?: ((index: string, indexPath: string[]) => any) | undefined;
|
|
102
102
|
}>, {
|
|
103
|
+
readonly mode: import("element-plus/es/utils/index.mjs").EpPropMergeType<StringConstructor, "horizontal" | "vertical", unknown>;
|
|
103
104
|
readonly persistent: import("element-plus/es/utils/index.mjs").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
104
105
|
readonly showTimeout: number;
|
|
105
106
|
readonly hideTimeout: number;
|
|
106
|
-
readonly mode: import("element-plus/es/utils/index.mjs").EpPropMergeType<StringConstructor, "horizontal" | "vertical", unknown>;
|
|
107
107
|
readonly collapse: boolean;
|
|
108
108
|
readonly defaultActive: string;
|
|
109
109
|
readonly defaultOpeneds: string[];
|
|
@@ -112,7 +112,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
112
112
|
readonly ellipsis: import("element-plus/es/utils/index.mjs").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
113
113
|
readonly popperOffset: number;
|
|
114
114
|
readonly ellipsisIcon: import("element-plus/es/utils/index.mjs").EpPropMergeType<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown>;
|
|
115
|
-
readonly popperEffect: import("element-plus/es/utils/index.mjs").EpPropMergeType<(new (...args: any[]) => "
|
|
115
|
+
readonly popperEffect: import("element-plus/es/utils/index.mjs").EpPropMergeType<(new (...args: any[]) => "dark" | "light") | (() => "dark" | "light") | (((new (...args: any[]) => "dark" | "light") | (() => "dark" | "light")) | null)[], unknown, unknown>;
|
|
116
116
|
readonly uniqueOpened: boolean;
|
|
117
117
|
readonly router: boolean;
|
|
118
118
|
readonly closeOnClickOutside: boolean;
|
|
@@ -42,10 +42,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
42
42
|
"onUpdate:modelValue"?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
43
43
|
}>, {
|
|
44
44
|
readonly name: string;
|
|
45
|
+
readonly label: import("element-plus/es/utils/index.mjs").EpPropMergeType<(BooleanConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>;
|
|
45
46
|
readonly disabled: import("element-plus/es/utils/index.mjs").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
46
|
-
readonly modelValue: import("element-plus/es/utils/index.mjs").EpPropMergeType<(BooleanConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>;
|
|
47
47
|
readonly value: import("element-plus/es/utils/index.mjs").EpPropMergeType<(BooleanConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>;
|
|
48
|
-
readonly
|
|
48
|
+
readonly modelValue: import("element-plus/es/utils/index.mjs").EpPropMergeType<(BooleanConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>;
|
|
49
49
|
readonly border: boolean;
|
|
50
50
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
51
51
|
export default _default;
|
|
@@ -32,9 +32,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
32
32
|
readonly name: import("element-plus/es/utils/index.mjs").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
|
|
33
33
|
}>> & Readonly<{}>, {
|
|
34
34
|
readonly name: string;
|
|
35
|
+
readonly label: import("element-plus/es/utils/index.mjs").EpPropMergeType<(BooleanConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>;
|
|
35
36
|
readonly disabled: import("element-plus/es/utils/index.mjs").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
36
|
-
readonly modelValue: import("element-plus/es/utils/index.mjs").EpPropMergeType<(BooleanConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>;
|
|
37
37
|
readonly value: import("element-plus/es/utils/index.mjs").EpPropMergeType<(BooleanConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>;
|
|
38
|
-
readonly
|
|
38
|
+
readonly modelValue: import("element-plus/es/utils/index.mjs").EpPropMergeType<(BooleanConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>;
|
|
39
39
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
40
40
|
export default _default;
|
|
@@ -55,10 +55,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
55
55
|
}>, {
|
|
56
56
|
readonly props: import("element-plus").radioOptionProp;
|
|
57
57
|
readonly name: string;
|
|
58
|
-
readonly fill: string;
|
|
59
58
|
readonly type: import("element-plus/es/utils/index.mjs").EpPropMergeType<StringConstructor, "button" | "radio", unknown>;
|
|
60
|
-
readonly
|
|
59
|
+
readonly fill: string;
|
|
61
60
|
readonly disabled: import("element-plus/es/utils/index.mjs").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
61
|
+
readonly id: string;
|
|
62
62
|
readonly modelValue: import("element-plus/es/utils/index.mjs").EpPropMergeType<readonly [StringConstructor, NumberConstructor, BooleanConstructor], unknown, unknown>;
|
|
63
63
|
readonly validateEvent: import("element-plus/es/utils/index.mjs").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
64
64
|
readonly textColor: string;
|
|
@@ -23,9 +23,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
23
23
|
readonly disabled: BooleanConstructor;
|
|
24
24
|
readonly lazy: BooleanConstructor;
|
|
25
25
|
}>> & Readonly<{}>, {
|
|
26
|
-
readonly closable: import("element-plus/es/utils/index.mjs").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
27
|
-
readonly disabled: boolean;
|
|
28
26
|
readonly label: string;
|
|
27
|
+
readonly disabled: boolean;
|
|
28
|
+
readonly closable: import("element-plus/es/utils/index.mjs").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
29
29
|
readonly lazy: boolean;
|
|
30
30
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
31
31
|
export default _default;
|
|
@@ -105,7 +105,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
105
105
|
readonly editable: boolean;
|
|
106
106
|
readonly stretch: boolean;
|
|
107
107
|
readonly addable: boolean;
|
|
108
|
-
readonly tabPosition: import("element-plus/es/utils/index.mjs").EpPropMergeType<StringConstructor, "top" | "bottom" | "
|
|
108
|
+
readonly tabPosition: import("element-plus/es/utils/index.mjs").EpPropMergeType<StringConstructor, "top" | "bottom" | "left" | "right", unknown>;
|
|
109
109
|
readonly beforeLeave: (newName: TabPaneName, oldName: TabPaneName) => import("element-plus/es/utils/typescript.mjs").Awaitable<void | boolean>;
|
|
110
110
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
111
111
|
export default _default;
|
|
@@ -25,8 +25,8 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
25
25
|
};
|
|
26
26
|
readonly round: BooleanConstructor;
|
|
27
27
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
28
|
-
close: (evt: MouseEvent) => void;
|
|
29
28
|
click: (evt: MouseEvent) => void;
|
|
29
|
+
close: (evt: MouseEvent) => void;
|
|
30
30
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
31
31
|
readonly type: {
|
|
32
32
|
readonly type: import("vue").PropType<typeof import("./tag").tagTypes[number]>;
|
|
@@ -48,12 +48,12 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
48
48
|
};
|
|
49
49
|
readonly round: BooleanConstructor;
|
|
50
50
|
}>> & Readonly<{
|
|
51
|
-
onClose?: ((evt: MouseEvent) => any) | undefined;
|
|
52
51
|
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
52
|
+
onClose?: ((evt: MouseEvent) => any) | undefined;
|
|
53
53
|
}>, {
|
|
54
|
-
readonly type: "primary" | "success" | "
|
|
54
|
+
readonly type: "primary" | "success" | "info" | "warning" | "danger";
|
|
55
55
|
readonly closable: boolean;
|
|
56
|
-
readonly effect: "
|
|
56
|
+
readonly effect: "dark" | "light" | "plain";
|
|
57
57
|
readonly round: boolean;
|
|
58
58
|
readonly disableTransitions: boolean;
|
|
59
59
|
readonly hit: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CHANGE_EVENT as K } from "../../../constants/event.js";
|
|
2
2
|
import { getOffsetTopDistance as B } from "../../../utils/dom/position.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { isUndefined as P, isWindow as W } from "../../../utils/types.js";
|
|
4
|
+
import { getScrollTop as H, getScrollElement as L, animateScrollTo as q } from "../../../utils/dom/scroll.js";
|
|
5
5
|
import { getElement as m } from "../../../utils/dom/element.js";
|
|
6
6
|
import { throttleByRaf as F } from "../../../utils/throttleByRaf.js";
|
|
7
7
|
import { useNamespace as J } from "../../../hooks/use-namespace/index.js";
|
|
@@ -38,7 +38,7 @@ var Te = /* @__PURE__ */ ee({
|
|
|
38
38
|
g();
|
|
39
39
|
}
|
|
40
40
|
k = e, h = !0;
|
|
41
|
-
const o =
|
|
41
|
+
const o = L(t, l.value), n = B(t, o), s = o.scrollHeight - o.clientHeight, I = Math.min(n - r.offset, s);
|
|
42
42
|
g = q(l.value, S, I, r.duration, () => {
|
|
43
43
|
setTimeout(() => {
|
|
44
44
|
h = !1, k = "";
|
|
@@ -49,16 +49,16 @@ var Te = /* @__PURE__ */ ee({
|
|
|
49
49
|
}, D = (e, t) => {
|
|
50
50
|
R("click", e, t), y(t);
|
|
51
51
|
}, w = F(() => {
|
|
52
|
-
l.value && (S =
|
|
52
|
+
l.value && (S = H(l.value));
|
|
53
53
|
const e = G();
|
|
54
|
-
h ||
|
|
54
|
+
h || P(e) || _(e);
|
|
55
55
|
}), G = () => {
|
|
56
56
|
if (!l.value) return;
|
|
57
|
-
const e =
|
|
57
|
+
const e = H(l.value), t = [];
|
|
58
58
|
for (const o of Object.keys(f)) {
|
|
59
59
|
const n = m(o);
|
|
60
60
|
if (!n) continue;
|
|
61
|
-
const s = B(n,
|
|
61
|
+
const s = B(n, L(n, l.value));
|
|
62
62
|
t.push({
|
|
63
63
|
top: s - r.offset - r.bound,
|
|
64
64
|
href: o
|
|
@@ -72,7 +72,7 @@ var Te = /* @__PURE__ */ ee({
|
|
|
72
72
|
}
|
|
73
73
|
}, x = () => {
|
|
74
74
|
const e = m(r.container);
|
|
75
|
-
!e ||
|
|
75
|
+
!e || W(e) ? l.value = window : l.value = e;
|
|
76
76
|
};
|
|
77
77
|
Z(l, "scroll", w);
|
|
78
78
|
const A = () => {
|