vft 0.0.430 → 0.0.433
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/es/components/md-container/index.d.ts +9 -0
- package/es/components/md-container/md-container.vue.d.ts +2 -0
- package/es/components/md-container/md-container.vue2.js +78 -74
- package/es/components/menu/sub-menu.vue2.js +33 -31
- package/es/components/side-menu/side-menu.vue.d.ts +3 -3
- package/es/components/side-menu/side-menu.vue2.js +48 -46
- package/es/components/side-menu/use-drag-line.d.ts +3 -1
- package/es/components/side-menu/use-drag-line.js +33 -27
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/lib/components/md-container/index.d.ts +9 -0
- package/lib/components/md-container/md-container.vue.d.ts +2 -0
- package/lib/components/md-container/md-container.vue2.cjs +1 -1
- package/lib/components/menu/sub-menu.vue2.cjs +1 -1
- package/lib/components/side-menu/side-menu.vue.d.ts +3 -3
- package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
- package/lib/components/side-menu/use-drag-line.cjs +1 -1
- package/lib/components/side-menu/use-drag-line.d.ts +3 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +4 -4
- package/theme-style/index.css +1 -1
- package/theme-style/src/header-layout.scss +1 -1
- package/theme-style/src/menu.scss +7 -2
- package/theme-style/src/side-menu.scss +0 -3
- package/theme-style/vft-header-layout.css +1 -1
- package/theme-style/vft-menu.css +1 -1
- package/theme-style/vft-side-menu.css +1 -1
- package/web-types.json +1 -1
|
@@ -3,6 +3,9 @@ export declare const VftMdContainer: import("vft/es/utils").SFCWithInstall<{
|
|
|
3
3
|
tocList: {
|
|
4
4
|
type: import("vue").PropType<string>;
|
|
5
5
|
};
|
|
6
|
+
scrollDom: {
|
|
7
|
+
type: import("vue").PropType<string>;
|
|
8
|
+
};
|
|
6
9
|
}>> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
7
10
|
P: {};
|
|
8
11
|
B: {};
|
|
@@ -14,6 +17,9 @@ export declare const VftMdContainer: import("vft/es/utils").SFCWithInstall<{
|
|
|
14
17
|
tocList: {
|
|
15
18
|
type: import("vue").PropType<string>;
|
|
16
19
|
};
|
|
20
|
+
scrollDom: {
|
|
21
|
+
type: import("vue").PropType<string>;
|
|
22
|
+
};
|
|
17
23
|
}>> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
18
24
|
__isFragment?: never;
|
|
19
25
|
__isTeleport?: never;
|
|
@@ -22,6 +28,9 @@ export declare const VftMdContainer: import("vft/es/utils").SFCWithInstall<{
|
|
|
22
28
|
tocList: {
|
|
23
29
|
type: import("vue").PropType<string>;
|
|
24
30
|
};
|
|
31
|
+
scrollDom: {
|
|
32
|
+
type: import("vue").PropType<string>;
|
|
33
|
+
};
|
|
25
34
|
}>> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
26
35
|
$slots: {
|
|
27
36
|
default?(_: {}): any;
|
|
@@ -1,47 +1,48 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { VftIcon as
|
|
3
|
-
import { VftIconText as
|
|
4
|
-
import { VftMdComment as
|
|
5
|
-
import { VftSideMenu as
|
|
6
|
-
import { VftTag as
|
|
1
|
+
import { defineComponent as S, getCurrentInstance as R, ref as $, computed as v, onMounted as A, nextTick as P, onDeactivated as q, onBeforeMount as z, createElementBlock as u, openBlock as r, normalizeClass as c, unref as e, createBlock as C, createCommentVNode as x, createElementVNode as i, createVNode as m, toDisplayString as _, Fragment as I, renderList as B, withCtx as F, createTextVNode as H, renderSlot as J } from "vue";
|
|
2
|
+
import { VftIcon as k } from "../icon/index.js";
|
|
3
|
+
import { VftIconText as O } from "../icon-text/index.js";
|
|
4
|
+
import { VftMdComment as j } from "../md-comment/index.js";
|
|
5
|
+
import { VftSideMenu as U } from "../side-menu/index.js";
|
|
6
|
+
import { VftTag as Y } from "../tag/index.js";
|
|
7
7
|
import "@vueuse/core";
|
|
8
|
-
import { handleScrollPosition as
|
|
8
|
+
import { handleScrollPosition as G, jumpElement as b, getRandomElementForArr as K, isClient as Q } from "@vft/utils";
|
|
9
9
|
import "../config-provider/hooks/use-global-config.js";
|
|
10
|
-
import { primaryColor as
|
|
11
|
-
import { debounce as
|
|
10
|
+
import { primaryColor as W } from "../../utils/ns-cover.js";
|
|
11
|
+
import { debounce as X } from "lodash-es";
|
|
12
12
|
import "../form/index.js";
|
|
13
|
-
import { useNamespace as
|
|
13
|
+
import { useNamespace as Z } from "../../hooks/use-namespace/index.js";
|
|
14
14
|
import "../../hooks/use-model-toggle/index.js";
|
|
15
15
|
import "@popperjs/core";
|
|
16
16
|
import "../../hooks/use-z-index/index.js";
|
|
17
|
-
import { useRouterHelper as
|
|
18
|
-
import { useEventListener as
|
|
19
|
-
import { usePhotoSwipe as
|
|
20
|
-
import { formatToDateTime as
|
|
21
|
-
import { useCopyCode as
|
|
22
|
-
import { COMP_TYPE as
|
|
23
|
-
const
|
|
17
|
+
import { useRouterHelper as ee } from "@vft/router";
|
|
18
|
+
import { useEventListener as te } from "@vft/use";
|
|
19
|
+
import { usePhotoSwipe as oe } from "@vft/use/photoswipe";
|
|
20
|
+
import { formatToDateTime as ne, getDayTimestamp as ie } from "@vft/utils/date";
|
|
21
|
+
import { useCopyCode as ae } from "./use/useCopyCode.js";
|
|
22
|
+
import { COMP_TYPE as le } from "./utils.js";
|
|
23
|
+
const re = { class: "info-container" }, se = {
|
|
24
24
|
key: 0,
|
|
25
25
|
class: "left"
|
|
26
|
-
},
|
|
26
|
+
}, ce = { class: "infos" }, me = {
|
|
27
27
|
class: "reading",
|
|
28
28
|
title: "阅读量"
|
|
29
|
-
},
|
|
29
|
+
}, de = ["data-path"], ue = S({
|
|
30
30
|
name: "vft-md-container"
|
|
31
|
-
}),
|
|
32
|
-
...
|
|
31
|
+
}), Pe = /* @__PURE__ */ S({
|
|
32
|
+
...ue,
|
|
33
33
|
props: {
|
|
34
|
-
tocList: {}
|
|
34
|
+
tocList: {},
|
|
35
|
+
scrollDom: { default: ".layout-content" }
|
|
35
36
|
},
|
|
36
|
-
setup(
|
|
37
|
-
const l =
|
|
38
|
-
|
|
39
|
-
const p =
|
|
40
|
-
function
|
|
41
|
-
|
|
37
|
+
setup(s) {
|
|
38
|
+
const l = Z("md-container"), T = R(), f = $(), d = v(() => s.tocList && s.tocList !== "undefined" ? JSON.parse(s.tocList) : ""), { initPhotoSwipe: D } = oe(`.${l.e("content")} img`);
|
|
39
|
+
D(), ae();
|
|
40
|
+
const p = T.appContext.config.globalProperties.$router, a = p.currentRoute.value, L = W(), V = Q ? location.pathname : "", { go: w } = ee(p);
|
|
41
|
+
function E(o) {
|
|
42
|
+
w(`/?classify=${o}`);
|
|
42
43
|
}
|
|
43
|
-
const
|
|
44
|
-
() =>
|
|
44
|
+
const M = v(() => a.meta.category?.includes("api")), g = X(
|
|
45
|
+
() => G({
|
|
45
46
|
scrollDom: ".layout-content",
|
|
46
47
|
contentDom: ".header-anchor",
|
|
47
48
|
selectAttrName: "href",
|
|
@@ -53,31 +54,36 @@ const ie = { class: "info-container" }, ae = {
|
|
|
53
54
|
}
|
|
54
55
|
}),
|
|
55
56
|
100
|
|
56
|
-
)
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
), h = (o) => {
|
|
58
|
+
b(`#${o.index}`);
|
|
59
|
+
}, y = () => {
|
|
60
|
+
const o = document.querySelector(s.scrollDom);
|
|
61
|
+
o && o.removeEventListener("scroll", g);
|
|
62
|
+
};
|
|
63
|
+
return A(() => {
|
|
64
|
+
P(() => {
|
|
59
65
|
setTimeout(() => {
|
|
60
|
-
|
|
66
|
+
b(encodeURI(a.hash));
|
|
61
67
|
}), setTimeout(() => {
|
|
62
68
|
const t = document.querySelector(".layout-content");
|
|
63
|
-
t && t.addEventListener("scroll",
|
|
69
|
+
t && t.addEventListener("scroll", g);
|
|
64
70
|
}, 1500);
|
|
65
71
|
const o = document.querySelectorAll(".item.expand"), n = document.querySelectorAll(
|
|
66
72
|
"div.language-vue"
|
|
67
73
|
);
|
|
68
74
|
for (let t = 0; t < o.length; t++)
|
|
69
|
-
|
|
75
|
+
te(o[t], "click", () => {
|
|
70
76
|
n[t].offsetHeight === 0 ? (n[t].style.height = "auto", n[t].style.visibility = "visible") : (n[t].style.height = "0px", n[t].style.visibility = "hidden");
|
|
71
77
|
});
|
|
72
78
|
});
|
|
73
|
-
})
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
class:
|
|
79
|
+
}), q(() => {
|
|
80
|
+
y();
|
|
81
|
+
}), z(() => {
|
|
82
|
+
y();
|
|
83
|
+
}), (o, n) => (r(), u("div", {
|
|
84
|
+
class: c([e(l).b(), e(l).is("api", M.value)])
|
|
79
85
|
}, [
|
|
80
|
-
d.value?.length ? (r(),
|
|
86
|
+
d.value?.length ? (r(), C(e(U), {
|
|
81
87
|
key: 0,
|
|
82
88
|
ref_key: "sideMenuRef",
|
|
83
89
|
ref: f,
|
|
@@ -89,52 +95,50 @@ const ie = { class: "info-container" }, ae = {
|
|
|
89
95
|
"unique-opened": !1,
|
|
90
96
|
"disable-sub-menu-action": "",
|
|
91
97
|
"attr-mapping": {
|
|
92
|
-
index: "slug"
|
|
93
|
-
originIndex: "slug",
|
|
94
|
-
originChildren: "children"
|
|
98
|
+
index: "slug"
|
|
95
99
|
},
|
|
96
|
-
onSelect:
|
|
97
|
-
onSubMenuClick:
|
|
98
|
-
}, null, 8, ["default-active", "menus"])) :
|
|
100
|
+
onSelect: h,
|
|
101
|
+
onSubMenuClick: h
|
|
102
|
+
}, null, 8, ["default-active", "menus"])) : x("", !0),
|
|
99
103
|
i("div", {
|
|
100
|
-
class:
|
|
104
|
+
class: c(e(l).e("header"))
|
|
101
105
|
}, [
|
|
102
106
|
i("h1", {
|
|
103
|
-
class:
|
|
104
|
-
},
|
|
105
|
-
i("div",
|
|
106
|
-
e(a).meta?.category?.length ? (r(), u("div",
|
|
107
|
-
|
|
107
|
+
class: c(e(l).e("title"))
|
|
108
|
+
}, _(e(a).meta?.title), 3),
|
|
109
|
+
i("div", re, [
|
|
110
|
+
e(a).meta?.category?.length ? (r(), u("div", se, [
|
|
111
|
+
m(e(k), {
|
|
108
112
|
size: 14,
|
|
109
|
-
color: e(
|
|
113
|
+
color: e(L),
|
|
110
114
|
icon: "icon-category"
|
|
111
115
|
}, null, 8, ["color"]),
|
|
112
|
-
(r(!0), u(I, null,
|
|
116
|
+
(r(!0), u(I, null, B(e(a).meta?.category, (t, N) => (r(), C(e(Y), {
|
|
113
117
|
size: "small",
|
|
114
118
|
class: "tag",
|
|
115
|
-
type: e(
|
|
116
|
-
key:
|
|
117
|
-
onClick: (
|
|
119
|
+
type: e(K)(e(le), 1)[0],
|
|
120
|
+
key: N,
|
|
121
|
+
onClick: (fe) => E(t)
|
|
118
122
|
}, {
|
|
119
|
-
default:
|
|
120
|
-
|
|
123
|
+
default: F(() => [
|
|
124
|
+
H(_(t), 1)
|
|
121
125
|
]),
|
|
122
126
|
_: 2
|
|
123
127
|
}, 1032, ["type", "onClick"]))), 128))
|
|
124
|
-
])) :
|
|
125
|
-
i("div",
|
|
126
|
-
|
|
128
|
+
])) : x("", !0),
|
|
129
|
+
i("div", ce, [
|
|
130
|
+
m(e(O), {
|
|
127
131
|
title: "发布时间",
|
|
128
132
|
icon: "icon-date",
|
|
129
133
|
size: 12,
|
|
130
134
|
class: "mr-10px",
|
|
131
135
|
distance: 5,
|
|
132
|
-
text: e(
|
|
133
|
-
(e(a).meta?.date ? new Date(e(a).meta.date).getTime() : (/* @__PURE__ */ new Date()).getTime()) - e(
|
|
136
|
+
text: e(ne)(
|
|
137
|
+
(e(a).meta?.date ? new Date(e(a).meta.date).getTime() : (/* @__PURE__ */ new Date()).getTime()) - e(ie)()
|
|
134
138
|
)
|
|
135
139
|
}, null, 8, ["text"]),
|
|
136
|
-
i("div",
|
|
137
|
-
|
|
140
|
+
i("div", me, [
|
|
141
|
+
m(e(k), {
|
|
138
142
|
icon: "icon-reading",
|
|
139
143
|
size: 14,
|
|
140
144
|
class: "mr-5px"
|
|
@@ -142,17 +146,17 @@ const ie = { class: "info-container" }, ae = {
|
|
|
142
146
|
i("div", {
|
|
143
147
|
class: "waline-pageview-count lh-1",
|
|
144
148
|
"data-path": e(V)
|
|
145
|
-
}, "0", 8,
|
|
149
|
+
}, "0", 8, de)
|
|
146
150
|
])
|
|
147
151
|
])
|
|
148
152
|
])
|
|
149
153
|
], 2),
|
|
150
154
|
i("div", {
|
|
151
|
-
class:
|
|
155
|
+
class: c(e(l).e("content"))
|
|
152
156
|
}, [
|
|
153
|
-
|
|
157
|
+
J(o.$slots, "default")
|
|
154
158
|
], 2),
|
|
155
|
-
|
|
159
|
+
m(e(j)),
|
|
156
160
|
n[0] || (n[0] = i("ins", {
|
|
157
161
|
class: "adsbygoogle",
|
|
158
162
|
style: { display: "block", "text-align": "center" },
|
|
@@ -165,5 +169,5 @@ const ie = { class: "info-container" }, ae = {
|
|
|
165
169
|
}
|
|
166
170
|
});
|
|
167
171
|
export {
|
|
168
|
-
|
|
172
|
+
Pe as default
|
|
169
173
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as Z, getCurrentInstance as le, computed as l, inject as D, ref as C, reactive as ue, watch as ae, provide as se, onMounted as re, onBeforeUnmount as ie, useSlots as ce, h as
|
|
1
|
+
import { defineComponent as Z, getCurrentInstance as le, computed as l, inject as D, ref as C, reactive as ue, watch as ae, provide as se, onMounted as re, onBeforeUnmount as ie, useSlots as ce, h as u, Fragment as pe, withDirectives as me, vShow as de } from "vue";
|
|
2
2
|
import { singleAttrToObj as g, renderTNode as ve, isMobile as fe } from "@vft/utils";
|
|
3
3
|
import { VftTooltip as Me } from "../tooltip/index.js";
|
|
4
4
|
import { VftIcon as L } from "../icon/index.js";
|
|
@@ -56,7 +56,7 @@ const Ce = Z({
|
|
|
56
56
|
const y = G, I = w("sub-menu"), m = le(), {
|
|
57
57
|
indexPath: f,
|
|
58
58
|
parentMenu: k
|
|
59
|
-
} = he(m, l(() => o.index)), i = w("menu"),
|
|
59
|
+
} = he(m, l(() => o.index)), i = w("menu"), a = w("sub-menu"), e = D("rootMenu");
|
|
60
60
|
e || U(I.b(), "can not inject root menu");
|
|
61
61
|
const r = D(`subMenu:${k.value.uid}`);
|
|
62
62
|
r || U(I.b(), "can not inject sub menu");
|
|
@@ -64,8 +64,8 @@ const Ce = Z({
|
|
|
64
64
|
let M;
|
|
65
65
|
const z = C(!1), J = C(), E = C(null), A = l(() => p.value === "horizontal" && b.value ? "bottom-start" : "right-start"), b = l(() => r.level === 0), x = l(() => o.teleported === void 0 ? b.value : o.teleported), K = l(() => e.props.collapse ? `${i.namespace.value}-zoom-in-left` : `${i.namespace.value}-zoom-in-top`), Q = l(() => p.value === "horizontal" && b.value ? ["bottom-start", "bottom-end", "top-start", "top-end", "right-start", "left-start"] : ["right-start", "left-start", "bottom-start", "bottom-end", "top-start", "top-end"]), c = l(() => e.openedMenus.includes(o.index)), d = l(() => {
|
|
66
66
|
let t = !1;
|
|
67
|
-
return Object.values(S.value).forEach((
|
|
68
|
-
|
|
67
|
+
return Object.values(S.value).forEach((s) => {
|
|
68
|
+
s.active && (t = !0);
|
|
69
69
|
}), o.index === e.activeIndex && (t = !0), t;
|
|
70
70
|
}), B = l(() => e.props.backgroundColor || ""), P = l(() => e.props.activeTextColor || ""), F = l(() => e.props.textColor || ""), p = l(() => e.props.mode), W = l(() => e.props.persistent), h = ue({
|
|
71
71
|
index: o.index,
|
|
@@ -79,7 +79,7 @@ const Ce = Z({
|
|
|
79
79
|
}), X = () => E.value?.popperRef?.popperInstanceRef?.destroy(), Y = (t) => {
|
|
80
80
|
t || X();
|
|
81
81
|
}, O = (t) => {
|
|
82
|
-
const
|
|
82
|
+
const s = {
|
|
83
83
|
e: t,
|
|
84
84
|
index: o.index,
|
|
85
85
|
indexPath: f.value,
|
|
@@ -87,18 +87,18 @@ const Ce = Z({
|
|
|
87
87
|
};
|
|
88
88
|
if (e.props.menuTrigger === "hover" && e.props.mode === "horizontal" && !fe() || e.props.collapse && e.props.mode === "vertical" || o.disabled) {
|
|
89
89
|
e.handleSubMenuClick({
|
|
90
|
-
...
|
|
90
|
+
...s,
|
|
91
91
|
isFirstLevel: !0
|
|
92
92
|
});
|
|
93
93
|
return;
|
|
94
94
|
}
|
|
95
|
-
e.handleSubMenuClick(
|
|
96
|
-
}, v = (t,
|
|
95
|
+
e.handleSubMenuClick(s);
|
|
96
|
+
}, v = (t, s = o.showTimeout) => {
|
|
97
97
|
t.type !== "focus" && (e.props.menuTrigger === "click" && e.props.mode === "horizontal" || !e.props.collapse && e.props.mode === "vertical" || o.disabled || (r.mouseInChild.value = !0, M?.(), {
|
|
98
98
|
stop: M
|
|
99
99
|
} = H(() => {
|
|
100
100
|
e.openMenu(o.index, f.value);
|
|
101
|
-
},
|
|
101
|
+
}, s), x.value && k.value.vnode.el?.dispatchEvent(new MouseEvent("mouseenter")), y("mouseenter", t)));
|
|
102
102
|
}, _ = () => {
|
|
103
103
|
e.inSubMenuMouseEnterTimer && clearTimeout(e.inSubMenuMouseEnterTimer), e.inSubMenuMouseleaveTimer && clearTimeout(e.inSubMenuMouseleaveTimer), e.inSubMenuMouseEnterTimer = setTimeout(() => {
|
|
104
104
|
e.inSubMenu = !0;
|
|
@@ -107,23 +107,23 @@ const Ce = Z({
|
|
|
107
107
|
e.inSubMenuMouseEnterTimer && clearTimeout(e.inSubMenuMouseEnterTimer), e.inSubMenuMouseleaveTimer && clearTimeout(e.inSubMenuMouseleaveTimer), e.inSubMenuMouseleaveTimer = setTimeout(() => {
|
|
108
108
|
e.inSubMenu = !1;
|
|
109
109
|
}, o.hideTimeout - 10);
|
|
110
|
-
}, T = (t,
|
|
110
|
+
}, T = (t, s = !1) => {
|
|
111
111
|
e.props.menuTrigger === "click" && e.props.mode === "horizontal" || !e.props.collapse && e.props.mode === "vertical" || (M?.(), r.mouseInChild.value = !1, {
|
|
112
112
|
stop: M
|
|
113
113
|
} = H(() => {
|
|
114
114
|
!z.value && e.closeMenu(o.index, f.value);
|
|
115
|
-
}, o.hideTimeout), x.value &&
|
|
115
|
+
}, o.hideTimeout), x.value && s && m.parent?.type.name === "vft-sub-menu" && r.handleMouseleave?.(t, !0), y("mouseleave", t));
|
|
116
116
|
};
|
|
117
117
|
ae(() => e.props.collapse, (t) => Y(!!t));
|
|
118
118
|
{
|
|
119
119
|
const t = (n) => {
|
|
120
120
|
S.value[n.index] = n;
|
|
121
|
-
},
|
|
121
|
+
}, s = (n) => {
|
|
122
122
|
delete S.value[n.index];
|
|
123
123
|
};
|
|
124
124
|
se(`subMenu:${m.uid}`, {
|
|
125
125
|
addSubMenu: t,
|
|
126
|
-
removeSubMenu:
|
|
126
|
+
removeSubMenu: s,
|
|
127
127
|
handleMouseleave: T,
|
|
128
128
|
mouseInChild: z,
|
|
129
129
|
level: r.level + 1
|
|
@@ -146,18 +146,18 @@ const Ce = Z({
|
|
|
146
146
|
...te.value
|
|
147
147
|
}), R = l(() => ve(m, "title"));
|
|
148
148
|
return () => {
|
|
149
|
-
const t = [N.value?.icon ?
|
|
149
|
+
const t = [N.value?.icon ? u(L, {
|
|
150
150
|
...N.value
|
|
151
|
-
}) : null,
|
|
152
|
-
class: [
|
|
151
|
+
}) : null, u("span", {
|
|
152
|
+
class: [a.e("text"), a.is("arrow", o.showArrow)],
|
|
153
153
|
title: m.props.title
|
|
154
|
-
}, R.value), o.showArrow ?
|
|
155
|
-
class:
|
|
154
|
+
}, R.value), o.showArrow ? u(L, {
|
|
155
|
+
class: a.e("icon-arrow"),
|
|
156
156
|
...ne.value,
|
|
157
157
|
style: {
|
|
158
158
|
transform: c.value ? "rotateZ(180deg)" : "none"
|
|
159
159
|
}
|
|
160
|
-
}) : !1],
|
|
160
|
+
}) : !1], s = e.isMenuPopup ? u(Me, {
|
|
161
161
|
ref: E,
|
|
162
162
|
visible: c.value,
|
|
163
163
|
effect: "light",
|
|
@@ -173,17 +173,19 @@ const Ce = Z({
|
|
|
173
173
|
gpuAcceleration: !1,
|
|
174
174
|
...o.toolTipCfg
|
|
175
175
|
}, {
|
|
176
|
-
content: () =>
|
|
176
|
+
content: () => u("div", {
|
|
177
177
|
class: [i.m(p.value), i.m("popup-container"), o.popperClass],
|
|
178
178
|
onMouseenter: (n) => v(n, 100),
|
|
179
179
|
onMouseleave: (n) => T(n, !0),
|
|
180
180
|
onFocus: (n) => v(n, 100)
|
|
181
|
-
}, [
|
|
181
|
+
}, [u("div", {
|
|
182
182
|
class: [i.b(), i.m("popup"), i.m(`popup-${A.value}`)],
|
|
183
183
|
style: j.value
|
|
184
|
-
}, [
|
|
185
|
-
|
|
186
|
-
|
|
184
|
+
}, [u("ul", {
|
|
185
|
+
class: i.m("popup-ul-list")
|
|
186
|
+
}, V.default?.())])]),
|
|
187
|
+
default: () => u("div", {
|
|
188
|
+
class: a.e("title"),
|
|
187
189
|
style: [$.value, {
|
|
188
190
|
backgroundColor: B.value
|
|
189
191
|
}],
|
|
@@ -193,30 +195,30 @@ const Ce = Z({
|
|
|
193
195
|
}, t)
|
|
194
196
|
}) : (
|
|
195
197
|
// 以下是无需 tooltip 渲染的组件,通常是侧边栏没有折叠的时候
|
|
196
|
-
|
|
197
|
-
class:
|
|
198
|
+
u(pe, {}, [R.value ? u("div", {
|
|
199
|
+
class: a.e("title"),
|
|
198
200
|
style: [$.value, {
|
|
199
201
|
backgroundColor: B.value
|
|
200
202
|
}],
|
|
201
203
|
ref: J,
|
|
202
204
|
onClick: O
|
|
203
|
-
}, t) : null,
|
|
204
|
-
default: () => me(
|
|
205
|
+
}, t) : null, u(be, {}, {
|
|
206
|
+
default: () => me(u("ul", {
|
|
205
207
|
role: "menu",
|
|
206
208
|
class: [i.b(), i.m("inline")],
|
|
207
209
|
style: j.value
|
|
208
210
|
}, [V.default?.()]), [[de, c.value]])
|
|
209
211
|
})])
|
|
210
212
|
);
|
|
211
|
-
return
|
|
212
|
-
class: [
|
|
213
|
+
return u("li", {
|
|
214
|
+
class: [a.b(), a.is("active", d.value), a.e(String(r.level)), a.is("in-popup", r.level !== 0), a.is("opened", c.value), a.is("arrow", !0), a.is("disabled", o.disabled)],
|
|
213
215
|
role: "menuitem",
|
|
214
216
|
ariaHaspopup: !0,
|
|
215
217
|
ariaExpanded: c.value,
|
|
216
218
|
onMouseenter: [_, (n) => v(n)],
|
|
217
219
|
onMouseleave: [ee, (n) => T(n, !0)],
|
|
218
220
|
onFocus: v
|
|
219
|
-
}, [
|
|
221
|
+
}, [s]);
|
|
220
222
|
};
|
|
221
223
|
}
|
|
222
224
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { SortableEvent } from 'sortablejs';
|
|
2
2
|
import type { MenuSelectEventData, SideMenuProps } from './types';
|
|
3
3
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SideMenuProps>, {
|
|
4
4
|
isFixedLeft: boolean;
|
|
@@ -27,7 +27,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
27
27
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
28
28
|
"update:collapse": (val: boolean) => void;
|
|
29
29
|
"update:width": (val: string | number) => void;
|
|
30
|
-
dragEnd: (oldIndex:
|
|
30
|
+
dragEnd: (oldIndex: SortableEvent, newIndex: SortableEvent) => void;
|
|
31
31
|
dragWidthEnd: () => void;
|
|
32
32
|
select: (val: MenuSelectEventData) => void;
|
|
33
33
|
subMenuClick: (val: any) => void;
|
|
@@ -54,7 +54,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
54
54
|
onSelect?: ((val: MenuSelectEventData) => any) | undefined;
|
|
55
55
|
"onUpdate:collapse"?: ((val: boolean) => any) | undefined;
|
|
56
56
|
"onUpdate:width"?: ((val: string | number) => any) | undefined;
|
|
57
|
-
onDragEnd?: ((oldIndex:
|
|
57
|
+
onDragEnd?: ((oldIndex: SortableEvent, newIndex: SortableEvent) => any) | undefined;
|
|
58
58
|
onDragWidthEnd?: (() => any) | undefined;
|
|
59
59
|
onSubMenuClick?: ((val: any) => any) | undefined;
|
|
60
60
|
onSubMenuOpenClick?: ((val: any) => any) | undefined;
|