vft 0.0.435 → 0.0.437

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.
@@ -1,11 +1,11 @@
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";
1
+ import { defineComponent as T, getCurrentInstance as R, ref as $, computed as v, onMounted as P, nextTick as q, onDeactivated as z, onBeforeMount as A, createElementBlock as u, openBlock as s, normalizeClass as c, unref as e, createBlock as C, createCommentVNode as x, createElementVNode as i, createVNode as m, toDisplayString as k, Fragment as I, renderList as B, withCtx as F, createTextVNode as H, renderSlot as J } from "vue";
2
+ import { VftIcon as b } from "../icon/index.js";
3
3
  import { VftIconText as O } from "../icon-text/index.js";
4
4
  import { VftMdComment as j } from "../md-comment/index.js";
5
5
  import { VftSideMenu as U } from "../side-menu/index.js";
6
6
  import { VftTag as Y } from "../tag/index.js";
7
7
  import "@vueuse/core";
8
- import { handleScrollPosition as G, jumpElement as b, getRandomElementForArr as K, isClient as Q } from "@vft/utils";
8
+ import { handleScrollPosition as G, jumpElement as S, getRandomElementForArr as K, isClient as Q } from "@vft/utils";
9
9
  import "../config-provider/hooks/use-global-config.js";
10
10
  import { primaryColor as W } from "../../utils/ns-cover.js";
11
11
  import { debounce as X } from "lodash-es";
