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.
- package/attributes.json +1 -0
- package/dist/index.css +1 -1
- package/es/component.js +0 -2
- package/es/components/avatar/avatar.vue.d.ts +2 -2
- package/es/components/avatar/avatar.vue2.js +19 -24
- package/es/components/avatar/index.d.ts +2 -2
- package/es/components/back-top/back-top.vue2.js +4 -3
- package/es/components/context-menu/context-menu.vue2.js +46 -41
- package/es/components/divider/divider.vue.d.ts +2 -2
- package/es/components/divider/index.d.ts +2 -2
- package/es/components/dropdown/dropdown-item-impl.vue.d.ts +1 -1
- package/es/components/dropdown/dropdown-menu.vue.d.ts +1 -1
- package/es/components/dropdown/dropdown.vue.d.ts +3 -3
- package/es/components/dropdown/index.d.ts +5 -5
- package/es/components/empty/empty.vue.d.ts +2 -2
- package/es/components/empty/index.d.ts +2 -2
- package/es/components/form/form.vue.d.ts +4 -4
- package/es/components/form/index.d.ts +4 -4
- package/es/components/icon-text/icon-text.vue2.js +31 -24
- package/es/components/md-container/md-container.vue2.js +74 -68
- package/es/components/md-container/use/useCopyCode.js +3 -3
- package/es/components/menu/menu-item.vue2.js +4 -3
- package/es/components/menu/sub-menu.vue2.js +4 -3
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +34 -36
- package/es/components/multiple-tabs/tab-content.vue2.js +18 -84
- package/es/components/popper/composables/use-content.d.ts +4 -4
- package/es/components/popper/index.d.ts +2 -2
- package/es/components/popper/popper.vue.d.ts +2 -2
- package/es/components/result/result.vue2.js +4 -3
- package/es/components/search/search.vue2.js +4 -3
- package/es/components/select-v2/index.d.ts +12 -12
- package/es/components/select-v2/select.vue.d.ts +6 -6
- package/es/components/select-v2/useSelect.d.ts +3 -3
- package/es/components/side-menu/side-menu.vue2.js +3 -2
- package/es/components/tabs/index.d.ts +10 -10
- package/es/components/tabs/tab-nav.vue.d.ts +6 -7
- package/es/components/tabs/tab-nav.vue2.js +42 -38
- package/es/components/tabs/tabs.vue.d.ts +11 -11
- package/es/components/tabs/tabs.vue2.js +43 -48
- package/es/components/tooltip/index.d.ts +2 -2
- package/es/components/tooltip/tooltip.vue.d.ts +2 -2
- package/es/components/virtual-list/builders/build-grid.d.ts +1 -1
- package/es/components/virtual-list/builders/build-list.d.ts +1 -1
- package/es/components/virtual-list/components/dynamic-size-grid.d.ts +1 -1
- package/es/components/virtual-list/components/dynamic-size-list.d.ts +1 -1
- package/es/components/virtual-list/components/fixed-size-grid.d.ts +1 -1
- package/es/components/virtual-list/components/fixed-size-list.d.ts +1 -1
- package/es/hooks/use-popper/index.d.ts +4 -4
- package/es/package.json.js +1 -1
- package/global.d.ts +28 -3
- package/lib/components/avatar/avatar.vue.d.ts +2 -2
- package/lib/components/avatar/avatar.vue2.cjs +1 -1
- package/lib/components/avatar/index.d.ts +2 -2
- package/lib/components/back-top/back-top.vue2.cjs +1 -1
- package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
- package/lib/components/divider/divider.vue.d.ts +2 -2
- package/lib/components/divider/index.d.ts +2 -2
- package/lib/components/dropdown/dropdown-item-impl.vue.d.ts +1 -1
- package/lib/components/dropdown/dropdown-menu.vue.d.ts +1 -1
- package/lib/components/dropdown/dropdown.vue.d.ts +3 -3
- package/lib/components/dropdown/index.d.ts +5 -5
- package/lib/components/empty/empty.vue.d.ts +2 -2
- package/lib/components/empty/index.d.ts +2 -2
- package/lib/components/form/form.vue.d.ts +4 -4
- package/lib/components/form/index.d.ts +4 -4
- package/lib/components/icon-text/icon-text.vue2.cjs +1 -1
- package/lib/components/md-container/md-container.vue2.cjs +1 -1
- package/lib/components/md-container/use/useCopyCode.cjs +1 -1
- package/lib/components/menu/menu-item.vue2.cjs +1 -1
- package/lib/components/menu/sub-menu.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/tab-content.vue2.cjs +1 -1
- package/lib/components/popper/composables/use-content.d.ts +4 -4
- package/lib/components/popper/index.d.ts +2 -2
- package/lib/components/popper/popper.vue.d.ts +2 -2
- package/lib/components/result/result.vue2.cjs +1 -1
- package/lib/components/search/search.vue2.cjs +1 -1
- package/lib/components/select-v2/index.d.ts +12 -12
- package/lib/components/select-v2/select.vue.d.ts +6 -6
- package/lib/components/select-v2/useSelect.d.ts +3 -3
- package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
- package/lib/components/tabs/index.d.ts +10 -10
- package/lib/components/tabs/tab-nav.vue.d.ts +6 -7
- package/lib/components/tabs/tab-nav.vue2.cjs +1 -1
- package/lib/components/tabs/tabs.vue.d.ts +11 -11
- package/lib/components/tabs/tabs.vue2.cjs +1 -1
- package/lib/components/tooltip/index.d.ts +2 -2
- package/lib/components/tooltip/tooltip.vue.d.ts +2 -2
- package/lib/components/virtual-list/builders/build-grid.d.ts +1 -1
- package/lib/components/virtual-list/builders/build-list.d.ts +1 -1
- package/lib/components/virtual-list/components/dynamic-size-grid.d.ts +1 -1
- package/lib/components/virtual-list/components/dynamic-size-list.d.ts +1 -1
- package/lib/components/virtual-list/components/fixed-size-grid.d.ts +1 -1
- package/lib/components/virtual-list/components/fixed-size-list.d.ts +1 -1
- package/lib/hooks/use-popper/index.d.ts +4 -4
- package/lib/package.json.cjs +1 -1
- package/package.json +6 -1
- package/tags.json +1 -0
- package/theme-style/dark/css-vars.css +1 -1
- package/theme-style/index.css +1 -1
- package/theme-style/src/button.scss +1 -2
- package/theme-style/src/common/var.scss +19 -20
- package/theme-style/src/context-menu.scss +12 -0
- package/theme-style/src/dark/css-vars.scss +26 -0
- package/theme-style/src/dark/var.scss +61 -17
- package/theme-style/src/icon-text.scss +2 -0
- package/theme-style/src/logo.scss +1 -1
- package/theme-style/src/md/table.scss +5 -0
- package/theme-style/src/md-container.scss +42 -2
- package/theme-style/src/menu.scss +3 -3
- package/theme-style/src/side-menu.scss +2 -2
- package/theme-style/src/tabs.scss +70 -70
- package/theme-style/vft-button.css +1 -1
- package/theme-style/vft-context-menu.css +1 -0
- package/theme-style/vft-footer-layout.css +1 -1
- package/theme-style/vft-header-layout.css +1 -1
- package/theme-style/vft-icon-text.css +1 -1
- package/theme-style/vft-logo.css +1 -1
- package/theme-style/vft-md-container.css +1 -1
- package/theme-style/vft-menu.css +1 -1
- package/theme-style/vft-multiple-tabs.css +1 -1
- package/theme-style/vft-side-menu.css +1 -1
- package/theme-style/vft-tabs.css +1 -1
- package/web-types.json +1 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as T, getCurrentInstance as
|
|
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
|
|
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
|
|
14
|
-
import
|
|
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
|
|
16
|
+
import { useRouterHelper as J } from "@vft/router";
|
|
17
17
|
import "@vft/store";
|
|
18
|
-
import {
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
72
|
+
import { primaryColor as X } from "../../utils/ns-cover.js";
|
|
72
73
|
import "@vue/reactivity";
|
|
73
74
|
import "@vue/shared";
|
|
74
|
-
import
|
|
75
|
-
import { useCopyCode as
|
|
76
|
-
import { useActiveHeaderLinks as
|
|
77
|
-
import { COMP_TYPE as
|
|
78
|
-
const
|
|
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
|
-
},
|
|
82
|
+
}, mt = { class: "infos" }, pt = {
|
|
82
83
|
class: "reading",
|
|
83
84
|
title: "阅读量"
|
|
84
|
-
},
|
|
85
|
+
}, st = ["data-path"], m = (
|
|
85
86
|
/* hoist-static*/
|
|
86
|
-
|
|
87
|
-
),
|
|
88
|
-
name:
|
|
87
|
+
W("md-container")
|
|
88
|
+
), nt = T({
|
|
89
|
+
name: m.b()
|
|
89
90
|
}), Io = /* @__PURE__ */ T({
|
|
90
|
-
...
|
|
91
|
-
setup(
|
|
92
|
-
const
|
|
93
|
-
|
|
94
|
-
const
|
|
95
|
-
|
|
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
|
-
|
|
98
|
-
|
|
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
|
-
}),
|
|
102
|
-
infos: t(
|
|
107
|
+
}), V({
|
|
108
|
+
infos: t(n)
|
|
103
109
|
});
|
|
104
|
-
const
|
|
105
|
-
function
|
|
106
|
-
|
|
110
|
+
const b = location.pathname, { go: E } = J();
|
|
111
|
+
function S(i) {
|
|
112
|
+
E("/?tag=" + i);
|
|
107
113
|
}
|
|
108
|
-
const
|
|
109
|
-
return (
|
|
110
|
-
var
|
|
111
|
-
return
|
|
112
|
-
class:
|
|
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
|
-
(
|
|
120
|
+
(o = n.value) != null && o.sideData ? (s(), y(t(Z), {
|
|
115
121
|
key: 0,
|
|
116
|
-
items:
|
|
122
|
+
items: n.value.sideData
|
|
117
123
|
}, null, 8, ["items"])) : x("", !0),
|
|
118
|
-
|
|
119
|
-
class:
|
|
124
|
+
e("div", {
|
|
125
|
+
class: a(t(m).e("header"))
|
|
120
126
|
}, [
|
|
121
|
-
|
|
122
|
-
class:
|
|
123
|
-
}, C((
|
|
124
|
-
|
|
125
|
-
(
|
|
126
|
-
|
|
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:
|
|
134
|
+
color: z.value,
|
|
129
135
|
icon: "ico-bx:category",
|
|
130
136
|
class: "mr-8px"
|
|
131
137
|
}, null, 8, ["color"]),
|
|
132
|
-
(
|
|
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(
|
|
136
|
-
key:
|
|
137
|
-
onClick: (
|
|
141
|
+
type: t(q)(t(et), 1)[0],
|
|
142
|
+
key: N,
|
|
143
|
+
onClick: (lt) => S(_)
|
|
138
144
|
}, {
|
|
139
|
-
default:
|
|
140
|
-
|
|
145
|
+
default: L(() => [
|
|
146
|
+
M(C(_), 1)
|
|
141
147
|
]),
|
|
142
148
|
_: 2
|
|
143
149
|
}, 1032, ["type", "onClick"]))), 128))
|
|
144
150
|
])) : x("", !0),
|
|
145
|
-
|
|
146
|
-
|
|
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(
|
|
158
|
+
text: t(F)(new Date((g = t(p).meta) == null ? void 0 : g.date).getTime() - t(j)())
|
|
153
159
|
}, null, 8, ["text"]),
|
|
154
|
-
|
|
155
|
-
|
|
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
|
-
|
|
166
|
+
e("div", {
|
|
161
167
|
class: "waline-pageview-count lh-1",
|
|
162
|
-
"data-path": t(
|
|
163
|
-
}, "0", 8,
|
|
168
|
+
"data-path": t(b)
|
|
169
|
+
}, "0", 8, st)
|
|
164
170
|
])
|
|
165
171
|
])
|
|
166
172
|
])
|
|
167
173
|
], 2),
|
|
168
|
-
|
|
169
|
-
class:
|
|
174
|
+
e("div", {
|
|
175
|
+
class: a(t(m).e("content"))
|
|
170
176
|
}, [
|
|
171
|
-
|
|
177
|
+
R(i.$slots, "default")
|
|
172
178
|
], 2),
|
|
173
|
-
|
|
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
|
|
12
|
-
let
|
|
13
|
-
|
|
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 "
|
|
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
|
-
}),
|
|
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
|
-
|
|
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 "
|
|
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
|
-
}),
|
|
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
|
-
|
|
284
|
+
Ro as default
|
|
284
285
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as P, ref as
|
|
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
|
|
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
|
-
}),
|
|
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 =
|
|
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
|
|
105
|
-
if (!t || (
|
|
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,
|
|
108
|
-
if (n.value !==
|
|
109
|
-
let
|
|
110
|
-
|
|
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,
|
|
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 = (
|
|
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 [
|
|
127
|
-
function
|
|
127
|
+
const [N, I] = L();
|
|
128
|
+
function V(t) {
|
|
128
129
|
const e = t.pane.attrs.index, o = t.event;
|
|
129
|
-
|
|
130
|
+
N.value[e].handleContext(o);
|
|
130
131
|
}
|
|
131
|
-
const
|
|
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 =
|
|
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(
|
|
157
|
+
style: K(r(w))
|
|
158
158
|
}, [
|
|
159
|
-
|
|
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:
|
|
166
|
-
closeIconCfg: { color: "white" }
|
|
164
|
+
onTabContextMenu: V
|
|
167
165
|
}, {
|
|
168
|
-
default:
|
|
166
|
+
default: _(() => [
|
|
169
167
|
(x(!0), R(F, null, U(r(s), (o, m) => {
|
|
170
|
-
var
|
|
168
|
+
var p;
|
|
171
169
|
return x(), $(r(Z), {
|
|
172
170
|
key: r(c)(o) + m,
|
|
173
|
-
closable: !((
|
|
171
|
+
closable: !((p = o.meta) != null && p.affix),
|
|
174
172
|
index: m,
|
|
175
173
|
name: r(c)(o)
|
|
176
174
|
}, {
|
|
177
|
-
label:
|
|
178
|
-
var
|
|
175
|
+
label: _(() => {
|
|
176
|
+
var l;
|
|
179
177
|
return [
|
|
180
|
-
|
|
178
|
+
S(ot, {
|
|
181
179
|
contextMenuStyle: r(z),
|
|
182
|
-
affixNum: (
|
|
180
|
+
affixNum: (l = r(i)) == null ? void 0 : l.length,
|
|
183
181
|
ref_for: !0,
|
|
184
|
-
ref: r(
|
|
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
|
-
|
|
197
|
+
Pe as default
|
|
200
198
|
};
|
|
@@ -1,102 +1,36 @@
|
|
|
1
|
-
import { defineComponent as
|
|
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
|
-
|
|
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:
|
|
83
|
-
const [
|
|
84
|
-
function
|
|
85
|
-
|
|
86
|
-
event:
|
|
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:
|
|
22
|
+
items: l.value
|
|
89
23
|
});
|
|
90
24
|
}
|
|
91
|
-
return
|
|
92
|
-
handleContext:
|
|
93
|
-
}), (
|
|
94
|
-
title:
|
|
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:
|
|
97
|
-
},
|
|
30
|
+
onContextmenu: x(o, ["stop"])
|
|
31
|
+
}, p(m(n)), 41, C));
|
|
98
32
|
}
|
|
99
33
|
});
|
|
100
34
|
export {
|
|
101
|
-
|
|
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<"
|
|
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<"
|
|
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<"
|
|
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<"
|
|
9
|
+
type: __PropType<"grid" | "dialog" | "group" | "listbox" | "menu" | "navigation" | "tooltip" | "tree" | undefined>;
|
|
10
10
|
required: false;
|
|
11
11
|
};
|
|
12
12
|
}>>, {}>;
|