vft 0.0.51 → 0.0.55

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.
Files changed (124) hide show
  1. package/attributes.json +1 -0
  2. package/dist/index.css +1 -1
  3. package/es/component.js +0 -2
  4. package/es/components/avatar/avatar.vue.d.ts +2 -2
  5. package/es/components/avatar/avatar.vue2.js +19 -24
  6. package/es/components/avatar/index.d.ts +2 -2
  7. package/es/components/back-top/back-top.vue2.js +4 -3
  8. package/es/components/context-menu/context-menu.vue2.js +46 -41
  9. package/es/components/divider/divider.vue.d.ts +2 -2
  10. package/es/components/divider/index.d.ts +2 -2
  11. package/es/components/dropdown/dropdown-item-impl.vue.d.ts +1 -1
  12. package/es/components/dropdown/dropdown-menu.vue.d.ts +1 -1
  13. package/es/components/dropdown/dropdown.vue.d.ts +3 -3
  14. package/es/components/dropdown/index.d.ts +5 -5
  15. package/es/components/empty/empty.vue.d.ts +2 -2
  16. package/es/components/empty/index.d.ts +2 -2
  17. package/es/components/form/form.vue.d.ts +4 -4
  18. package/es/components/form/index.d.ts +4 -4
  19. package/es/components/icon-text/icon-text.vue2.js +31 -24
  20. package/es/components/md-container/md-container.vue2.js +74 -68
  21. package/es/components/md-container/use/useCopyCode.js +3 -3
  22. package/es/components/menu/menu-item.vue2.js +4 -3
  23. package/es/components/menu/sub-menu.vue2.js +4 -3
  24. package/es/components/multiple-tabs/multiple-tabs.vue2.js +34 -36
  25. package/es/components/multiple-tabs/tab-content.vue2.js +18 -84
  26. package/es/components/popper/composables/use-content.d.ts +4 -4
  27. package/es/components/popper/index.d.ts +2 -2
  28. package/es/components/popper/popper.vue.d.ts +2 -2
  29. package/es/components/result/result.vue2.js +4 -3
  30. package/es/components/search/search.vue2.js +4 -3
  31. package/es/components/select-v2/index.d.ts +12 -12
  32. package/es/components/select-v2/select.vue.d.ts +6 -6
  33. package/es/components/select-v2/useSelect.d.ts +3 -3
  34. package/es/components/side-menu/side-menu.vue2.js +3 -2
  35. package/es/components/tabs/index.d.ts +10 -10
  36. package/es/components/tabs/tab-nav.vue.d.ts +6 -7
  37. package/es/components/tabs/tab-nav.vue2.js +42 -38
  38. package/es/components/tabs/tabs.vue.d.ts +11 -11
  39. package/es/components/tabs/tabs.vue2.js +43 -48
  40. package/es/components/tooltip/index.d.ts +2 -2
  41. package/es/components/tooltip/tooltip.vue.d.ts +2 -2
  42. package/es/components/virtual-list/builders/build-grid.d.ts +1 -1
  43. package/es/components/virtual-list/builders/build-list.d.ts +1 -1
  44. package/es/components/virtual-list/components/dynamic-size-grid.d.ts +1 -1
  45. package/es/components/virtual-list/components/dynamic-size-list.d.ts +1 -1
  46. package/es/components/virtual-list/components/fixed-size-grid.d.ts +1 -1
  47. package/es/components/virtual-list/components/fixed-size-list.d.ts +1 -1
  48. package/es/hooks/use-popper/index.d.ts +4 -4
  49. package/es/package.json.js +1 -1
  50. package/global.d.ts +28 -3
  51. package/lib/components/avatar/avatar.vue.d.ts +2 -2
  52. package/lib/components/avatar/avatar.vue2.cjs +1 -1
  53. package/lib/components/avatar/index.d.ts +2 -2
  54. package/lib/components/back-top/back-top.vue2.cjs +1 -1
  55. package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
  56. package/lib/components/divider/divider.vue.d.ts +2 -2
  57. package/lib/components/divider/index.d.ts +2 -2
  58. package/lib/components/dropdown/dropdown-item-impl.vue.d.ts +1 -1
  59. package/lib/components/dropdown/dropdown-menu.vue.d.ts +1 -1
  60. package/lib/components/dropdown/dropdown.vue.d.ts +3 -3
  61. package/lib/components/dropdown/index.d.ts +5 -5
  62. package/lib/components/empty/empty.vue.d.ts +2 -2
  63. package/lib/components/empty/index.d.ts +2 -2
  64. package/lib/components/form/form.vue.d.ts +4 -4
  65. package/lib/components/form/index.d.ts +4 -4
  66. package/lib/components/icon-text/icon-text.vue2.cjs +1 -1
  67. package/lib/components/md-container/md-container.vue2.cjs +1 -1
  68. package/lib/components/md-container/use/useCopyCode.cjs +1 -1
  69. package/lib/components/menu/menu-item.vue2.cjs +1 -1
  70. package/lib/components/menu/sub-menu.vue2.cjs +1 -1
  71. package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
  72. package/lib/components/multiple-tabs/tab-content.vue2.cjs +1 -1
  73. package/lib/components/popper/composables/use-content.d.ts +4 -4
  74. package/lib/components/popper/index.d.ts +2 -2
  75. package/lib/components/popper/popper.vue.d.ts +2 -2
  76. package/lib/components/result/result.vue2.cjs +1 -1
  77. package/lib/components/search/search.vue2.cjs +1 -1
  78. package/lib/components/select-v2/index.d.ts +12 -12
  79. package/lib/components/select-v2/select.vue.d.ts +6 -6
  80. package/lib/components/select-v2/useSelect.d.ts +3 -3
  81. package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
  82. package/lib/components/tabs/index.d.ts +10 -10
  83. package/lib/components/tabs/tab-nav.vue.d.ts +6 -7
  84. package/lib/components/tabs/tab-nav.vue2.cjs +1 -1
  85. package/lib/components/tabs/tabs.vue.d.ts +11 -11
  86. package/lib/components/tabs/tabs.vue2.cjs +1 -1
  87. package/lib/components/tooltip/index.d.ts +2 -2
  88. package/lib/components/tooltip/tooltip.vue.d.ts +2 -2
  89. package/lib/components/virtual-list/builders/build-grid.d.ts +1 -1
  90. package/lib/components/virtual-list/builders/build-list.d.ts +1 -1
  91. package/lib/components/virtual-list/components/dynamic-size-grid.d.ts +1 -1
  92. package/lib/components/virtual-list/components/dynamic-size-list.d.ts +1 -1
  93. package/lib/components/virtual-list/components/fixed-size-grid.d.ts +1 -1
  94. package/lib/components/virtual-list/components/fixed-size-list.d.ts +1 -1
  95. package/lib/hooks/use-popper/index.d.ts +4 -4
  96. package/lib/package.json.cjs +1 -1
  97. package/package.json +6 -1
  98. package/tags.json +1 -0
  99. package/theme-style/dark/css-vars.css +1 -1
  100. package/theme-style/index.css +1 -1
  101. package/theme-style/src/button.scss +1 -2
  102. package/theme-style/src/common/var.scss +19 -20
  103. package/theme-style/src/context-menu.scss +12 -0
  104. package/theme-style/src/dark/css-vars.scss +26 -0
  105. package/theme-style/src/dark/var.scss +61 -17
  106. package/theme-style/src/icon-text.scss +2 -0
  107. package/theme-style/src/logo.scss +1 -1
  108. package/theme-style/src/md/table.scss +5 -0
  109. package/theme-style/src/md-container.scss +42 -2
  110. package/theme-style/src/menu.scss +3 -3
  111. package/theme-style/src/side-menu.scss +2 -2
  112. package/theme-style/src/tabs.scss +70 -70
  113. package/theme-style/vft-button.css +1 -1
  114. package/theme-style/vft-context-menu.css +1 -0
  115. package/theme-style/vft-footer-layout.css +1 -1
  116. package/theme-style/vft-header-layout.css +1 -1
  117. package/theme-style/vft-icon-text.css +1 -1
  118. package/theme-style/vft-logo.css +1 -1
  119. package/theme-style/vft-md-container.css +1 -1
  120. package/theme-style/vft-menu.css +1 -1
  121. package/theme-style/vft-multiple-tabs.css +1 -1
  122. package/theme-style/vft-side-menu.css +1 -1
  123. package/theme-style/vft-tabs.css +1 -1
  124. package/web-types.json +1 -0
