vft 0.0.431 → 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/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/side-menu/use-drag-line.js +26 -31
- 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/side-menu/use-drag-line.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +4 -4
- 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,47 +1,42 @@
|
|
|
1
|
-
import "@
|
|
2
|
-
import "
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
function k(p, c, n) {
|
|
9
|
-
const i = x(!1), l = n.props?.dragWidthCfg?.minWidth || 200;
|
|
10
|
-
v(() => {
|
|
11
|
-
n.props?.dragWidthCfg && d(() => {
|
|
12
|
-
w(g, 100)();
|
|
1
|
+
import { useDebounceFn as x, useThrottleFn as v } from "@vft/use";
|
|
2
|
+
import { ref as w, onMounted as T, nextTick as c, unref as r } from "vue";
|
|
3
|
+
function X(l, m, o) {
|
|
4
|
+
const i = w(!1), a = o.props?.dragWidthCfg?.minWidth || 200;
|
|
5
|
+
T(() => {
|
|
6
|
+
o.props?.dragWidthCfg && c(() => {
|
|
7
|
+
x(g, 100)();
|
|
13
8
|
});
|
|
14
9
|
});
|
|
15
|
-
function f(
|
|
16
|
-
const
|
|
17
|
-
return
|
|
10
|
+
function f(e) {
|
|
11
|
+
const n = r(e);
|
|
12
|
+
return n ? Reflect.has(n, "$el") ? r(e)?.$el : r(e) : null;
|
|
18
13
|
}
|
|
19
|
-
function
|
|
14
|
+
function p(e, n, s) {
|
|
20
15
|
document.onmousemove = function(u) {
|
|
21
|
-
let
|
|
16
|
+
let t = e.left + (u.clientX - s);
|
|
22
17
|
u = u || window.event;
|
|
23
|
-
const
|
|
24
|
-
return
|
|
25
|
-
|
|
18
|
+
const d = o.props?.dragWidthCfg?.maxWidth || 800, W = r(a);
|
|
19
|
+
return t <= W ? void 0 : (t < 0 && (t = 0), t > d && (t = d), e.style.left = t + "px", v(() => {
|
|
20
|
+
o.emit("update:width", t + "px");
|
|
26
21
|
}, 150)(), !1);
|
|
27
22
|
};
|
|
28
23
|
}
|
|
29
|
-
function h(
|
|
24
|
+
function h(e) {
|
|
30
25
|
document.onmouseup = function() {
|
|
31
|
-
document.onmousemove = null, document.onmouseup = null, i.value = !0,
|
|
32
|
-
|
|
26
|
+
document.onmousemove = null, document.onmouseup = null, i.value = !0, c(() => {
|
|
27
|
+
o.emit("dragWidthEnd"), setTimeout(() => {
|
|
33
28
|
i.value = !1;
|
|
34
|
-
},
|
|
35
|
-
}),
|
|
29
|
+
}, 100);
|
|
30
|
+
}), e.releaseCapture?.();
|
|
36
31
|
};
|
|
37
32
|
}
|
|
38
33
|
function g() {
|
|
39
|
-
const
|
|
40
|
-
if (!
|
|
41
|
-
const
|
|
42
|
-
|
|
34
|
+
const e = f(m);
|
|
35
|
+
if (!e) return;
|
|
36
|
+
const n = f(l);
|
|
37
|
+
n && (e.onmousedown = (s) => {
|
|
43
38
|
const u = s?.clientX;
|
|
44
|
-
return
|
|
39
|
+
return e.left = e.offsetLeft, p(e, n, u), h(e), e.setCapture?.(), !1;
|
|
45
40
|
});
|
|
46
41
|
}
|
|
47
42
|
return {
|
|
@@ -49,5 +44,5 @@ function k(p, c, n) {
|
|
|
49
44
|
};
|
|
50
45
|
}
|
|
51
46
|
export {
|
|
52
|
-
|
|
47
|
+
X as useDragLine
|
|
53
48
|
};
|
package/es/package.json.d.ts
CHANGED
package/es/package.json.js
CHANGED
|
@@ -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 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),p=require("../icon/index.cjs"),E=require("../icon-text/index.cjs"),N=require("../md-comment/index.cjs"),_=require("../side-menu/index.cjs"),S=require("../tag/index.cjs");require("@vueuse/core");const i=require("@vft/utils");require("../config-provider/hooks/use-global-config.cjs");const b=require("../../utils/ns-cover.cjs"),T=require("lodash-es");require("../form/index.cjs");const D=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const $=require("@vft/router"),B=require("@vft/use"),L=require("@vft/use/photoswipe"),g=require("@vft/utils/date"),M=require("./use/useCopyCode.cjs"),w=require("./utils.cjs"),z={class:"info-container"},P={key:0,class:"left"},R={class:"infos"},A={class:"reading",title:"阅读量"},I=["data-path"],j=e.defineComponent({name:"vft-md-container"}),O=e.defineComponent({...j,props:{tocList:{},scrollDom:{default:".layout-content"}},setup(s){const l=D.useNamespace("md-container"),v=e.getCurrentInstance(),c=e.ref(),a=e.computed(()=>s.tocList&&s.tocList!=="undefined"?JSON.parse(s.tocList):""),{initPhotoSwipe:y}=L.usePhotoSwipe(`.${l.e("content")} img`);y(),M.useCopyCode();const u=v.appContext.config.globalProperties.$router,r=u.currentRoute.value,h=b.primaryColor(),C=i.isClient?location.pathname:"",{go:q}=$.useRouterHelper(u);function k(n){q(`/?classify=${n}`)}const x=e.computed(()=>r.meta.category?.includes("api")),d=T.debounce(()=>i.handleScrollPosition({scrollDom:".layout-content",contentDom:".header-anchor",selectAttrName:"href",offset:100,callback:n=>{c.value.menuRef.updateActiveIndex(n.slice(1))}}),100),m=n=>{i.jumpElement(`#${n.index}`)},f=()=>{const n=document.querySelector(s.scrollDom);n&&n.removeEventListener("scroll",d)};return e.onMounted(()=>{e.nextTick(()=>{setTimeout(()=>{i.jumpElement(encodeURI(r.hash))}),setTimeout(()=>{const t=document.querySelector(".layout-content");t&&t.addEventListener("scroll",d)},1500);const n=document.querySelectorAll(".item.expand"),o=document.querySelectorAll("div.language-vue");for(let t=0;t<n.length;t++)B.useEventListener(n[t],"click",()=>{o[t].offsetHeight===0?(o[t].style.height="auto",o[t].style.visibility="visible"):(o[t].style.height="0px",o[t].style.visibility="hidden")})})}),e.onDeactivated(()=>{f()}),e.onBeforeMount(()=>{f()}),(n,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(l).b(),e.unref(l).is("api",x.value)])},[a.value?.length?(e.openBlock(),e.createBlock(e.unref(_.VftSideMenu),{key:0,ref_key:"sideMenuRef",ref:c,"default-active":a.value[0].slug,class:"toc-side-menu",menus:a.value,"is-fixed-left":!1,"default-openeds-level":"","unique-opened":!1,"disable-sub-menu-action":"","attr-mapping":{index:"slug"},onSelect:m,onSubMenuClick:m},null,8,["default-active","menus"])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("header"))},[e.createElementVNode("h1",{class:e.normalizeClass(e.unref(l).e("title"))},e.toDisplayString(e.unref(r).meta?.title),3),e.createElementVNode("div",z,[e.unref(r).meta?.category?.length?(e.openBlock(),e.createElementBlock("div",P,[e.createVNode(e.unref(p.VftIcon),{size:14,color:e.unref(h),icon:"icon-category"},null,8,["color"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r).meta?.category,(t,V)=>(e.openBlock(),e.createBlock(e.unref(S.VftTag),{size:"small",class:"tag",type:e.unref(i.getRandomElementForArr)(e.unref(w.COMP_TYPE),1)[0],key:V,onClick:F=>k(t)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t),1)]),_:2},1032,["type","onClick"]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",R,[e.createVNode(e.unref(E.VftIconText),{title:"发布时间",icon:"icon-date",size:12,class:"mr-10px",distance:5,text:e.unref(g.formatToDateTime)((e.unref(r).meta?.date?new Date(e.unref(r).meta.date).getTime():new Date().getTime())-e.unref(g.getDayTimestamp)())},null,8,["text"]),e.createElementVNode("div",A,[e.createVNode(e.unref(p.VftIcon),{icon:"icon-reading",size:14,class:"mr-5px"}),e.createElementVNode("div",{class:"waline-pageview-count lh-1","data-path":e.unref(C)},"0",8,I)])])])],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("content"))},[e.renderSlot(n.$slots,"default")],2),e.createVNode(e.unref(N.VftMdComment)),o[0]||(o[0]=e.createElementVNode("ins",{class:"adsbygoogle",style:{display:"block","text-align":"center"},"data-ad-layout":"in-article","data-ad-format":"fluid","data-ad-client":"ca-pub-4046301015031382","data-ad-slot":"6525439078"},null,-1))],2))}});exports.default=O;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("@vft/use"),t=require("vue");function v(l,a,o){const i=t.ref(!1),m=o.props?.dragWidthCfg?.minWidth||200;t.onMounted(()=>{o.props?.dragWidthCfg&&t.nextTick(()=>{d.useDebounceFn(h,100)()})});function c(e){const u=t.unref(e);return u?Reflect.has(u,"$el")?t.unref(e)?.$el:t.unref(e):null}function p(e,u,s){document.onmousemove=function(r){let n=e.left+(r.clientX-s);r=r||window.event;const f=o.props?.dragWidthCfg?.maxWidth||800,W=t.unref(m);return n<=W?void 0:(n<0&&(n=0),n>f&&(n=f),e.style.left=n+"px",d.useThrottleFn(()=>{o.emit("update:width",n+"px")},150)(),!1)}}function g(e){document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null,i.value=!0,t.nextTick(()=>{o.emit("dragWidthEnd"),setTimeout(()=>{i.value=!1},100)}),e.releaseCapture?.()}}function h(){const e=c(a);if(!e)return;const u=c(l);u&&(e.onmousedown=s=>{const r=s?.clientX;return e.left=e.offsetLeft,p(e,u,r),g(e),e.setCapture?.(),!1})}return{isDraging:i}}exports.useDragLine=v;
|
package/lib/package.json.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.0.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.0.433";exports.version=e;
|
package/lib/package.json.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vft",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.433",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "lib/index.cjs",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -55,11 +55,11 @@
|
|
|
55
55
|
"resize-detector": "0.3.0",
|
|
56
56
|
"sortablejs": "1.15.0",
|
|
57
57
|
"photoswipe": "5.4.4",
|
|
58
|
-
"@vft/constants": "0.0.75",
|
|
59
|
-
"@vft/utils": "0.0.144",
|
|
60
58
|
"@vft/router": "0.0.67",
|
|
59
|
+
"@vft/store": "0.0.57",
|
|
60
|
+
"@vft/constants": "0.0.75",
|
|
61
61
|
"@vft/directives": "0.0.36",
|
|
62
|
-
"@vft/
|
|
62
|
+
"@vft/utils": "0.0.144",
|
|
63
63
|
"@vft/use": "0.0.89"
|
|
64
64
|
},
|
|
65
65
|
"vetur": {
|