vft 0.0.427 → 0.0.429
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/carousel/use-carousel.js +1 -1
- package/es/components/dialog/use-dialog.js +21 -21
- package/es/components/horizontal-menu/index.d.ts +2 -10
- package/es/components/input/input.vue2.js +4 -4
- package/es/components/input-tag/composables/use-input-tag.js +1 -1
- package/es/components/md-container/md-container.vue2.js +106 -75
- package/es/components/md-container/use/index.d.ts +0 -1
- package/es/components/md-container/use/index.js +2 -4
- package/es/components/menu/index.d.ts +8 -0
- package/es/components/menu/menu-item.vue.d.ts +2 -2
- package/es/components/menu/menu-item.vue2.js +9 -10
- package/es/components/menu/menu.vue.d.ts +5 -1
- package/es/components/menu/menu.vue2.js +89 -82
- package/es/components/menu/sub-menu.vue.d.ts +3 -3
- package/es/components/menu/sub-menu.vue2.js +20 -24
- package/es/components/side-menu/index.d.ts +21 -0
- package/es/components/side-menu/index.js +3 -4
- package/es/components/side-menu/side-menu.vue.d.ts +12 -0
- package/es/components/side-menu/side-menu.vue2.js +157 -136
- package/es/components/side-menu/types.d.ts +3 -3
- package/es/components/side-menu/types.js +1 -1
- package/es/components/super-form/super-form-item.vue2.js +1 -1
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/es/utils/vue/vnode.js +1 -1
- package/lib/components/dialog/use-dialog.cjs +1 -1
- package/lib/components/horizontal-menu/index.d.ts +2 -10
- package/lib/components/input/input.vue2.cjs +1 -1
- package/lib/components/md-container/md-container.vue2.cjs +1 -1
- package/lib/components/md-container/use/index.cjs +1 -1
- package/lib/components/md-container/use/index.d.ts +0 -1
- package/lib/components/menu/index.d.ts +8 -0
- package/lib/components/menu/menu-item.vue.d.ts +2 -2
- package/lib/components/menu/menu-item.vue2.cjs +1 -1
- package/lib/components/menu/menu.vue.d.ts +5 -1
- package/lib/components/menu/menu.vue2.cjs +1 -1
- package/lib/components/menu/sub-menu.vue.d.ts +3 -3
- package/lib/components/menu/sub-menu.vue2.cjs +1 -1
- package/lib/components/side-menu/index.cjs +1 -1
- package/lib/components/side-menu/index.d.ts +21 -0
- package/lib/components/side-menu/side-menu.vue.d.ts +12 -0
- package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
- package/lib/components/side-menu/types.cjs +1 -1
- package/lib/components/side-menu/types.d.ts +3 -3
- 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/md-container.scss +30 -3
- package/theme-style/vft-md-container.css +1 -1
- package/web-types.json +1 -1
- package/es/components/md-container/use/useActiveHeaderLinks.d.ts +0 -7
- package/es/components/md-container/use/useActiveHeaderLinks.js +0 -52
- package/lib/components/md-container/use/useActiveHeaderLinks.cjs +0 -1
- package/lib/components/md-container/use/useActiveHeaderLinks.d.ts +0 -7
|
@@ -11,7 +11,7 @@ import "../../hooks/use-model-toggle/index.js";
|
|
|
11
11
|
import { useOrderedChildren as ge } from "../../hooks/use-ordered-children/index.js";
|
|
12
12
|
import "@popperjs/core";
|
|
13
13
|
import "../../hooks/use-z-index/index.js";
|
|
14
|
-
import {
|
|
14
|
+
import { CAROUSEL_ITEM_NAME as H, carouselContextKey as Se } from "./constants.js";
|
|
15
15
|
const L = 300, ze = (t, O, M) => {
|
|
16
16
|
const {
|
|
17
17
|
children: o,
|
|
@@ -17,54 +17,54 @@ import { useGlobalConfig as fe } from "../config-provider/hooks/use-global-confi
|
|
|
17
17
|
const Te = (e, t) => {
|
|
18
18
|
const i = ne().emit, { nextZIndex: m } = ae();
|
|
19
19
|
let T = "";
|
|
20
|
-
const B = k(), S = k(), a = r(!1), v = r(!1),
|
|
21
|
-
let C,
|
|
22
|
-
const O = fe(), U = l(() => O.value?.namespace ?? ie),
|
|
20
|
+
const B = k(), S = k(), a = r(!1), v = r(!1), u = r(!1), d = r(e.zIndex ?? m());
|
|
21
|
+
let C, y;
|
|
22
|
+
const O = fe(), U = l(() => O.value?.namespace ?? ie), c = l(() => O.value?.dialog), V = l(() => {
|
|
23
23
|
const n = {}, f = `--${U.value}-dialog`;
|
|
24
24
|
return e.fullscreen || (e.top && (n[`${f}-margin-top`] = e.top), e.width && (n[`${f}-width`] = ee(e.width))), n;
|
|
25
25
|
}), $ = l(
|
|
26
|
-
() => (e.draggable ??
|
|
26
|
+
() => (e.draggable ?? c.value?.draggable ?? !1) && !e.fullscreen
|
|
27
27
|
), F = l(
|
|
28
|
-
() => e.alignCenter ??
|
|
28
|
+
() => e.alignCenter ?? c.value?.alignCenter ?? !1
|
|
29
29
|
), G = l(
|
|
30
|
-
() => e.overflow ??
|
|
30
|
+
() => e.overflow ?? c.value?.overflow ?? !1
|
|
31
31
|
), Z = l(() => F.value ? { display: "flex" } : {}), j = l(() => {
|
|
32
|
-
const n = e.transition ??
|
|
32
|
+
const n = e.transition ?? c.value?.transition ?? P, f = {
|
|
33
33
|
name: n,
|
|
34
|
-
onAfterEnter:
|
|
34
|
+
onAfterEnter: g,
|
|
35
35
|
onBeforeLeave: I,
|
|
36
36
|
onAfterLeave: A
|
|
37
37
|
};
|
|
38
38
|
if (R(n)) {
|
|
39
|
-
const o = { ...n }, b = (
|
|
40
|
-
p(
|
|
39
|
+
const o = { ...n }, b = (s, X) => (w) => {
|
|
40
|
+
p(s) ? s.forEach((z) => {
|
|
41
41
|
N(z) && z(w);
|
|
42
|
-
}) : N(
|
|
42
|
+
}) : N(s) && s(w), X();
|
|
43
43
|
};
|
|
44
|
-
return o.onAfterEnter = b(o.onAfterEnter,
|
|
44
|
+
return o.onAfterEnter = b(o.onAfterEnter, g), o.onBeforeLeave = b(o.onBeforeLeave, I), o.onAfterLeave = b(o.onAfterLeave, A), o.name || (o.name = P), o;
|
|
45
45
|
}
|
|
46
46
|
return f;
|
|
47
47
|
});
|
|
48
|
-
function
|
|
48
|
+
function g() {
|
|
49
49
|
i("opened");
|
|
50
50
|
}
|
|
51
51
|
function A() {
|
|
52
|
-
i("closed"), i(Y, !1), e.destroyOnClose && (
|
|
52
|
+
i("closed"), i(Y, !1), e.destroyOnClose && (u.value = !1);
|
|
53
53
|
}
|
|
54
54
|
function I() {
|
|
55
55
|
i("close");
|
|
56
56
|
}
|
|
57
57
|
function _() {
|
|
58
|
-
|
|
58
|
+
y?.(), C?.(), e.openDelay && e.openDelay > 0 ? { stop: C } = M(() => h(), e.openDelay) : h();
|
|
59
59
|
}
|
|
60
60
|
function D() {
|
|
61
|
-
C?.(),
|
|
61
|
+
C?.(), y?.(), e.closeDelay && e.closeDelay > 0 ? { stop: y } = M(() => L(), e.closeDelay) : L();
|
|
62
62
|
}
|
|
63
63
|
function E() {
|
|
64
64
|
function n(f) {
|
|
65
65
|
f || (v.value = !0, a.value = !1);
|
|
66
66
|
}
|
|
67
|
-
|
|
67
|
+
e.beforeClose ? e.beforeClose(n) : D();
|
|
68
68
|
}
|
|
69
69
|
function q() {
|
|
70
70
|
e.closeOnClickModal && E();
|
|
@@ -96,7 +96,7 @@ const Te = (e, t) => {
|
|
|
96
96
|
), x(
|
|
97
97
|
() => e.modelValue,
|
|
98
98
|
(n) => {
|
|
99
|
-
n ? (v.value = !1, _(),
|
|
99
|
+
n ? (v.value = !1, _(), u.value = !0, d.value = e.zIndex ?? m(), oe(() => {
|
|
100
100
|
i("open"), t.value && (t.value.parentElement.scrollTop = 0, t.value.parentElement.scrollLeft = 0, t.value.scrollTop = 0);
|
|
101
101
|
})) : a.value && D();
|
|
102
102
|
}
|
|
@@ -106,9 +106,9 @@ const Te = (e, t) => {
|
|
|
106
106
|
t.value && (n ? (T = t.value.style.transform, t.value.style.transform = "") : t.value.style.transform = T);
|
|
107
107
|
}
|
|
108
108
|
), te(() => {
|
|
109
|
-
e.modelValue && (a.value = !0,
|
|
109
|
+
e.modelValue && (a.value = !0, u.value = !0, _());
|
|
110
110
|
}), {
|
|
111
|
-
afterEnter:
|
|
111
|
+
afterEnter: g,
|
|
112
112
|
afterLeave: A,
|
|
113
113
|
beforeLeave: I,
|
|
114
114
|
handleClose: E,
|
|
@@ -124,7 +124,7 @@ const Te = (e, t) => {
|
|
|
124
124
|
closed: v,
|
|
125
125
|
style: V,
|
|
126
126
|
overlayDialogStyle: Z,
|
|
127
|
-
rendered:
|
|
127
|
+
rendered: u,
|
|
128
128
|
visible: a,
|
|
129
129
|
zIndex: d,
|
|
130
130
|
transitionConfig: j,
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
export declare const VftHorizontalMenu: import("vft/es/utils").SFCWithInstall<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
2
|
menus: {
|
|
3
|
-
type: import("vue").PropType<(
|
|
4
|
-
children?: import("vft/es/vft").MenuType[];
|
|
5
|
-
title: string;
|
|
6
|
-
icon?: string;
|
|
7
|
-
} & Record<string, any> & {
|
|
3
|
+
type: import("vue").PropType<(import("vft/es/vft").MenuType & {
|
|
8
4
|
type?: import("./constants").MenuTypeEnum;
|
|
9
5
|
})[]>;
|
|
10
6
|
required: true;
|
|
@@ -48,11 +44,7 @@ export declare const VftHorizontalMenu: import("vft/es/utils").SFCWithInstall<im
|
|
|
48
44
|
"sub-menu-click": (val: any) => void;
|
|
49
45
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
50
46
|
menus: {
|
|
51
|
-
type: import("vue").PropType<(
|
|
52
|
-
children?: import("vft/es/vft").MenuType[];
|
|
53
|
-
title: string;
|
|
54
|
-
icon?: string;
|
|
55
|
-
} & Record<string, any> & {
|
|
47
|
+
type: import("vue").PropType<(import("vft/es/vft").MenuType & {
|
|
56
48
|
type?: import("./constants").MenuTypeEnum;
|
|
57
49
|
})[]>;
|
|
58
50
|
required: true;
|
|
@@ -13,8 +13,8 @@ import "../../hooks/use-z-index/index.js";
|
|
|
13
13
|
import { UPDATE_MODEL_EVENT as Q } from "@vft/constants";
|
|
14
14
|
import { useAttrs as Ze, useCursor as _e } from "@vft/use";
|
|
15
15
|
import { calcTextareaHeight as ye } from "./utils.js";
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
16
|
+
import { useFormSize as et, useFormDisabled as tt } from "../form/hooks/use-form-common-props.js";
|
|
17
|
+
import { useFormItem as at, useFormItemInputId as ot } from "../form/hooks/use-form-item.js";
|
|
18
18
|
const nt = ["role"], lt = ["id", "type", "disabled", "formatter", "parser", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form"], st = ["id", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form"], It = /* @__PURE__ */ Oe({
|
|
19
19
|
__name: "input",
|
|
20
20
|
props: {
|
|
@@ -85,9 +85,9 @@ const nt = ["role"], lt = ["id", "type", "disabled", "formatter", "parser", "rea
|
|
|
85
85
|
o.is("focus", v.value)
|
|
86
86
|
]), d = Ze({
|
|
87
87
|
excludeKeys: l(() => Object.keys(X.value))
|
|
88
|
-
}), { form: Ce, formItem: F } =
|
|
88
|
+
}), { form: Ce, formItem: F } = at(), { inputId: Y } = ot(xe.props, {
|
|
89
89
|
formItemContext: F
|
|
90
|
-
}), ke =
|
|
90
|
+
}), ke = et(), h = tt(), o = pe("input"), Z = pe("textarea"), M = H(), b = H(), v = S(!1), N = S(!1), C = S(!1), K = S(!1), _ = S(), O = H(e.inputStyle), k = l(() => M.value || b.value), T = l(() => G(e.prefixIcon, "icon", { size: 16 })), ee = l(() => G(e.suffixIcon, "icon", { size: 16 })), Ie = l(() => G(e.clearIcon, "icon", {
|
|
91
91
|
icon: "icon-circle-close",
|
|
92
92
|
size: 16
|
|
93
93
|
})), te = l(() => Ce?.statusIcon ?? !1), I = l(() => F?.validateState || ""), ae = l(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { shallowRef as B, ref as L, computed as c, watch as G } from "vue";
|
|
2
2
|
import { EVENT_CODE as g } from "../../../constants/aria.js";
|
|
3
|
-
import { CHANGE_EVENT as i,
|
|
3
|
+
import { CHANGE_EVENT as i, INPUT_EVENT as H, UPDATE_MODEL_EVENT as d } from "../../../constants/event.js";
|
|
4
4
|
import "@vueuse/core";
|
|
5
5
|
import { isUndefined as K } from "@vft/utils";
|
|
6
6
|
import { debugWarn as C } from "../../../utils/error.js";
|
|
@@ -1,128 +1,159 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { VftIcon as
|
|
3
|
-
import { VftIconText as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { defineComponent as k, getCurrentInstance as N, ref as R, computed as h, onMounted as $, nextTick as A, createElementBlock as u, openBlock as r, normalizeClass as s, unref as e, createBlock as y, createCommentVNode as v, createElementVNode as i, createVNode as c, toDisplayString as C, Fragment as I, renderList as P, withCtx as z, createTextVNode as q, renderSlot as B } from "vue";
|
|
2
|
+
import { VftIcon as x } from "../icon/index.js";
|
|
3
|
+
import { VftIconText as F } from "../icon-text/index.js";
|
|
4
|
+
import { VftMdComment as H } from "../md-comment/index.js";
|
|
5
|
+
import { VftSideMenu as J } from "../side-menu/index.js";
|
|
6
|
+
import { VftTag as O } from "../tag/index.js";
|
|
6
7
|
import "@vueuse/core";
|
|
7
|
-
import { jumpElement as
|
|
8
|
+
import { handleScrollPosition as j, jumpElement as _, getRandomElementForArr as U, isClient as Y } from "@vft/utils";
|
|
8
9
|
import "../config-provider/hooks/use-global-config.js";
|
|
9
|
-
import { primaryColor as
|
|
10
|
-
import "lodash-es";
|
|
10
|
+
import { primaryColor as G } from "../../utils/ns-cover.js";
|
|
11
|
+
import { debounce as K } from "lodash-es";
|
|
11
12
|
import "../form/index.js";
|
|
12
|
-
import { useNamespace as
|
|
13
|
+
import { useNamespace as Q } from "../../hooks/use-namespace/index.js";
|
|
13
14
|
import "../../hooks/use-model-toggle/index.js";
|
|
14
15
|
import "@popperjs/core";
|
|
15
16
|
import "../../hooks/use-z-index/index.js";
|
|
16
|
-
import { useRouterHelper as
|
|
17
|
-
import { useEventListener as
|
|
18
|
-
import { usePhotoSwipe as
|
|
19
|
-
import { formatToDateTime as
|
|
20
|
-
import
|
|
21
|
-
import {
|
|
22
|
-
|
|
23
|
-
import { COMP_TYPE as X } from "./utils.js";
|
|
24
|
-
const Z = { class: "info-container" }, tt = {
|
|
17
|
+
import { useRouterHelper as W } from "@vft/router";
|
|
18
|
+
import { useEventListener as X } from "@vft/use";
|
|
19
|
+
import { usePhotoSwipe as Z } from "@vft/use/photoswipe";
|
|
20
|
+
import { formatToDateTime as ee, getDayTimestamp as te } from "@vft/utils/date";
|
|
21
|
+
import { useCopyCode as oe } from "./use/useCopyCode.js";
|
|
22
|
+
import { COMP_TYPE as ne } from "./utils.js";
|
|
23
|
+
const ie = { class: "info-container" }, ae = {
|
|
25
24
|
key: 0,
|
|
26
25
|
class: "left"
|
|
27
|
-
},
|
|
26
|
+
}, le = { class: "infos" }, re = {
|
|
28
27
|
class: "reading",
|
|
29
28
|
title: "阅读量"
|
|
30
|
-
},
|
|
29
|
+
}, se = ["data-path"], ce = k({
|
|
31
30
|
name: "vft-md-container"
|
|
32
|
-
}),
|
|
33
|
-
...
|
|
31
|
+
}), Re = /* @__PURE__ */ k({
|
|
32
|
+
...ce,
|
|
34
33
|
props: {
|
|
35
34
|
tocList: {}
|
|
36
35
|
},
|
|
37
36
|
setup(m) {
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
const p =
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
const l = Q("md-container"), b = N(), f = R(), d = h(() => m.tocList && m.tocList !== "undefined" ? JSON.parse(m.tocList) : ""), { initPhotoSwipe: T } = Z(`.${l.e("content")} img`);
|
|
38
|
+
T(), oe();
|
|
39
|
+
const p = b.appContext.config.globalProperties.$router, a = p.currentRoute.value, S = G(), V = Y ? location.pathname : "", { go: D } = W(p);
|
|
40
|
+
function w(o) {
|
|
41
|
+
D(`/?classify=${o}`);
|
|
42
|
+
}
|
|
43
|
+
const L = h(() => a.meta.category?.includes("api")), E = K(
|
|
44
|
+
() => j({
|
|
45
|
+
scrollDom: ".layout-content",
|
|
46
|
+
contentDom: ".header-anchor",
|
|
47
|
+
selectAttrName: "href",
|
|
48
|
+
offset: 100,
|
|
49
|
+
callback: (o) => {
|
|
50
|
+
f.value.menuRef.updateActiveIndex(
|
|
51
|
+
o.slice(1)
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
}),
|
|
55
|
+
100
|
|
56
|
+
);
|
|
57
|
+
$(() => {
|
|
58
|
+
A(() => {
|
|
43
59
|
setTimeout(() => {
|
|
44
|
-
|
|
45
|
-
})
|
|
46
|
-
|
|
60
|
+
_(encodeURI(a.hash));
|
|
61
|
+
}), setTimeout(() => {
|
|
62
|
+
const t = document.querySelector(".layout-content");
|
|
63
|
+
t && t.addEventListener("scroll", E);
|
|
64
|
+
}, 1500);
|
|
65
|
+
const o = document.querySelectorAll(".item.expand"), n = document.querySelectorAll(
|
|
47
66
|
"div.language-vue"
|
|
48
67
|
);
|
|
49
|
-
for (let
|
|
50
|
-
|
|
51
|
-
|
|
68
|
+
for (let t = 0; t < o.length; t++)
|
|
69
|
+
X(o[t], "click", () => {
|
|
70
|
+
n[t].offsetHeight === 0 ? (n[t].style.height = "auto", n[t].style.visibility = "visible") : (n[t].style.height = "0px", n[t].style.visibility = "hidden");
|
|
52
71
|
});
|
|
53
72
|
});
|
|
54
73
|
});
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
return (a, i) => (s(), d("div", {
|
|
61
|
-
class: l([t(r).b(), t(r).is("api", w.value)])
|
|
74
|
+
const g = (o) => {
|
|
75
|
+
_(`#${o.index}`);
|
|
76
|
+
};
|
|
77
|
+
return (o, n) => (r(), u("div", {
|
|
78
|
+
class: s([e(l).b(), e(l).is("api", L.value)])
|
|
62
79
|
}, [
|
|
63
|
-
|
|
80
|
+
d.value?.length ? (r(), y(e(J), {
|
|
64
81
|
key: 0,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
82
|
+
ref_key: "sideMenuRef",
|
|
83
|
+
ref: f,
|
|
84
|
+
"default-active": d.value[0].slug,
|
|
85
|
+
class: "toc-side-menu",
|
|
86
|
+
menus: d.value,
|
|
87
|
+
"is-fixed-left": !1,
|
|
88
|
+
"default-openeds-level": "",
|
|
89
|
+
"unique-opened": !1,
|
|
90
|
+
"disable-sub-menu-action": "",
|
|
91
|
+
"attr-mapping": {
|
|
92
|
+
index: "slug",
|
|
93
|
+
originIndex: "slug",
|
|
94
|
+
originChildren: "children"
|
|
95
|
+
},
|
|
96
|
+
onSelect: g,
|
|
97
|
+
onSubMenuClick: g
|
|
98
|
+
}, null, 8, ["default-active", "menus"])) : v("", !0),
|
|
99
|
+
i("div", {
|
|
100
|
+
class: s(e(l).e("header"))
|
|
70
101
|
}, [
|
|
71
|
-
|
|
72
|
-
class:
|
|
73
|
-
},
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
c(
|
|
102
|
+
i("h1", {
|
|
103
|
+
class: s(e(l).e("title"))
|
|
104
|
+
}, C(e(a).meta?.title), 3),
|
|
105
|
+
i("div", ie, [
|
|
106
|
+
e(a).meta?.category?.length ? (r(), u("div", ae, [
|
|
107
|
+
c(e(x), {
|
|
77
108
|
size: 14,
|
|
78
|
-
color:
|
|
109
|
+
color: e(S),
|
|
79
110
|
icon: "icon-category"
|
|
80
111
|
}, null, 8, ["color"]),
|
|
81
|
-
(
|
|
112
|
+
(r(!0), u(I, null, P(e(a).meta?.category, (t, M) => (r(), y(e(O), {
|
|
82
113
|
size: "small",
|
|
83
114
|
class: "tag",
|
|
84
|
-
type:
|
|
85
|
-
key:
|
|
86
|
-
onClick: (
|
|
115
|
+
type: e(U)(e(ne), 1)[0],
|
|
116
|
+
key: M,
|
|
117
|
+
onClick: (me) => w(t)
|
|
87
118
|
}, {
|
|
88
|
-
default:
|
|
89
|
-
|
|
119
|
+
default: z(() => [
|
|
120
|
+
q(C(t), 1)
|
|
90
121
|
]),
|
|
91
122
|
_: 2
|
|
92
123
|
}, 1032, ["type", "onClick"]))), 128))
|
|
93
|
-
])) :
|
|
94
|
-
|
|
95
|
-
c(
|
|
124
|
+
])) : v("", !0),
|
|
125
|
+
i("div", le, [
|
|
126
|
+
c(e(F), {
|
|
96
127
|
title: "发布时间",
|
|
97
128
|
icon: "icon-date",
|
|
98
129
|
size: 12,
|
|
99
130
|
class: "mr-10px",
|
|
100
131
|
distance: 5,
|
|
101
|
-
text:
|
|
102
|
-
(
|
|
132
|
+
text: e(ee)(
|
|
133
|
+
(e(a).meta?.date ? new Date(e(a).meta.date).getTime() : (/* @__PURE__ */ new Date()).getTime()) - e(te)()
|
|
103
134
|
)
|
|
104
135
|
}, null, 8, ["text"]),
|
|
105
|
-
|
|
106
|
-
c(
|
|
136
|
+
i("div", re, [
|
|
137
|
+
c(e(x), {
|
|
107
138
|
icon: "icon-reading",
|
|
108
139
|
size: 14,
|
|
109
140
|
class: "mr-5px"
|
|
110
141
|
}),
|
|
111
|
-
|
|
142
|
+
i("div", {
|
|
112
143
|
class: "waline-pageview-count lh-1",
|
|
113
|
-
"data-path":
|
|
114
|
-
}, "0", 8,
|
|
144
|
+
"data-path": e(V)
|
|
145
|
+
}, "0", 8, se)
|
|
115
146
|
])
|
|
116
147
|
])
|
|
117
148
|
])
|
|
118
149
|
], 2),
|
|
119
|
-
|
|
120
|
-
class:
|
|
150
|
+
i("div", {
|
|
151
|
+
class: s(e(l).e("content"))
|
|
121
152
|
}, [
|
|
122
|
-
|
|
153
|
+
B(o.$slots, "default")
|
|
123
154
|
], 2),
|
|
124
|
-
c(
|
|
125
|
-
|
|
155
|
+
c(e(H)),
|
|
156
|
+
n[0] || (n[0] = i("ins", {
|
|
126
157
|
class: "adsbygoogle",
|
|
127
158
|
style: { display: "block", "text-align": "center" },
|
|
128
159
|
"data-ad-layout": "in-article",
|
|
@@ -134,5 +165,5 @@ const Z = { class: "info-container" }, tt = {
|
|
|
134
165
|
}
|
|
135
166
|
});
|
|
136
167
|
export {
|
|
137
|
-
|
|
168
|
+
Re as default
|
|
138
169
|
};
|
|
@@ -32,12 +32,17 @@ export declare const VftMenu: import("vft/es/utils").SFCWithInstall<import("vue"
|
|
|
32
32
|
persistent: {
|
|
33
33
|
type: import("vue").PropType<boolean>;
|
|
34
34
|
};
|
|
35
|
+
disableSubMenuAction: {
|
|
36
|
+
type: import("vue").PropType<boolean>;
|
|
37
|
+
};
|
|
35
38
|
}>, {
|
|
36
39
|
open: (index: string) => void;
|
|
37
40
|
close: (index: string, indexPath: string[], e?: Event) => void;
|
|
38
41
|
handleResize: () => void;
|
|
39
42
|
menu: import("vue").Ref<HTMLUListElement | undefined, HTMLUListElement | undefined>;
|
|
40
43
|
inSubMenu: import("vue").Ref<boolean, boolean>;
|
|
44
|
+
updateActiveIndex: (val: string) => void;
|
|
45
|
+
activeIndex: import("vue").Ref<string | undefined, string | undefined>;
|
|
41
46
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
42
47
|
"update:collapse": (val: boolean) => void;
|
|
43
48
|
"sub-menu-click": (val: any) => void;
|
|
@@ -86,6 +91,9 @@ export declare const VftMenu: import("vft/es/utils").SFCWithInstall<import("vue"
|
|
|
86
91
|
persistent: {
|
|
87
92
|
type: import("vue").PropType<boolean>;
|
|
88
93
|
};
|
|
94
|
+
disableSubMenuAction: {
|
|
95
|
+
type: import("vue").PropType<boolean>;
|
|
96
|
+
};
|
|
89
97
|
}>> & Readonly<{
|
|
90
98
|
onSelect?: ((menuItem: import("./types").MenuItemClicked, routerResult?: Promise<void | import("vue-router").NavigationFailure> | undefined) => any) | undefined;
|
|
91
99
|
onClose?: ((val: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { IconProps } from 'vft/es/components/icon';
|
|
2
|
+
import type { RouteLocationRaw } from 'vue-router';
|
|
3
3
|
export interface MenuItemProps {
|
|
4
4
|
/** 唯一标志 */
|
|
5
5
|
index?: string;
|
|
@@ -12,12 +12,11 @@ import { useNamespace as A } from "../../hooks/use-namespace/index.js";
|
|
|
12
12
|
import "../../hooks/use-model-toggle/index.js";
|
|
13
13
|
import "@popperjs/core";
|
|
14
14
|
import "../../hooks/use-z-index/index.js";
|
|
15
|
-
import "vue-router";
|
|
16
15
|
import W from "./use-menu.js";
|
|
17
16
|
const X = ["title"], Y = E({
|
|
18
17
|
name: "vft-menu-item",
|
|
19
18
|
inheritAttrs: !1
|
|
20
|
-
}),
|
|
19
|
+
}), fe = /* @__PURE__ */ E({
|
|
21
20
|
...Y,
|
|
22
21
|
props: {
|
|
23
22
|
index: {},
|
|
@@ -32,13 +31,13 @@ const X = ["title"], Y = E({
|
|
|
32
31
|
},
|
|
33
32
|
emits: ["click", "mouseenter", "mouseleave"],
|
|
34
33
|
setup(t, { emit: S }) {
|
|
35
|
-
const d = A("menu-item"),
|
|
36
|
-
!i && !t.isAloneUse && P(
|
|
34
|
+
const d = S, c = A("menu-item"), g = F(), T = O(), w = A("menu"), f = A("menu-item"), i = t.isAloneUse ? null : N("rootMenu");
|
|
35
|
+
!i && !t.isAloneUse && P(c.b(), "can not inject root menu");
|
|
37
36
|
const { parentMenu: U, indexPath: B } = W(
|
|
38
37
|
g,
|
|
39
38
|
a(() => t.index)
|
|
40
39
|
), v = t.isAloneUse ? null : N(`subMenu:${U.value.uid}`);
|
|
41
|
-
!v && !t.isAloneUse && P(
|
|
40
|
+
!v && !t.isAloneUse && P(c.b(), "can not inject sub menu");
|
|
42
41
|
const C = a(() => t.index === i?.activeIndex), s = q({
|
|
43
42
|
index: t.index,
|
|
44
43
|
indexPath: B,
|
|
@@ -49,7 +48,7 @@ const X = ["title"], Y = E({
|
|
|
49
48
|
index: t.index,
|
|
50
49
|
indexPath: B.value,
|
|
51
50
|
route: t.route
|
|
52
|
-
}),
|
|
51
|
+
}), d("click", s));
|
|
53
52
|
}, r = a(() => K(t.icon, "icon")), z = a(() => L(g, "title"));
|
|
54
53
|
return G(() => {
|
|
55
54
|
t.isAloneUse || (v?.addSubMenu(s), i?.addMenuItem(s));
|
|
@@ -67,8 +66,8 @@ const X = ["title"], Y = E({
|
|
|
67
66
|
e(f).is("active", n.isAloneUse ? !1 : C.value),
|
|
68
67
|
e(f).is("disabled", n.disabled)
|
|
69
68
|
]),
|
|
70
|
-
onMouseenter: u[0] || (u[0] = (D) =>
|
|
71
|
-
onMouseleave: u[1] || (u[1] = (D) =>
|
|
69
|
+
onMouseenter: u[0] || (u[0] = (D) => d("mouseenter")),
|
|
70
|
+
onMouseleave: u[1] || (u[1] = (D) => d("mouseleave")),
|
|
72
71
|
role: "menuitem",
|
|
73
72
|
tabindex: "-1",
|
|
74
73
|
onClick: x
|
|
@@ -95,7 +94,7 @@ const X = ["title"], Y = E({
|
|
|
95
94
|
n.$slots?.default ? y(n.$slots, "default", { key: 0 }) : (o(), p(k, { key: 1 }, [
|
|
96
95
|
r.value?.icon ? (o(), l(e(h), I(V({ key: 0 }, r.value)), null, 16)) : m("", !0),
|
|
97
96
|
b("span", {
|
|
98
|
-
class: M(e(
|
|
97
|
+
class: M(e(c).e("text")),
|
|
99
98
|
title: n.title
|
|
100
99
|
}, [
|
|
101
100
|
J(e(Q), { content: z.value }, null, 8, ["content"])
|
|
@@ -111,5 +110,5 @@ const X = ["title"], Y = E({
|
|
|
111
110
|
}
|
|
112
111
|
});
|
|
113
112
|
export {
|
|
114
|
-
|
|
113
|
+
fe as default
|
|
115
114
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { NavigationFailure } from 'vue-router';
|
|
2
|
-
import {
|
|
2
|
+
import type { SubMenuProps } from './sub-menu.vue';
|
|
3
3
|
import type { MenuItemClicked } from './types';
|
|
4
4
|
export interface MenuProps {
|
|
5
5
|
/** 菜单展示模式 */
|
|
@@ -22,6 +22,8 @@ export interface MenuProps {
|
|
|
22
22
|
ellipsis?: boolean;
|
|
23
23
|
horizontalMenuProps?: Partial<SubMenuProps>;
|
|
24
24
|
persistent?: boolean;
|
|
25
|
+
/** 禁用子菜单的展开收缩行为 */
|
|
26
|
+
disableSubMenuAction?: boolean;
|
|
25
27
|
}
|
|
26
28
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<MenuProps>>, {
|
|
27
29
|
open: (index: string) => void;
|
|
@@ -29,6 +31,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
29
31
|
handleResize: () => void;
|
|
30
32
|
menu: import("vue").Ref<HTMLUListElement | undefined, HTMLUListElement | undefined>;
|
|
31
33
|
inSubMenu: import("vue").Ref<boolean, boolean>;
|
|
34
|
+
updateActiveIndex: (val: string) => void;
|
|
35
|
+
activeIndex: import("vue").Ref<string | undefined, string | undefined>;
|
|
32
36
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
33
37
|
"update:collapse": (val: boolean) => void;
|
|
34
38
|
"sub-menu-click": (val: any) => void;
|