@@ -1,6 +1,6 @@
1
- import { defineComponent as T, getCurrentInstance as S, ref as g, onMounted as b, nextTick as B, unref as t, openBlock as i, createElementBlock as a, normalizeClass as p, createBlock as v, createCommentVNode as x, createElementVNode as o, toDisplayString as C, createVNode as n, Fragment as I, renderList as M, withCtx as R, createTextVNode as $, renderSlot as A } from "vue";
1
+ import { defineComponent as T, getCurrentInstance as A, ref as v, onMounted as P, nextTick as B, unref as t, openBlock as s, createElementBlock as c, normalizeClass as a, createBlock as y, createCommentVNode as x, createElementVNode as e, toDisplayString as C, createVNode as l, Fragment as H, renderList as I, withCtx as L, createTextVNode as M, renderSlot as R } from "vue";
2
2
  import "../divider/index.js";
3
- import { VftIcon as y } from "../icon/index.js";
3
+ import { VftIcon as k } from "../icon/index.js";
4
4
  import "../avatar/index.js";
5
5
  import "../empty/index.js";
6
6
  import "../result/index.js";
@@ -10,12 +10,13 @@ import "../collapse-transition/index.js";
10
10
  import "../tooltip/index.js";
11
11
  import "../popover/index.js";
12
12
  import "../menu/index.js";