@@ -26,18 +26,18 @@ const re = { class: "info-container" }, se = {
26
26
  }, ce = { class: "infos" }, me = {
27
27
  class: "reading",
28
28
  title: "阅读量"
29
- }, de = ["data-path"], ue = S({
29
+ }, de = ["data-path"], ue = T({
30
30
  name: "vft-md-container"
31
- }), Pe = /* @__PURE__ */ S({
31
+ }), qe = /* @__PURE__ */ T({
32
32
  ...ue,
33
33
  props: {
34
34
  tocList: {},
35
35
  scrollDom: { default: ".layout-content" }
36
36
  },
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`);
37
+ setup(r) {
38
+ const l = Z("md-container"), _ = R(), f = $(), d = v(() => r.tocList && r.tocList !== "undefined" ? JSON.parse(r.tocList) : ""), { initPhotoSwipe: D } = oe(`.${l.e("content")} img`);
39
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);
40
+ const p = _.appContext.config.globalProperties.$router, a = p.currentRoute.value, L = W(), V = Q ? location.pathname : "", { go: w } = ee(p);
41
41
  function E(o) {
42
42
  w(`/?classify=${o}`);
43
43
  }
@@ -46,24 +46,22 @@ const re = { class: "info-container" }, se = {
46
46
  scrollDom: ".layout-content",
47
47
  contentDom: ".header-anchor",
48
48
  selectAttrName: "href",
49
- offset: 100,
49
+ offset: 150,
50
50
  callback: (o) => {
51
- f.value.menuRef.updateActiveIndex(
52
- o.slice(1)
53
- );
51
+ f.value.menuRef.activeIndex = o.slice(1);
54
52
  }
55
53
  }),
56
54
  100
57
55
  ), h = (o) => {
58
- b(`#${o.index}`);
56
+ S(`#${o.index}`, r.scrollDom, 120);
59
57
  }, y = () => {
60
- const o = document.querySelector(s.scrollDom);
58
+ const o = document.querySelector(r.scrollDom);
61
59
  o && o.removeEventListener("scroll", g);
62
60
  };
63
- return A(() => {
64
- P(() => {
61
+ return P(() => {
62
+ q(() => {
65
63
  setTimeout(() => {
66
- b(encodeURI(a.hash));
64
+ S(encodeURI(a.hash));
67
65
  }), setTimeout(() => {
68
66
  const t = document.querySelector(".layout-content");
69
67
  t && t.addEventListener("scroll", g);
@@ -76,14 +74,14 @@ const re = { class: "info-container" }, se = {
76
74
  n[t].offsetHeight === 0 ? (n[t].style.height = "auto", n[t].style.visibility = "visible") : (n[t].style.height = "0px", n[t].style.visibility = "hidden");
77
75
  });
78
76
  });
79
- }), q(() => {
80
- y();
81
77
  }), z(() => {
82
78
  y();
83
- }), (o, n) => (r(), u("div", {
79
+ }), A(() => {
80
+ y();
81
+ }), (o, n) => (s(), u("div", {
84
82
  class: c([e(l).b(), e(l).is("api", M.value)])
85
83
  }, [
86
- d.value?.length ? (r(), C(e(U), {
84
+ d.value?.length ? (s(), C(e(U), {
87
85
  key: 0,
88
86
  ref_key: "sideMenuRef",
89
87
  ref: f,
@@ -105,15 +103,15 @@ const re = { class: "info-container" }, se = {
105
103
  }, [
106
104
  i("h1", {
107
105
  class: c(e(l).e("title"))
108
- }, _(e(a).meta?.title), 3),
106
+ }, k(e(a).meta?.title), 3),
109
107
  i("div", re, [
110
- e(a).meta?.category?.length ? (r(), u("div", se, [
111
- m(e(k), {
108
+ e(a).meta?.category?.length ? (s(), u("div", se, [
109
+ m(e(b), {
112
110
  size: 14,
113
111
  color: e(L),
114
112
  icon: "icon-category"
115
113
  }, null, 8, ["color"]),
116
- (r(!0), u(I, null, B(e(a).meta?.category, (t, N) => (r(), C(e(Y), {
114
+ (s(!0), u(I, null, B(e(a).meta?.category, (t, N) => (s(), C(e(Y), {
117
115
  size: "small",
118
116
  class: "tag",
119
117
  type: e(K)(e(le), 1)[0],
@@ -121,7 +119,7 @@ const re = { class: "info-container" }, se = {
121
119
  onClick: (fe) => E(t)
122
120
  }, {
123
121
  default: F(() => [
124
- H(_(t), 1)
122
+ H(k(t), 1)
125
123
  ]),
126
124
  _: 2
127
125
  }, 1032, ["type", "onClick"]))), 128))
@@ -138,7 +136,7 @@ const re = { class: "info-container" }, se = {
138
136
  )
139
137
  }, null, 8, ["text"]),
140
138
  i("div", me, [
141
- m(e(k), {
139
+ m(e(b), {
142
140
  icon: "icon-reading",
143
141
  size: 14,
144
142
  class: "mr-5px"
@@ -169,5 +167,5 @@ const re = { class: "info-container" }, se = {
169
167
  }
170
168
  });
171
169
  export {
172
- Pe as default
170
+ qe as default
173
171
  };
@@ -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 u, Fragment as pe, withDirectives as me, vShow as de } from "vue";
1
+ import { defineComponent as Z, getCurrentInstance as le, computed as l, inject as D, ref as x, reactive as ue, watch as ae, provide as se, onMounted as ie, onBeforeUnmount as re, useSlots as ce, h as a, Fragment as de, withDirectives as pe, vShow as me } 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";
@@ -14,11 +14,11 @@ import "@popperjs/core";
14
14
  import "../../hooks/use-z-index/index.js";
15
15
  import he from "./use-menu.js";
16
16
  import { useMenuCssVar as Te } from "./use-menu-css-var.js";
17
- const Ce = Z({
17
+ const xe = Z({
18
18
  name: "vft-sub-menu",
19
19
  inheritAttrs: !1
20
20
  }), Ve = /* @__PURE__ */ Z({
21
- ...Ce,
21
+ ...xe,
22
22
  props: {
23
23
  index: {},
24
24
  showTimeout: {
@@ -53,29 +53,29 @@ const Ce = Z({
53
53
  expose: q,
54
54
  emit: G
55
55
  }) {
56
- const y = G, I = w("sub-menu"), m = le(), {
56
+ const I = G, y = w("sub-menu"), p = le(), {
57
57
  indexPath: f,
58
58
  parentMenu: k
59
- } = he(m, l(() => o.index)), i = w("menu"), a = w("sub-menu"), e = D("rootMenu");
60
- e || U(I.b(), "can not inject root menu");
61
- const r = D(`subMenu:${k.value.uid}`);
62
- r || U(I.b(), "can not inject sub menu");
63
- const S = C({});
59
+ } = he(p, l(() => o.index)), r = w("menu"), u = w("sub-menu"), e = D("rootMenu");
60
+ e || U(y.b(), "can not inject root menu");
61
+ const i = D(`subMenu:${k.value.uid}`);
62
+ i || U(y.b(), "can not inject sub menu");
63
+ const C = x({});
64
64
  let M;
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(() => {
65
+ const z = x(!1), J = x(), E = x(null), A = l(() => d.value === "horizontal" && b.value ? "bottom-start" : "right-start"), b = l(() => i.level === 0), S = l(() => o.teleported === void 0 ? b.value : o.teleported), K = l(() => e.props.collapse ? `${r.namespace.value}-zoom-in-left` : `${r.namespace.value}-zoom-in-top`), Q = l(() => d.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)), m = l(() => {
66
66
  let t = !1;
67
- return Object.values(S.value).forEach((s) => {
67
+ return Object.values(C.value).forEach((s) => {
68
68
  s.active && (t = !0);
69
69
  }), o.index === e.activeIndex && (t = !0), t;
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({
70
+ }), B = l(() => e.props.backgroundColor || ""), P = l(() => e.props.activeTextColor || ""), F = l(() => e.props.textColor || ""), d = l(() => e.props.mode), W = l(() => e.props.persistent), h = ue({
71
71
  index: o.index,
72
72
  indexPath: f,
73
- active: d
74
- }), j = Te(e.props, r.level + 1), $ = l(() => p.value !== "horizontal" ? {
73
+ active: m
74
+ }), j = Te(e.props, i.level + 1), $ = l(() => d.value !== "horizontal" ? {
75
75
  color: F.value
76
76
  } : {
77
- borderBottomColor: d.value ? e.props.activeTextColor ? P.value : "" : "transparent",
78
- color: d.value ? P.value : F.value
77
+ borderBottomColor: m.value ? e.props.activeTextColor ? P.value : "" : "transparent",
78
+ color: m.value ? P.value : F.value
79
79
  }), X = () => E.value?.popperRef?.popperInstanceRef?.destroy(), Y = (t) => {
80
80
  t || X();
81
81
  }, O = (t) => {
@@ -83,7 +83,7 @@ const Ce = Z({
83
83
  e: t,
84
84
  index: o.index,
85
85
  indexPath: f.value,
86
- active: d.value
86
+ active: m.value
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({
@@ -94,11 +94,11 @@ const Ce = Z({
94
94
  }
95
95
  e.handleSubMenuClick(s);
96
96
  }, v = (t, s = o.showTimeout) => {
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?.(), {
97
+ t.type !== "focus" && (e.props.menuTrigger === "click" && e.props.mode === "horizontal" || !e.props.collapse && e.props.mode === "vertical" || o.disabled || (i.mouseInChild.value = !0, M?.(), {
98
98
  stop: M
99
99
  } = H(() => {
100
100
  e.openMenu(o.index, f.value);
101
- }, s), x.value && k.value.vnode.el?.dispatchEvent(new MouseEvent("mouseenter")), y("mouseenter", t)));
101
+ }, s), S.value && k.value.vnode.el?.dispatchEvent(new MouseEvent("mouseenter")), I("mouseenter", t)));
102
102
  }, _ = () => {
103
103
  e.inSubMenuMouseEnterTimer && clearTimeout(e.inSubMenuMouseEnterTimer), e.inSubMenuMouseleaveTimer && clearTimeout(e.inSubMenuMouseleaveTimer), e.inSubMenuMouseEnterTimer = setTimeout(() => {
104
104
  e.inSubMenu = !0;
@@ -108,35 +108,33 @@ const Ce = Z({
108
108
  e.inSubMenu = !1;
109
109
  }, o.hideTimeout - 10);
110
110
  }, T = (t, s = !1) => {
111
- e.props.menuTrigger === "click" && e.props.mode === "horizontal" || !e.props.collapse && e.props.mode === "vertical" || (M?.(), r.mouseInChild.value = !1, {
111
+ e.props.menuTrigger === "click" && e.props.mode === "horizontal" || !e.props.collapse && e.props.mode === "vertical" || (M?.(), i.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 && s && m.parent?.type.name === "vft-sub-menu" && r.handleMouseleave?.(t, !0), y("mouseleave", t));
115
+ }, o.hideTimeout), S.value && s && p.parent?.type.name === "vft-sub-menu" && i.handleMouseleave?.(t, !0), I("mouseleave", t));
116
116
  };
117
117
  ae(() => e.props.collapse, (t) => Y(!!t));
118
118
  {
119
119
  const t = (n) => {
120
- S.value[n.index] = n;
120
+ C.value[n.index] = n;
121
121
  }, s = (n) => {
122
- delete S.value[n.index];
122
+ delete C.value[n.index];
123
123
  };
124
- se(`subMenu:${m.uid}`, {
124
+ se(`subMenu:${p.uid}`, {
125
125
  addSubMenu: t,
126
126
  removeSubMenu: s,
127
127
  handleMouseleave: T,
128
128
  mouseInChild: z,
129
- level: r.level + 1
129
+ level: i.level + 1
130
130
  });
131
131
  }
132
- q({
133
- opened: c
132
+ ie(() => {
133
+ e.addSubMenu(h), i.addSubMenu(h);
134
134
  }), re(() => {
135
- e.addSubMenu(h), r.addSubMenu(h);
136
- }), ie(() => {
137
- r.removeSubMenu(h), e.removeSubMenu(h);
135
+ i.removeSubMenu(h), e.removeSubMenu(h);
138
136
  });
139
- const V = ce(), N = l(() => g(o.icon, "icon")), oe = l(() => g(o.expandIcon, "icon")), te = l(() => g(o.collapseIcon, "icon")), ne = l(() => p.value === "horizontal" && b.value || p.value === "vertical" && !e.props.collapse ? {
137
+ const V = ce(), N = l(() => g(o.icon, "icon")), oe = l(() => g(o.expandIcon, "icon")), te = l(() => g(o.collapseIcon, "icon")), ne = l(() => d.value === "horizontal" && b.value || d.value === "vertical" && !e.props.collapse ? {
140
138
  icon: "icon-arrow-down",
141
139
  size: 20,
142
140
  ...oe.value
@@ -144,20 +142,22 @@ const Ce = Z({
144
142
  icon: "icon-arrow-right",
145
143
  size: 18,
146
144
  ...te.value
147
- }), R = l(() => ve(m, "title"));
148
- return () => {
149
- const t = [N.value?.icon ? u(L, {
145
+ }), R = l(() => ve(p, "title"));
146
+ return q({
147
+ opened: c
148
+ }), () => {
149
+ const t = [N.value?.icon ? a(L, {
150
150
  ...N.value
151
- }) : null, u("span", {
152
- class: [a.e("text"), a.is("arrow", o.showArrow)],
153
- title: m.props.title
154
- }, R.value), o.showArrow ? u(L, {
155
- class: a.e("icon-arrow"),
151
+ }) : null, a("span", {
152
+ class: [u.e("text"), u.is("arrow", o.showArrow)],
153
+ title: p.props.title
154
+ }, R.value), o.showArrow ? a(L, {
155
+ class: u.e("icon-arrow"),
156
156
  ...ne.value,
157
157
  style: {
158
158
  transform: c.value ? "rotateZ(180deg)" : "none"
159
159
  }
160
- }) : !1], s = e.isMenuPopup ? u(Me, {
160
+ }) : !1], s = e.isMenuPopup ? a(Me, {
161
161
  ref: E,
162
162
  visible: c.value,
163
163
  effect: "light",
@@ -167,25 +167,25 @@ const Ce = Z({
167
167
  persistent: W.value,
168
168
  popperClass: o.popperClass,
169
169
  placement: A.value,
170
- teleported: x.value,
170
+ teleported: S.value,
171
171
  fallbackPlacements: Q.value,
172
172
  transition: K.value,
173
173
  gpuAcceleration: !1,
174
174
  ...o.toolTipCfg
175
175
  }, {
176
- content: () => u("div", {
177
- class: [i.m(p.value), i.m("popup-container"), o.popperClass],
176
+ content: () => a("div", {
177
+ class: [r.m(d.value), r.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
- }, [u("div", {
182
- class: [i.b(), i.m("popup"), i.m(`popup-${A.value}`)],
181
+ }, [a("div", {
182
+ class: [r.b(), r.m("popup"), r.m(`popup-${A.value}`)],
183
183
  style: j.value
184
- }, [u("ul", {
185
- class: i.m("popup-ul-list")
184
+ }, [a("ul", {
185
+ class: r.m("popup-ul-list")
186
186
  }, V.default?.())])]),
187
- default: () => u("div", {
188
- class: a.e("title"),
187
+ default: () => a("div", {
188
+ class: [u.e("title"), u.is("active", o.index === e.activeIndex)],
189
189
  style: [$.value, {
190
190
  backgroundColor: B.value
191
191
  }],
@@ -195,23 +195,23 @@ const Ce = Z({
195
195
  }, t)
196
196
  }) : (
197
197
  // 以下是无需 tooltip 渲染的组件,通常是侧边栏没有折叠的时候
198
- u(pe, {}, [R.value ? u("div", {
199
- class: a.e("title"),
198
+ a(de, {}, [R.value ? a("div", {
199
+ class: [u.e("title"), u.is("active", o.index === e.activeIndex)],
200
200
  style: [$.value, {
201
201
  backgroundColor: B.value
202
202
  }],
203
203
  ref: J,
204
204
  onClick: O
205
- }, t) : null, u(be, {}, {
206
- default: () => me(u("ul", {
205
+ }, t) : null, a(be, {}, {
206
+ default: () => pe(a("ul", {
207
207
  role: "menu",
208
- class: [i.b(), i.m("inline")],
208
+ class: [r.b(), r.m("inline")],
209
209
  style: j.value
210
- }, [V.default?.()]), [[de, c.value]])
210
+ }, [V.default?.()]), [[me, c.value]])
211
211
  })])
212
212
  );
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
+ return a("li", {
214
+ class: [u.b(), u.is("active", m.value), u.e(String(i.level)), u.is("in-popup", i.level !== 0), u.is("opened", c.value), u.is("arrow", !0), u.is("disabled", o.disabled)],
215
215
  role: "menuitem",
216
216
  ariaHaspopup: !0,
217
217
  ariaExpanded: c.value,
@@ -2,14 +2,14 @@ import "@vueuse/core";
2
2
  import { isNumber as m, isClient as p } from "@vft/utils";
3
3
  import { debugWarn as l } from "../../utils/error.js";
4
4
  import "../../components/config-provider/hooks/use-global-config.js";
5
- import { ref as v, getCurrentInstance as i, inject as e, computed as c, unref as Z } from "vue";
5
+ import { getCurrentInstance as i, inject as e, computed as c, unref as v, ref as Z } from "vue";
6
6
  import "lodash-es";
7
7
  import "../../components/form/index.js";
8
8
  const s = {
9
9
  current: 0
10
- }, u = v(0), f = 2e3, d = Symbol("vftZIndexContextKey"), y = Symbol("zIndexContextKey"), K = (I) => {
10
+ }, u = Z(0), f = 2e3, d = Symbol("vftZIndexContextKey"), y = Symbol("zIndexContextKey"), K = (I) => {
11
11
  const n = i() ? e(d, s) : s, x = I || (i() ? e(y, void 0) : void 0), t = c(() => {
12
- const r = Z(x);
12
+ const r = v(x);
13
13
  return m(r) ? r : f;
14
14
  }), o = c(() => t.value + u.value), a = () => (n.current++, u.value = n.current, o.value);
15
15
  return !p && !e(d) && l(
@@ -1,6 +1,6 @@
1
1
  declare const _default: {
2
2
  "name": "vft",
3
- "version": "0.0.435",
3
+ "version": "0.0.437",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "es/index.js",
@@ -1,4 +1,4 @@
1
- const o = "0.0.435";
1
+ const o = "0.0.437";
2
2
  export {
3
3
  o as version
4
4
  };
@@ -1 +1 @@
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
+ "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"),S=require("../side-menu/index.cjs"),b=require("../tag/index.cjs");require("@vueuse/core");const s=require("@vft/utils");require("../config-provider/hooks/use-global-config.cjs");const _=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"},I={class:"reading",title:"阅读量"},A=["data-path"],j=e.defineComponent({name:"vft-md-container"}),O=e.defineComponent({...j,props:{tocList:{},scrollDom:{default:".layout-content"}},setup(i){const l=D.useNamespace("md-container"),v=e.getCurrentInstance(),a=e.ref(),c=e.computed(()=>i.tocList&&i.tocList!=="undefined"?JSON.parse(i.tocList):""),{initPhotoSwipe:y}=L.usePhotoSwipe(`.${l.e("content")} img`);y(),M.useCopyCode();const u=v.appContext.config.globalProperties.$router,r=u.currentRoute.value,h=_.primaryColor(),C=s.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(()=>s.handleScrollPosition({scrollDom:".layout-content",contentDom:".header-anchor",selectAttrName:"href",offset:150,callback:n=>{a.value.menuRef.activeIndex=n.slice(1)}}),100),m=n=>{s.jumpElement(`#${n.index}`,i.scrollDom,120)},f=()=>{const n=document.querySelector(i.scrollDom);n&&n.removeEventListener("scroll",d)};return e.onMounted(()=>{e.nextTick(()=>{setTimeout(()=>{s.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)])},[c.value?.length?(e.openBlock(),e.createBlock(e.unref(S.VftSideMenu),{key:0,ref_key:"sideMenuRef",ref:a,"default-active":c.value[0].slug,class:"toc-side-menu",menus:c.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(b.VftTag),{size:"small",class:"tag",type:e.unref(s.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",I,[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,A)])])])],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.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("@vft/utils"),ee=require("../tooltip/index.cjs"),V=require("../icon/index.cjs"),te=require("../collapse-transition/index.cjs"),N=require("@vueuse/core"),R=require("../../utils/error.cjs");require("../config-provider/hooks/use-global-config.cjs");require("lodash-es");require("../form/index.cjs");const x=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const oe=require("./use-menu.cjs"),ne=require("./use-menu-css-var.cjs"),ue=e.defineComponent({name:"vft-sub-menu",inheritAttrs:!1}),le=e.defineComponent({...ue,props:{index:{},showTimeout:{default:300},hideTimeout:{default:300},popperClass:{},disabled:{type:Boolean},popperOffset:{default:6},expandIcon:{},collapseIcon:{},title:{},icon:{},showArrow:{type:Boolean,default:!0},toolTipCfg:{},teleported:{type:Boolean,default:void 0}},emits:["mouseenter","mouseleave"],setup(o,{expose:D,emit:L}){const S=L,w=x.useNamespace("sub-menu"),d=e.getCurrentInstance(),{indexPath:f,parentMenu:q}=oe.default(d,e.computed(()=>o.index)),a=x.useNamespace("menu"),l=x.useNamespace("sub-menu"),t=e.inject("rootMenu");t||R.throwError(w.b(),"can not inject root menu");const r=e.inject(`subMenu:${q.value.uid}`);r||R.throwError(w.b(),"can not inject sub menu");const C=e.ref({});let M;const y=e.ref(!1),H=e.ref(),I=e.ref(null),k=e.computed(()=>c.value==="horizontal"&&b.value?"bottom-start":"right-start"),b=e.computed(()=>r.level===0),g=e.computed(()=>o.teleported===void 0?b.value:o.teleported),U=e.computed(()=>t.props.collapse?`${a.namespace.value}-zoom-in-left`:`${a.namespace.value}-zoom-in-top`),Z=e.computed(()=>c.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"]),i=e.computed(()=>t.openedMenus.includes(o.index)),p=e.computed(()=>{let n=!1;return Object.values(C.value).forEach(s=>{s.active&&(n=!0)}),o.index===t.activeIndex&&(n=!0),n}),z=e.computed(()=>t.props.backgroundColor||""),E=e.computed(()=>t.props.activeTextColor||""),A=e.computed(()=>t.props.textColor||""),c=e.computed(()=>t.props.mode),G=e.computed(()=>t.props.persistent),h=e.reactive({index:o.index,indexPath:f,active:p}),j=ne.useMenuCssVar(t.props,r.level+1),P=e.computed(()=>c.value!=="horizontal"?{color:A.value}:{borderBottomColor:p.value?t.props.activeTextColor?E.value:"":"transparent",color:p.value?E.value:A.value}),J=()=>I.value?.popperRef?.popperInstanceRef?.destroy(),K=n=>{n||J()},$=n=>{const s={e:n,index:o.index,indexPath:f.value,active:p.value};if(t.props.menuTrigger==="hover"&&t.props.mode==="horizontal"&&!m.isMobile()||t.props.collapse&&t.props.mode==="vertical"||o.disabled){t.handleSubMenuClick({...s,isFirstLevel:!0});return}t.handleSubMenuClick(s)},v=(n,s=o.showTimeout)=>{n.type!=="focus"&&(t.props.menuTrigger==="click"&&t.props.mode==="horizontal"||!t.props.collapse&&t.props.mode==="vertical"||o.disabled||(r.mouseInChild.value=!0,M?.(),{stop:M}=N.useTimeoutFn(()=>{t.openMenu(o.index,f.value)},s),g.value&&q.value.vnode.el?.dispatchEvent(new MouseEvent("mouseenter")),S("mouseenter",n)))},Q=()=>{t.inSubMenuMouseEnterTimer&&clearTimeout(t.inSubMenuMouseEnterTimer),t.inSubMenuMouseleaveTimer&&clearTimeout(t.inSubMenuMouseleaveTimer),t.inSubMenuMouseEnterTimer=setTimeout(()=>{t.inSubMenu=!0},o.showTimeout+10)},W=()=>{t.inSubMenuMouseEnterTimer&&clearTimeout(t.inSubMenuMouseEnterTimer),t.inSubMenuMouseleaveTimer&&clearTimeout(t.inSubMenuMouseleaveTimer),t.inSubMenuMouseleaveTimer=setTimeout(()=>{t.inSubMenu=!1},o.hideTimeout-10)},T=(n,s=!1)=>{t.props.menuTrigger==="click"&&t.props.mode==="horizontal"||!t.props.collapse&&t.props.mode==="vertical"||(M?.(),r.mouseInChild.value=!1,{stop:M}=N.useTimeoutFn(()=>{!y.value&&t.closeMenu(o.index,f.value)},o.hideTimeout),g.value&&s&&d.parent?.type.name==="vft-sub-menu"&&r.handleMouseleave?.(n,!0),S("mouseleave",n))};e.watch(()=>t.props.collapse,n=>K(!!n));{const n=u=>{C.value[u.index]=u},s=u=>{delete C.value[u.index]};e.provide(`subMenu:${d.uid}`,{addSubMenu:n,removeSubMenu:s,handleMouseleave:T,mouseInChild:y,level:r.level+1})}D({opened:i}),e.onMounted(()=>{t.addSubMenu(h),r.addSubMenu(h)}),e.onBeforeUnmount(()=>{r.removeSubMenu(h),t.removeSubMenu(h)});const B=e.useSlots(),F=e.computed(()=>m.singleAttrToObj(o.icon,"icon")),X=e.computed(()=>m.singleAttrToObj(o.expandIcon,"icon")),Y=e.computed(()=>m.singleAttrToObj(o.collapseIcon,"icon")),_=e.computed(()=>c.value==="horizontal"&&b.value||c.value==="vertical"&&!t.props.collapse?{icon:"icon-arrow-down",size:20,...X.value}:{icon:"icon-arrow-right",size:18,...Y.value}),O=e.computed(()=>m.renderTNode(d,"title"));return()=>{const n=[F.value?.icon?e.h(V.VftIcon,{...F.value}):null,e.h("span",{class:[l.e("text"),l.is("arrow",o.showArrow)],title:d.props.title},O.value),o.showArrow?e.h(V.VftIcon,{class:l.e("icon-arrow"),..._.value,style:{transform:i.value?"rotateZ(180deg)":"none"}}):!1],s=t.isMenuPopup?e.h(ee.VftTooltip,{ref:I,visible:i.value,effect:"light",pure:!0,offset:o.popperOffset,showArrow:!1,persistent:G.value,popperClass:o.popperClass,placement:k.value,teleported:g.value,fallbackPlacements:Z.value,transition:U.value,gpuAcceleration:!1,...o.toolTipCfg},{content:()=>e.h("div",{class:[a.m(c.value),a.m("popup-container"),o.popperClass],onMouseenter:u=>v(u,100),onMouseleave:u=>T(u,!0),onFocus:u=>v(u,100)},[e.h("div",{class:[a.b(),a.m("popup"),a.m(`popup-${k.value}`)],style:j.value},[e.h("ul",{class:a.m("popup-ul-list")},B.default?.())])]),default:()=>e.h("div",{class:l.e("title"),style:[P.value,{backgroundColor:z.value}],onMouseenter:u=>v(u),onMouseleave:u=>T(u,!0),onClick:u=>$(u)},n)}):e.h(e.Fragment,{},[O.value?e.h("div",{class:l.e("title"),style:[P.value,{backgroundColor:z.value}],ref:H,onClick:$},n):null,e.h(te.VftCollapseTransition,{},{default:()=>e.withDirectives(e.h("ul",{role:"menu",class:[a.b(),a.m("inline")],style:j.value},[B.default?.()]),[[e.vShow,i.value]])})]);return e.h("li",{class:[l.b(),l.is("active",p.value),l.e(String(r.level)),l.is("in-popup",r.level!==0),l.is("opened",i.value),l.is("arrow",!0),l.is("disabled",o.disabled)],role:"menuitem",ariaHaspopup:!0,ariaExpanded:i.value,onMouseenter:[Q,u=>v(u)],onMouseleave:[W,u=>T(u,!0)],onFocus:v},[s])}}});exports.default=le;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("@vft/utils"),ee=require("../tooltip/index.cjs"),V=require("../icon/index.cjs"),te=require("../collapse-transition/index.cjs"),N=require("@vueuse/core"),R=require("../../utils/error.cjs");require("../config-provider/hooks/use-global-config.cjs");require("lodash-es");require("../form/index.cjs");const g=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const oe=require("./use-menu.cjs"),ne=require("./use-menu-css-var.cjs"),ue=e.defineComponent({name:"vft-sub-menu",inheritAttrs:!1}),le=e.defineComponent({...ue,props:{index:{},showTimeout:{default:300},hideTimeout:{default:300},popperClass:{},disabled:{type:Boolean},popperOffset:{default:6},expandIcon:{},collapseIcon:{},title:{},icon:{},showArrow:{type:Boolean,default:!0},toolTipCfg:{},teleported:{type:Boolean,default:void 0}},emits:["mouseenter","mouseleave"],setup(o,{expose:D,emit:L}){const S=L,w=g.useNamespace("sub-menu"),d=e.getCurrentInstance(),{indexPath:f,parentMenu:I}=oe.default(d,e.computed(()=>o.index)),r=g.useNamespace("menu"),l=g.useNamespace("sub-menu"),t=e.inject("rootMenu");t||R.throwError(w.b(),"can not inject root menu");const a=e.inject(`subMenu:${I.value.uid}`);a||R.throwError(w.b(),"can not inject sub menu");const x=e.ref({});let M;const q=e.ref(!1),H=e.ref(),y=e.ref(null),k=e.computed(()=>c.value==="horizontal"&&b.value?"bottom-start":"right-start"),b=e.computed(()=>a.level===0),C=e.computed(()=>o.teleported===void 0?b.value:o.teleported),U=e.computed(()=>t.props.collapse?`${r.namespace.value}-zoom-in-left`:`${r.namespace.value}-zoom-in-top`),Z=e.computed(()=>c.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"]),i=e.computed(()=>t.openedMenus.includes(o.index)),p=e.computed(()=>{let n=!1;return Object.values(x.value).forEach(s=>{s.active&&(n=!0)}),o.index===t.activeIndex&&(n=!0),n}),z=e.computed(()=>t.props.backgroundColor||""),E=e.computed(()=>t.props.activeTextColor||""),A=e.computed(()=>t.props.textColor||""),c=e.computed(()=>t.props.mode),G=e.computed(()=>t.props.persistent),h=e.reactive({index:o.index,indexPath:f,active:p}),j=ne.useMenuCssVar(t.props,a.level+1),P=e.computed(()=>c.value!=="horizontal"?{color:A.value}:{borderBottomColor:p.value?t.props.activeTextColor?E.value:"":"transparent",color:p.value?E.value:A.value}),J=()=>y.value?.popperRef?.popperInstanceRef?.destroy(),K=n=>{n||J()},$=n=>{const s={e:n,index:o.index,indexPath:f.value,active:p.value};if(t.props.menuTrigger==="hover"&&t.props.mode==="horizontal"&&!m.isMobile()||t.props.collapse&&t.props.mode==="vertical"||o.disabled){t.handleSubMenuClick({...s,isFirstLevel:!0});return}t.handleSubMenuClick(s)},v=(n,s=o.showTimeout)=>{n.type!=="focus"&&(t.props.menuTrigger==="click"&&t.props.mode==="horizontal"||!t.props.collapse&&t.props.mode==="vertical"||o.disabled||(a.mouseInChild.value=!0,M?.(),{stop:M}=N.useTimeoutFn(()=>{t.openMenu(o.index,f.value)},s),C.value&&I.value.vnode.el?.dispatchEvent(new MouseEvent("mouseenter")),S("mouseenter",n)))},Q=()=>{t.inSubMenuMouseEnterTimer&&clearTimeout(t.inSubMenuMouseEnterTimer),t.inSubMenuMouseleaveTimer&&clearTimeout(t.inSubMenuMouseleaveTimer),t.inSubMenuMouseEnterTimer=setTimeout(()=>{t.inSubMenu=!0},o.showTimeout+10)},W=()=>{t.inSubMenuMouseEnterTimer&&clearTimeout(t.inSubMenuMouseEnterTimer),t.inSubMenuMouseleaveTimer&&clearTimeout(t.inSubMenuMouseleaveTimer),t.inSubMenuMouseleaveTimer=setTimeout(()=>{t.inSubMenu=!1},o.hideTimeout-10)},T=(n,s=!1)=>{t.props.menuTrigger==="click"&&t.props.mode==="horizontal"||!t.props.collapse&&t.props.mode==="vertical"||(M?.(),a.mouseInChild.value=!1,{stop:M}=N.useTimeoutFn(()=>{!q.value&&t.closeMenu(o.index,f.value)},o.hideTimeout),C.value&&s&&d.parent?.type.name==="vft-sub-menu"&&a.handleMouseleave?.(n,!0),S("mouseleave",n))};e.watch(()=>t.props.collapse,n=>K(!!n));{const n=u=>{x.value[u.index]=u},s=u=>{delete x.value[u.index]};e.provide(`subMenu:${d.uid}`,{addSubMenu:n,removeSubMenu:s,handleMouseleave:T,mouseInChild:q,level:a.level+1})}e.onMounted(()=>{t.addSubMenu(h),a.addSubMenu(h)}),e.onBeforeUnmount(()=>{a.removeSubMenu(h),t.removeSubMenu(h)});const B=e.useSlots(),F=e.computed(()=>m.singleAttrToObj(o.icon,"icon")),X=e.computed(()=>m.singleAttrToObj(o.expandIcon,"icon")),Y=e.computed(()=>m.singleAttrToObj(o.collapseIcon,"icon")),_=e.computed(()=>c.value==="horizontal"&&b.value||c.value==="vertical"&&!t.props.collapse?{icon:"icon-arrow-down",size:20,...X.value}:{icon:"icon-arrow-right",size:18,...Y.value}),O=e.computed(()=>m.renderTNode(d,"title"));return D({opened:i}),()=>{const n=[F.value?.icon?e.h(V.VftIcon,{...F.value}):null,e.h("span",{class:[l.e("text"),l.is("arrow",o.showArrow)],title:d.props.title},O.value),o.showArrow?e.h(V.VftIcon,{class:l.e("icon-arrow"),..._.value,style:{transform:i.value?"rotateZ(180deg)":"none"}}):!1],s=t.isMenuPopup?e.h(ee.VftTooltip,{ref:y,visible:i.value,effect:"light",pure:!0,offset:o.popperOffset,showArrow:!1,persistent:G.value,popperClass:o.popperClass,placement:k.value,teleported:C.value,fallbackPlacements:Z.value,transition:U.value,gpuAcceleration:!1,...o.toolTipCfg},{content:()=>e.h("div",{class:[r.m(c.value),r.m("popup-container"),o.popperClass],onMouseenter:u=>v(u,100),onMouseleave:u=>T(u,!0),onFocus:u=>v(u,100)},[e.h("div",{class:[r.b(),r.m("popup"),r.m(`popup-${k.value}`)],style:j.value},[e.h("ul",{class:r.m("popup-ul-list")},B.default?.())])]),default:()=>e.h("div",{class:[l.e("title"),l.is("active",o.index===t.activeIndex)],style:[P.value,{backgroundColor:z.value}],onMouseenter:u=>v(u),onMouseleave:u=>T(u,!0),onClick:u=>$(u)},n)}):e.h(e.Fragment,{},[O.value?e.h("div",{class:[l.e("title"),l.is("active",o.index===t.activeIndex)],style:[P.value,{backgroundColor:z.value}],ref:H,onClick:$},n):null,e.h(te.VftCollapseTransition,{},{default:()=>e.withDirectives(e.h("ul",{role:"menu",class:[r.b(),r.m("inline")],style:j.value},[B.default?.()]),[[e.vShow,i.value]])})]);return e.h("li",{class:[l.b(),l.is("active",p.value),l.e(String(a.level)),l.is("in-popup",a.level!==0),l.is("opened",i.value),l.is("arrow",!0),l.is("disabled",o.disabled)],role:"menuitem",ariaHaspopup:!0,ariaExpanded:i.value,onMouseenter:[Q,u=>v(u)],onMouseleave:[W,u=>T(u,!0)],onFocus:v},[s])}}});exports.default=le;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.0.435";exports.version=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.0.437";exports.version=e;
@@ -1,6 +1,6 @@
1
1
  declare const _default: {
2
2
  "name": "vft",
3
- "version": "0.0.435",
3
+ "version": "0.0.437",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "es/index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vft",
3
- "version": "0.0.435",
3
+ "version": "0.0.437",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "es/index.js",
@@ -55,12 +55,12 @@
55
55
  "resize-detector": "0.3.0",
56
56
  "sortablejs": "1.15.0",
57
57
  "photoswipe": "5.4.4",
58
- "@vft/router": "0.0.67",
59
- "@vft/use": "0.0.89",
60
- "@vft/store": "0.0.57",
58
+ "@vft/constants": "0.0.75",
61
59
  "@vft/utils": "0.0.144",
60
+ "@vft/router": "0.0.67",
62
61
  "@vft/directives": "0.0.36",
63
- "@vft/constants": "0.0.75"
62
+ "@vft/store": "0.0.57",
63
+ "@vft/use": "0.0.89"
64
64
  },
65
65
  "vetur": {
66
66
  "tags": "tags.json",