13
- import { jumpElement as F, getRandomElementForArr as H, formatToDateTime as L, getDayTimestamp as j } from "@vft/utils";
14
- import { usePhotoSwipe as J } from "@vft/use";
13
+ import { jumpElement as $, getRandomElementForArr as q, formatToDateTime as F, getDayTimestamp as j } from "@vft/utils";
14
+ import "../context-menu/context-menu.vue2.js";
15
15
  import "../multiple-tabs/multiple-tabs.vue2.js";
16
- import { useRouterHelper as O } from "@vft/router";
16
+ import { useRouterHelper as J } from "@vft/router";
17
17
  import "@vft/store";
18
- import { useRoute as Y } from "vue-router";
18
+ import { usePhotoSwipe as O, useEventListener as Y } from "@vft/use";
19
+ import { useRoute as G } from "vue-router";
19
20
  import "../header-layout/index.js";
20
21
  import "../footer-layout/index.js";
21
22
  import "../iframe-layout/index.js";
@@ -25,12 +26,12 @@ import "../back-top/index.js";
25
26
  import "../config-provider/index.js";
26
27
  import "../descriptions/index.js";
27
28
  import "../full-screen/index.js";
28
- import { VftIconText as q } from "../icon-text/index.js";
29
+ import { VftIconText as K } from "../icon-text/index.js";
29
30
  import "../image/index.js";
30
31
  import "../input/index.js";
31
32
  import "../link/index.js";
32
33
  import "../pagination/index.js";
33
- import { VftTag as G } from "../tag/index.js";
34
+ import { VftTag as Q } from "../tag/index.js";
34
35
  import "../side-menu/index.js";
35
36
  import "../qrcode/index.js";
36
37
  import "../overlay/index.js";
@@ -57,120 +58,125 @@ import "../verify-code/index.js";
57
58
  import "../table/index.js";
58
59
  import "../image-viewer/index.js";
59
60
  import "./index.js";
60
- import { VftMdComment as K } from "../md-comment/index.js";
61
+ import { VftMdComment as U } from "../md-comment/index.js";
61
62
  import "../md-tabs/index.js";
62
63
  import "../md-vue-playground/index.js";
63
64
  import "../md-code-demo/index.js";
64
65
  import "../md-code-tabs/index.js";
65
66
  import "../message/index.js";
66
- import { useNamespace as Q } from "../../hooks/use-namespace/index.js";
67
+ import { useNamespace as W } from "../../hooks/use-namespace/index.js";
67
68
  import "@popperjs/core";
68
69
  import "lodash";
69
70
  import "../../hooks/use-z-index/index.js";
70
71
  import "@vueuse/core";
71
- import { primaryColor as U } from "../../utils/ns-cover.js";
72
+ import { primaryColor as X } from "../../utils/ns-cover.js";
72
73
  import "@vue/reactivity";
73
74
  import "@vue/shared";
74
- import W from "./toc.js";
75
- import { useCopyCode as X } from "./use/useCopyCode.js";
76
- import { useActiveHeaderLinks as Z } from "./use/useActiveHeaderLinks.js";
77
- import { COMP_TYPE as tt } from "./utils.js";
78
- const ot = { class: "info-container" }, et = {
75
+ import Z from "./toc.js";
76
+ import { useCopyCode as tt } from "./use/useCopyCode.js";
77
+ import { useActiveHeaderLinks as ot } from "./use/useActiveHeaderLinks.js";
78
+ import { COMP_TYPE as et } from "./utils.js";
79
+ const it = { class: "info-container" }, rt = {
79
80
  key: 0,
80
81
  class: "flex align-center"
81
- }, rt = { class: "infos" }, it = {
82
+ }, mt = { class: "infos" }, pt = {
82
83
  class: "reading",
83
84
  title: "阅读量"
84
- }, mt = ["data-path"], e = (
85
+ }, st = ["data-path"], m = (
85
86
  /* hoist-static*/
86
- Q("md-container")
87
- ), pt = T({
88
- name: e.b()
87
+ W("md-container")
88
+ ), nt = T({
89
+ name: m.b()
89
90
  }), Io = /* @__PURE__ */ T({
90
- ...pt,
91
- setup(nt, { expose: k }) {
92
- const V = S(), { initPhotoSwipe: w } = J(`.${e.e("content")} img`);
93
- w(), Z({}), X();
94
- const m = g(), r = Y();
95
- b(() => {
91
+ ...nt,
92
+ setup(at, { expose: V }) {
93
+ const w = A(), { initPhotoSwipe: D } = O(`.${m.e("content")} img`);
94
+ D(), ot({}), tt();
95
+ const n = v(), p = G();
96
+ P(() => {
96
97
  B(() => {
97
- m.value = V.exposed.infos, setTimeout(() => {
98
- F(r.hash.replace("#", ""));
98
+ n.value = w.exposed.infos, setTimeout(() => {
99
+ $(p.hash.replace("#", ""));
99
100
  });
101
+ const i = document.querySelectorAll(".item.expand"), r = document.querySelectorAll("div.language-vue");
102
+ for (let o = 0; o < i.length; o++)
103
+ Y(i[o], "click", () => {
104
+ r[o].offsetHeight === 0 ? (r[o].style.height = "auto", r[o].style.visibility = "visible") : (r[o].style.height = 0 + "px", r[o].style.visibility = "hidden");
105
+ });
100
106
  });
101
- }), k({
102
- infos: t(m)
107
+ }), V({
108
+ infos: t(n)
103
109
  });
104
- const D = location.pathname, { go: z } = O();
105
- function E(s) {
106
- z("/?tag=" + s);
110
+ const b = location.pathname, { go: E } = J();
111
+ function S(i) {
112
+ E("/?tag=" + i);
107
113
  }
108
- const N = g(U());
109
- return (s, st) => {
110
- var c, l, d, u, f, _;
111
- return i(), a("div", {
112
- class: p(t(e).b())
114
+ const z = v(X());
115
+ return (i, r) => {
116
+ var o, d, u, f, h, g;
117
+ return s(), c("div", {
118
+ class: a(t(m).b())
113
119
  }, [
114
- (c = m.value) != null && c.sideData ? (i(), v(t(W), {
120
+ (o = n.value) != null && o.sideData ? (s(), y(t(Z), {
115
121
  key: 0,
116
- items: m.value.sideData
122
+ items: n.value.sideData
117
123
  }, null, 8, ["items"])) : x("", !0),
118
- o("div", {
119
- class: p(t(e).e("header"))
124
+ e("div", {
125
+ class: a(t(m).e("header"))
120
126
  }, [
121
- o("h1", {
122
- class: p(t(e).e("title"))
123
- }, C((l = t(r).meta) == null ? void 0 : l.title), 3),
124
- o("div", ot, [
125
- (u = (d = t(r).meta) == null ? void 0 : d.category) != null && u.length ? (i(), a("div", et, [
126
- n(t(y), {
127
+ e("h1", {
128
+ class: a(t(m).e("title"))
129
+ }, C((d = t(p).meta) == null ? void 0 : d.title), 3),
130
+ e("div", it, [
131
+ (f = (u = t(p).meta) == null ? void 0 : u.category) != null && f.length ? (s(), c("div", rt, [
132
+ l(t(k), {
127
133
  size: 14,
128
- color: N.value,
134
+ color: z.value,
129
135
  icon: "ico-bx:category",
130
136
  class: "mr-8px"
131
137
  }, null, 8, ["color"]),
132
- (i(!0), a(I, null, M((f = t(r).meta) == null ? void 0 : f.category, (h, P) => (i(), v(t(G), {
138
+ (s(!0), c(H, null, I((h = t(p).meta) == null ? void 0 : h.category, (_, N) => (s(), y(t(Q), {
133
139
  size: "small",
134
140
  class: "mr-5px cursor-pointer",
135
- type: t(H)(t(tt), 1)[0],
136
- key: P,
137
- onClick: (at) => E(h)
141
+ type: t(q)(t(et), 1)[0],
142
+ key: N,
143
+ onClick: (lt) => S(_)
138
144
  }, {
139
- default: R(() => [
140
- $(C(h), 1)
145
+ default: L(() => [
146
+ M(C(_), 1)
141
147
  ]),
142
148
  _: 2
143
149
  }, 1032, ["type", "onClick"]))), 128))
144
150
  ])) : x("", !0),
145
- o("div", rt, [
146
- n(t(q), {
151
+ e("div", mt, [
152
+ l(t(K), {
147
153
  title: "发布时间",
148
154
  icon: "ico-uiw:date",
149
155
  size: 12,
150
156
  class: "mr-10px",
151
157
  distance: 5,
152
- text: t(L)(new Date((_ = t(r).meta) == null ? void 0 : _.date).getTime() - t(j)())
158
+ text: t(F)(new Date((g = t(p).meta) == null ? void 0 : g.date).getTime() - t(j)())
153
159
  }, null, 8, ["text"]),
154
- o("div", it, [
155
- n(t(y), {
160
+ e("div", pt, [
161
+ l(t(k), {
156
162
  icon: "ico-flat-color-icons:reading",
157
163
  size: 14,
158
164
  class: "mr-5px"
159
165
  }),
160
- o("div", {
166
+ e("div", {
161
167
  class: "waline-pageview-count lh-1",
162
- "data-path": t(D)
163
- }, "0", 8, mt)
168
+ "data-path": t(b)
169
+ }, "0", 8, st)
164
170
  ])
165
171
  ])
166
172
  ])
167
173
  ], 2),
168
- o("div", {
169
- class: p(t(e).e("content"))
174
+ e("div", {
175
+ class: a(t(m).e("content"))
170
176
  }, [
171
- A(s.$slots, "default")
177
+ R(i.$slots, "default")
172
178
  ], 2),
173
- n(t(K))
179
+ l(t(U))
174
180
  ], 2);
175
181
  };
176
182
  }
@@ -8,9 +8,9 @@ function u() {
8
8
  const n = t.parentElement, s = t.nextElementSibling;
9
9
  if (!n || !s)
10
10
  return;
11
- const l = /language-(shellscript|shell|bash|sh|zsh)/.test(n.classList.toString());
12
- let { innerText: i = "" } = s;
13
- l && (i = i.replace(/^ *(\$|>) /gm, "")), r(i).then(() => {
11
+ const i = /language-(shellscript|shell|bash|sh|zsh)/.test(n.classList.toString());
12
+ let l = s.textContent;
13
+ i && (l = l.replace(/^ *(\$|>) /gm, "")), r(l).then(() => {
14
14
  t.classList.add("copied"), clearTimeout(o.get(t));
15
15
  const c = setTimeout(() => {
16
16
  t.classList.remove("copied"), t.blur(), o.delete(t);
@@ -21,10 +21,11 @@ import "../collapse-transition/index.js";
21
21
  import { VftTooltip as R } from "../tooltip/index.js";
22
22
  import "../popover/index.js";
23
23
  import "./index.js";
24
- import "@vft/use";
24
+ import "../context-menu/context-menu.vue2.js";
25
25
  import "../multiple-tabs/multiple-tabs.vue2.js";
26
26
  import "@vft/router";
27
27
  import "@vft/store";
28
+ import "@vft/use";
28
29
  import "vue-router";
29
30
  import "../header-layout/index.js";
30
31
  import "../footer-layout/index.js";
@@ -78,7 +79,7 @@ const W = ["title"], k = (
78
79
  v("menu-item")
79
80
  ), X = S({
80
81
  name: k.b()
81
- }), he = /* @__PURE__ */ S({
82
+ }), xe = /* @__PURE__ */ S({
82
83
  ...X,
83
84
  props: {
84
85
  index: null,
@@ -163,5 +164,5 @@ const W = ["title"], k = (
163
164
  }
164
165
  });
165
166
  export {
166
- he as default
167
+ xe as default
167
168
  };
@@ -11,10 +11,11 @@ import { VftTooltip as pe } from "../tooltip/index.js";
11
11
  import "../popover/index.js";
12
12
  import "./index.js";
13
13
  import { singleAttrToObj as se, renderTNode as me } from "@vft/utils";
14
- import "@vft/use";
14
+ import "../context-menu/context-menu.vue2.js";
15
15
  import "../multiple-tabs/multiple-tabs.vue2.js";
16
16
  import "@vft/router";
17
17
  import "@vft/store";
18
+ import "@vft/use";
18
19
  import "vue-router";
19
20
  import "../header-layout/index.js";
20
21
  import "../footer-layout/index.js";
@@ -79,7 +80,7 @@ const S = (
79
80
  I("sub-menu")
80
81
  ), ve = Z({
81
82
  name: S.b()
82
- }), No = /* @__PURE__ */ Z({
83
+ }), Ro = /* @__PURE__ */ Z({
83
84
  ...ve,
84
85
  props: {
85
86
  index: null,
@@ -280,5 +281,5 @@ const S = (
280
281
  }
281
282
  });
282
283
  export {
283
- No as default
284
+ Ro as default
284
285
  };
@@ -1,11 +1,11 @@
1
- import { defineComponent as P, ref as h, computed as b, watchEffect as E, unref as r, openBlock as x, createElementBlock as R, normalizeClass as H, normalizeStyle as K, createVNode as C, withCtx as S, Fragment as F, renderList as U, createBlock as $ } from "vue";
1
+ import { defineComponent as P, ref as b, computed as h, watchEffect as E, unref as r, openBlock as x, createElementBlock as R, normalizeClass as H, normalizeStyle as K, createVNode as S, withCtx as _, Fragment as F, renderList as U, createBlock as $ } from "vue";
2
2
  import { useRouterHelper as j, getRouterKeyPath as c, listenerRouteChange as q } from "@vft/router";
3
3
  import { useMultipleTabStore as G, useTabs as J } from "@vft/store";
4
4
  import { useRefs as L } from "@vft/use";
5
5
  import "@vft/utils";
6
6
  import "lodash";
7
7
  import "@vueuse/core";
8
- import { generateCssVars as _ } from "../../utils/ns-cover.js";
8
+ import { generateCssVars as C } from "../../utils/ns-cover.js";
9
9
  import O from "hotkeys-js";
10
10
  import { useRouter as Q, onBeforeRouteLeave as W } from "vue-router";
11
11
  import { useNamespace as X } from "../../hooks/use-namespace/index.js";
@@ -24,6 +24,7 @@ import "../collapse-transition/index.js";
24
24
  import "../tooltip/index.js";
25
25
  import "../popover/index.js";
26
26
  import "../menu/index.js";
27
+ import "../context-menu/context-menu.vue2.js";
27
28
  import { initAffixTabs as tt, useTabsDrag as et } from "./use/use-multiple-tabs.js";
28
29
  import "../header-layout/index.js";
29
30
  import "../footer-layout/index.js";
@@ -78,7 +79,7 @@ const M = (
78
79
  X("multiple-tabs")
79
80
  ), rt = P({
80
81
  name: M.b()
81
- }), _e = /* @__PURE__ */ P({
82
+ }), Pe = /* @__PURE__ */ P({
82
83
  ...rt,
83
84
  props: {
84
85
  tabsStyle: null,
@@ -88,7 +89,7 @@ const M = (
88
89
  setup(f) {
89
90
  const i = tt();
90
91
  f.canDrag && et(i);
91
- const u = G(), n = h(""), a = h(0), d = h(), v = Q(), { go: g } = j(), s = b(() => u.getTabList.filter((t) => {
92
+ const u = G(), n = b(""), a = b(0), d = b(), v = Q(), { go: g } = j(), s = h(() => u.getTabList.filter((t) => {
92
93
  var e;
93
94
  return !((e = t.meta) != null && e.hideTab);
94
95
  }));
@@ -101,52 +102,51 @@ const M = (
101
102
  }), W(() => {
102
103
  d.value = r(v.currentRoute);
103
104
  }), q((t) => {
104
- var y;
105
- if (!t || (y = t.meta) != null && y.hasTokenToRoot)
105
+ var T;
106
+ if (!t || (T = t.meta) != null && T.hasTokenToRoot)
106
107
  return;
107
- const { meta: e = {} } = t, { currentActivePath: o, hideTab: m } = e, l = m ? o : null, p = c(t);
108
- if (n.value !== p && (n.value = p), l) {
109
- let T = v.getRoutes().find((D) => D.path === o);
110
- T && u.addTab(T, r(d), a.value, t);
108
+ const { meta: e = {} } = t, { currentActivePath: o, hideTab: m } = e, p = m ? o : null, l = c(t);
109
+ if (n.value !== l && (n.value = l), p) {
110
+ let y = v.getRoutes().find((D) => D.path === o);
111
+ y && u.addTab(y, r(d), a.value, t);
111
112
  } else
112
113
  u.addTab(r(t), r(d), a.value);
113
114
  });
114
115
  function k(t) {
115
- var m, l;
116
+ var m, p;
116
117
  if (n.value === t.paneName)
117
118
  return;
118
119
  const e = s.value[t.attrs.index];
119
120
  n.value = t.paneName;
120
- const o = (l = (m = e == null ? void 0 : e.meta) == null ? void 0 : m.hideActiveRoute) == null ? void 0 : l.fullPath;
121
+ const o = (p = (m = e == null ? void 0 : e.meta) == null ? void 0 : m.hideActiveRoute) == null ? void 0 : p.fullPath;
121
122
  g(o || e.fullPath || e.path);
122
123
  }
123
124
  function B(t) {
124
125
  u.closeTabByKey(t, v);
125
126
  }
126
- const [I, N] = L();
127
- function w(t) {
127
+ const [N, I] = L();
128
+ function V(t) {
128
129
  const e = t.pane.attrs.index, o = t.event;
129
- I.value[e].handleContext(o);
130
+ N.value[e].handleContext(o);
130
131
  }
131
- const V = b(() => ({ ..._({
132
+ const w = h(() => ({ ...C({
132
133
  padding: "4px 0 0",
134
+ "border-bottom": "none",
133
135
  "header-height": "26px",
134
- "item-color": "#5C5C5C",
135
- "item-bg-color": "#f8f8f8",
136
136
  "font-size": "13px",
137
137
  "item-padding": "0 10px",
138
138
  "close-icon-left": "8px",
139
139
  "item-distance": "10px",
140
140
  "item-max-width": "348px",
141
141
  "scroll-padding": "0 20px",
142
- "header-margin": "0 0 0 8px"
142
+ "header-margin": "0 0 0 8px",
143
+ "item-border": "none"
143
144
  }, "tabs"), ...f.tabsStyle })), { closeCurrent: A } = J();
144
145
  O("command+e, ctrl+e", function() {
145
146
  return A(), !1;
146
147
  });
147
- const z = b(() => ({
148
- ..._({
149
- border: "1px solid #dcdfe6",
148
+ const z = h(() => ({
149
+ ...C({
150
150
  "sub-item-height": "40px",
151
151
  "item-min-width": "150px"
152
152
  }, "menu"),
@@ -154,34 +154,32 @@ const M = (
154
154
  }));
155
155
  return (t, e) => (x(), R("div", {
156
156
  class: H(r(M).b()),
157
- style: K(r(V))
157
+ style: K(r(w))
158
158
  }, [
159
- C(r(Y), {
159
+ S(r(Y), {
160
160
  "model-value": n.value,
161
161
  "onUpdate:modelValue": e[0] || (e[0] = (o) => n.value = o),
162
- type: "card",
163
162
  onTabClick: k,
164
163
  onTabRemove: B,
165
- onTabContextMenu: w,
166
- closeIconCfg: { color: "white" }
164
+ onTabContextMenu: V
167
165
  }, {
168
- default: S(() => [
166
+ default: _(() => [
169
167
  (x(!0), R(F, null, U(r(s), (o, m) => {
170
- var l;
168
+ var p;
171
169
  return x(), $(r(Z), {
172
170
  key: r(c)(o) + m,
173
- closable: !((l = o.meta) != null && l.affix),
171
+ closable: !((p = o.meta) != null && p.affix),
174
172
  index: m,
175
173
  name: r(c)(o)
176
174
  }, {
177
- label: S(() => {
178
- var p;
175
+ label: _(() => {
176
+ var l;
179
177
  return [
180
- C(ot, {
178
+ S(ot, {
181
179
  contextMenuStyle: r(z),
182
- affixNum: (p = r(i)) == null ? void 0 : p.length,
180
+ affixNum: (l = r(i)) == null ? void 0 : l.length,
183
181
  ref_for: !0,
184
- ref: r(N)(m),
182
+ ref: r(I)(m),
185
183
  tabItem: o
186
184
  }, null, 8, ["contextMenuStyle", "affixNum", "tabItem"])
187
185
  ];
@@ -196,5 +194,5 @@ const M = (
196
194
  }
197
195
  });
198
196
  export {
199
- _e as default
197
+ Pe as default
200
198
  };
@@ -1,102 +1,36 @@
1
- import { defineComponent as l, computed as u, openBlock as c, createElementBlock as s, unref as r, withModifiers as f, toDisplayString as x } from "vue";
1
+ import { defineComponent as r, computed as c, openBlock as s, createElementBlock as f, unref as m, withModifiers as x, toDisplayString as p } from "vue";
2
2
  import "@vft/utils";
3
+ import "../context-menu/context-menu.vue2.js";
4
+ import { useContextMenu as b } from "../context-menu/useContextMenu.js";
5
+ import { useTabDropdown as d } from "./use/use-tab-dropdown.js";
3
6
  import "@vft/use";
4
- import "../divider/index.js";
5
- import "../icon/index.js";
6
- import "../avatar/index.js";
7
- import "../empty/index.js";
8
- import "../result/index.js";
9
- import "../tabs/index.js";
10
- import "../popper/index.js";
11
- import "../collapse-transition/index.js";
12
- import "../tooltip/index.js";
13
- import "../popover/index.js";
14
- import "../menu/index.js";
15
- import "./multiple-tabs.vue2.js";
16
- import { useTabDropdown as b } from "./use/use-tab-dropdown.js";
17
7
  import "vue-router";
18
8
  import "@vft/store";
19
- import "../header-layout/index.js";
20
- import "../footer-layout/index.js";
21
- import "../iframe-layout/index.js";
22
- import "../router-view-content/index.js";
23
- import "../logo/index.js";
24
- import "../back-top/index.js";
25
- import "../config-provider/index.js";
26
- import "../descriptions/index.js";
27
- import "../full-screen/index.js";
28
- import "../icon-text/index.js";
29
- import "../image/index.js";
30
- import "../input/index.js";
31
- import "../link/index.js";
32
- import "../pagination/index.js";
33
- import "../tag/index.js";
34
- import "../side-menu/index.js";
35
- import "../qrcode/index.js";
36
- import "../overlay/index.js";
37
- import "../clamp/index.js";
38
- import "../clamp-toggle/index.js";
39
- import "../page-wrapper/index.js";
40
- import "../exception/index.js";
41
- import "../search/index.js";
42
- import "../form/index.js";
43
- import "../button/index.js";
44
- import "../checkbox/index.js";
45
- import "../radio/index.js";
46
- import "../switch/index.js";
47
- import "../color-picker/index.js";
48
- import "../scrollbar/index.js";
49
- import "../dropdown/index.js";
50
- import "../virtual-list/components/fixed-size-list.js";
51
- import "../virtual-list/components/dynamic-size-list.js";
52
- import "../virtual-list/components/fixed-size-grid.js";
53
- import "../virtual-list/components/dynamic-size-grid.js";
54
- import "../virtual-list/props.js";
55
- import "../select-v2/index.js";
56
- import "../verify-code/index.js";
57
- import "../table/index.js";
58
- import "../image-viewer/index.js";
59
- import "../md-container/index.js";
60
- import "../md-comment/index.js";
61
- import "../md-tabs/index.js";
62
- import "../md-vue-playground/index.js";
63
- import "../md-code-demo/index.js";
64
- import "../md-code-tabs/index.js";
65
- import "../message/index.js";
66
- import "../config-provider/hooks/use-global-config.js";
67
- import "@popperjs/core";
68
- import "lodash";
69
- import "../../hooks/use-z-index/index.js";
70
- import "@vueuse/core";
71
- import "../../utils/ns-cover.js";
72
- import "@vue/reactivity";
73
- import "@vue/shared";
74
- import { useContextMenu as d } from "../context-menu/useContextMenu.js";
75
- const C = ["title", "onContextmenu"], Ht = /* @__PURE__ */ l({
9
+ const C = ["title", "onContextmenu"], w = /* @__PURE__ */ r({
76
10
  __name: "tab-content",
77
11
  props: {
78
12
  tabItem: null,
79
13
  affixNum: null,
80
14
  contextMenuStyle: null
81
15
  },
82
- setup(t, { expose: p }) {
83
- const [e] = d(), m = u(() => t.tabItem.meta && t.tabItem.meta.title), { getDropMenuList: n, handleContextMenu: a } = b(t.tabItem, t.affixNum);
84
- function i(o) {
85
- a(t.tabItem)(o), e({
86
- event: o,
16
+ setup(t, { expose: i }) {
17
+ const [a] = b(), n = c(() => t.tabItem.meta && t.tabItem.meta.title), { getDropMenuList: l, handleContextMenu: u } = d(t.tabItem, t.affixNum);
18
+ function o(e) {
19
+ u(t.tabItem)(e), a({
20
+ event: e,
87
21
  styles: t.contextMenuStyle,
88
- items: n.value
22
+ items: l.value
89
23
  });
90
24
  }
91
- return p({
92
- handleContext: i
93
- }), (o, M) => (c(), s("span", {
94
- title: r(m),
25
+ return i({
26
+ handleContext: o
27
+ }), (e, M) => (s(), f("span", {
28
+ title: m(n),
95
29
  class: "vft-multiple-tabs__title",
96
- onContextmenu: f(i, ["stop"])
97
- }, x(r(m)), 41, C));
30
+ onContextmenu: x(o, ["stop"])
31
+ }, p(m(n)), 41, C));
98
32
  }
99
33
  });
100
34
  export {
101
- Ht as default
35
+ w as default
102
36
  };
@@ -46,13 +46,13 @@ export declare const usePopperContent: (props: PopperContentProps) => {
46
46
  popperEscapeOffsets: import("@popperjs/core").SideObject;
47
47
  } | undefined;
48
48
  offset?: {
49
+ bottom?: import("@popperjs/core").Offsets | undefined;
50
+ left?: import("@popperjs/core").Offsets | undefined;
51
+ right?: import("@popperjs/core").Offsets | undefined;
52
+ top?: import("@popperjs/core").Offsets | undefined;
49
53
  auto?: import("@popperjs/core").Offsets | undefined;
50
54
  "auto-start"?: import("@popperjs/core").Offsets | undefined;
51
55
  "auto-end"?: import("@popperjs/core").Offsets | undefined;
52
- top?: import("@popperjs/core").Offsets | undefined;
53
- bottom?: import("@popperjs/core").Offsets | undefined;
54
- right?: import("@popperjs/core").Offsets | undefined;
55
- left?: import("@popperjs/core").Offsets | undefined;
56
56
  "top-start"?: import("@popperjs/core").Offsets | undefined;
57
57
  "top-end"?: import("@popperjs/core").Offsets | undefined;
58
58
  "bottom-start"?: import("@popperjs/core").Offsets | undefined;
@@ -4,12 +4,12 @@ import VftPopperContent from './content.vue';
4
4
  export { VftPopperArrow, VftPopperTrigger, VftPopperContent };
5
5
  export declare const VftPopper: import("vft/es/utils").SFCWithInstall<import("vue").DefineComponent<{
6
6
  role: {
7
- type: import("vue").PropType<"dialog" | "grid" | "group" | "listbox" | "menu" | "navigation" | "tooltip" | "tree" | undefined>;
7
+ type: import("vue").PropType<"grid" | "dialog" | "group" | "listbox" | "menu" | "navigation" | "tooltip" | "tree" | undefined>;
8
8
  required: false;
9
9
  };
10
10
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
11
11
  role: {
12
- type: import("vue").PropType<"dialog" | "grid" | "group" | "listbox" | "menu" | "navigation" | "tooltip" | "tree" | undefined>;
12
+ type: import("vue").PropType<"grid" | "dialog" | "group" | "listbox" | "menu" | "navigation" | "tooltip" | "tree" | undefined>;
13
13
  required: false;
14
14
  };
15
15
  }>>, {}>> & Record<string, any>;
@@ -1,12 +1,12 @@
1
1
  import type { PropType as __PropType } from 'vue';
2
2
  declare const _sfc_main: import("vue").DefineComponent<{
3
3
  role: {
4
- type: __PropType<"dialog" | "grid" | "group" | "listbox" | "menu" | "navigation" | "tooltip" | "tree" | undefined>;
4
+ type: __PropType<"grid" | "dialog" | "group" | "listbox" | "menu" | "navigation" | "tooltip" | "tree" | undefined>;
5
5
  required: false;
6
6
  };
7
7
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
8
8
  role: {
9
- type: __PropType<"dialog" | "grid" | "group" | "listbox" | "menu" | "navigation" | "tooltip" | "tree" | undefined>;
9
+ type: __PropType<"grid" | "dialog" | "group" | "listbox" | "menu" | "navigation" | "tooltip" | "tree" | undefined>;
10
10
  required: false;
11
11
  };
12
12
  }>>, {}>;