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
package/es/component.js
CHANGED
|
@@ -52,14 +52,12 @@ import { VftMdCodeDemo as ao } from "./components/md-code-demo/index.js";
|
|
|
52
52
|
import { VftMdCodeTabs as no } from "./components/md-code-tabs/index.js";
|
|
53
53
|
import { VftMdContainer as uo } from "./components/md-container/index.js";
|
|
54
54
|
const dt = [
|
|
55
|
-
// md
|
|
56
55
|
uo,
|
|
57
56
|
no,
|
|
58
57
|
ao,
|
|
59
58
|
eo,
|
|
60
59
|
Vo,
|
|
61
60
|
po,
|
|
62
|
-
// md
|
|
63
61
|
io,
|
|
64
62
|
mo,
|
|
65
63
|
fo,
|
|
@@ -22,7 +22,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
22
22
|
required: false;
|
|
23
23
|
};
|
|
24
24
|
fit: {
|
|
25
|
-
type: __PropType<"
|
|
25
|
+
type: __PropType<"contain" | "fill" | "none" | "cover" | "scale-down" | undefined>;
|
|
26
26
|
required: false;
|
|
27
27
|
};
|
|
28
28
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "error"[], "error", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -47,7 +47,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
47
47
|
required: false;
|
|
48
48
|
};
|
|
49
49
|
fit: {
|
|
50
|
-
type: __PropType<"
|
|
50
|
+
type: __PropType<"contain" | "fill" | "none" | "cover" | "scale-down" | undefined>;
|
|
51
51
|
required: false;
|
|
52
52
|
};
|
|
53
53
|
}>> & {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as z, ref as h, computed as o, watch as v, openBlock as
|
|
2
|
-
import { isString as
|
|
3
|
-
import { VftIcon as
|
|
4
|
-
import { VftImage as
|
|
5
|
-
import { useNamespace as
|
|
1
|
+
import { defineComponent as z, ref as h, computed as o, watch as v, openBlock as s, createElementBlock as k, normalizeClass as y, unref as r, normalizeStyle as g, createBlock as c, normalizeProps as B, mergeProps as E, renderSlot as S } from "vue";
|
|
2
|
+
import { isString as b, isNumber as C, addUnit as V, singleAttrToObj as I } from "@vft/utils";
|
|
3
|
+
import { VftIcon as L } from "../icon/index.js";
|
|
4
|
+
import { VftImage as N } from "../image/index.js";
|
|
5
|
+
import { useNamespace as P } from "../../hooks/use-namespace/index.js";
|
|
6
6
|
import "@popperjs/core";
|
|
7
7
|
import "lodash";
|
|
8
8
|
import "../../hooks/use-z-index/index.js";
|
|
@@ -10,7 +10,7 @@ import "@vueuse/core";
|
|
|
10
10
|
import "../../utils/ns-cover.js";
|
|
11
11
|
import "@vue/reactivity";
|
|
12
12
|
import "@vue/shared";
|
|
13
|
-
const
|
|
13
|
+
const H = /* @__PURE__ */ z({
|
|
14
14
|
__name: "avatar",
|
|
15
15
|
props: {
|
|
16
16
|
size: { default: "" },
|
|
@@ -22,41 +22,36 @@ const J = /* @__PURE__ */ z({
|
|
|
22
22
|
},
|
|
23
23
|
emits: ["error"],
|
|
24
24
|
setup(e, { emit: m }) {
|
|
25
|
-
|
|
26
|
-
const i = N("avatar"), a = h(!1), f = o(() => {
|
|
25
|
+
const i = P("avatar"), a = h(!1), u = o(() => {
|
|
27
26
|
const t = [i.b()];
|
|
28
|
-
return
|
|
29
|
-
}),
|
|
27
|
+
return b(e.size) && t.push(i.m(e.size)), !e.src && e.icon && t.push(i.m("icon")), e.shape && t.push(i.m(e.shape)), t;
|
|
28
|
+
}), f = o(() => C(e.size) ? i.cssVarBlock({
|
|
30
29
|
size: V(e.size) || ""
|
|
31
|
-
}) : void 0);
|
|
32
|
-
o(() => ({
|
|
33
|
-
objectFit: e.fit
|
|
34
|
-
}));
|
|
35
|
-
const n = o(() => j(e.icon, "icon", { size: e.size }));
|
|
30
|
+
}) : void 0), n = o(() => I(e.icon, "icon", { size: e.size }));
|
|
36
31
|
v(
|
|
37
32
|
() => e.src,
|
|
38
33
|
() => a.value = !1
|
|
39
34
|
);
|
|
40
35
|
function d(t) {
|
|
41
|
-
|
|
36
|
+
a.value = !0, m("error", t);
|
|
42
37
|
}
|
|
43
|
-
return (t,
|
|
44
|
-
var
|
|
45
|
-
return
|
|
46
|
-
class:
|
|
47
|
-
style:
|
|
38
|
+
return (t, j) => {
|
|
39
|
+
var l;
|
|
40
|
+
return s(), k("span", {
|
|
41
|
+
class: y(r(u)),
|
|
42
|
+
style: g(r(f))
|
|
48
43
|
}, [
|
|
49
|
-
e.src && !a.value ? (
|
|
44
|
+
e.src && !a.value ? (s(), c(r(N), {
|
|
50
45
|
key: 0,
|
|
51
46
|
src: e.src,
|
|
52
47
|
alt: e.alt,
|
|
53
48
|
fit: e.fit,
|
|
54
49
|
onError: d
|
|
55
|
-
}, null, 8, ["src", "alt", "fit"])) : (
|
|
50
|
+
}, null, 8, ["src", "alt", "fit"])) : (l = r(n)) != null && l.icon ? (s(), c(r(L), B(E({ key: 1 }, r(n))), null, 16)) : S(t.$slots, "default", { key: 2 })
|
|
56
51
|
], 6);
|
|
57
52
|
};
|
|
58
53
|
}
|
|
59
54
|
});
|
|
60
55
|
export {
|
|
61
|
-
|
|
56
|
+
H as default
|
|
62
57
|
};
|
|
@@ -20,7 +20,7 @@ export declare const VftAvatar: import("vft/es/utils").SFCWithInstall<import("vu
|
|
|
20
20
|
required: false;
|
|
21
21
|
};
|
|
22
22
|
fit: {
|
|
23
|
-
type: import("vue").PropType<"
|
|
23
|
+
type: import("vue").PropType<"contain" | "fill" | "none" | "cover" | "scale-down" | undefined>;
|
|
24
24
|
required: false;
|
|
25
25
|
};
|
|
26
26
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "error"[], "error", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -45,7 +45,7 @@ export declare const VftAvatar: import("vft/es/utils").SFCWithInstall<import("vu
|
|
|
45
45
|
required: false;
|
|
46
46
|
};
|
|
47
47
|
fit: {
|
|
48
|
-
type: import("vue").PropType<"
|
|
48
|
+
type: import("vue").PropType<"contain" | "fill" | "none" | "cover" | "scale-down" | undefined>;
|
|
49
49
|
required: false;
|
|
50
50
|
};
|
|
51
51
|
}>> & {
|
|
@@ -11,10 +11,11 @@ import "../collapse-transition/index.js";
|
|
|
11
11
|
import "../tooltip/index.js";
|
|
12
12
|
import "../popover/index.js";
|
|
13
13
|
import "../menu/index.js";
|
|
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";
|
|
@@ -77,7 +78,7 @@ const r = (
|
|
|
77
78
|
_("back-top")
|
|
78
79
|
), N = c({
|
|
79
80
|
name: r.b()
|
|
80
|
-
}),
|
|
81
|
+
}), Zt = /* @__PURE__ */ c({
|
|
81
82
|
...N,
|
|
82
83
|
props: {
|
|
83
84
|
visibilityHeight: { default: 200 },
|
|
@@ -120,5 +121,5 @@ const r = (
|
|
|
120
121
|
}
|
|
121
122
|
});
|
|
122
123
|
export {
|
|
123
|
-
|
|
124
|
+
Zt as default
|
|
124
125
|
};
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as f, ref as u, computed as k, openBlock as l, createBlock as d, Transition as b, withCtx as C, withDirectives as g, createElementVNode as a, normalizeStyle as z, unref as p, withModifiers as M, normalizeClass as $, createElementBlock as B, Fragment as E, renderList as S, vShow as A } from "vue";
|
|
2
|
+
import { useNamespace as F } from "../../hooks/use-namespace/index.js";
|
|
3
|
+
import "@popperjs/core";
|
|
4
|
+
import "lodash";
|
|
5
|
+
import "../../hooks/use-z-index/index.js";
|
|
6
|
+
import "@vueuse/core";
|
|
7
|
+
import "@vft/utils";
|
|
8
|
+
import "../../utils/ns-cover.js";
|
|
9
|
+
import "@vue/reactivity";
|
|
10
|
+
import "@vue/shared";
|
|
11
|
+
import { useTimeoutFn as H, useClickAway as I, useEventListener as c } from "@vft/use";
|
|
3
12
|
import "../divider/index.js";
|
|
4
13
|
import "../icon/index.js";
|
|
5
14
|
import "../avatar/index.js";
|
|
@@ -10,8 +19,7 @@ import "../popper/index.js";
|
|
|
10
19
|
import "../collapse-transition/index.js";
|
|
11
20
|
import "../tooltip/index.js";
|
|
12
21
|
import "../popover/index.js";
|
|
13
|
-
import { VftMenuItem as
|
|
14
|
-
import "@vft/utils";
|
|
22
|
+
import { VftMenuItem as L } from "../menu/index.js";
|
|
15
23
|
import "../multiple-tabs/multiple-tabs.vue2.js";
|
|
16
24
|
import "@vft/router";
|
|
17
25
|
import "@vft/store";
|
|
@@ -63,16 +71,13 @@ import "../md-vue-playground/index.js";
|
|
|
63
71
|
import "../md-code-demo/index.js";
|
|
64
72
|
import "../md-code-tabs/index.js";
|
|
65
73
|
import "../message/index.js";
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
import "@vue/shared";
|
|
74
|
-
const H = { class: "vft-sub-menu" }, Zt = /* @__PURE__ */ w({
|
|
75
|
-
__name: "context-menu",
|
|
74
|
+
const N = { class: "vft-sub-menu" }, x = (
|
|
75
|
+
/* hoist-static*/
|
|
76
|
+
F("context-menu")
|
|
77
|
+
), R = f({
|
|
78
|
+
name: x.b()
|
|
79
|
+
}), io = /* @__PURE__ */ f({
|
|
80
|
+
...R,
|
|
76
81
|
props: {
|
|
77
82
|
axis: null,
|
|
78
83
|
styles: null,
|
|
@@ -81,63 +86,63 @@ const H = { class: "vft-sub-menu" }, Zt = /* @__PURE__ */ w({
|
|
|
81
86
|
},
|
|
82
87
|
setup(r) {
|
|
83
88
|
let s = u();
|
|
84
|
-
const
|
|
85
|
-
const { x: t, y:
|
|
89
|
+
const v = k(() => {
|
|
90
|
+
const { x: t, y: o } = r.axis || { x: 0, y: 0 }, i = (r.items || []).length * 40, m = r.width || 0, n = document.body, w = n.clientWidth < t + m ? t - m : t, y = n.clientHeight < o + i ? o - i : o;
|
|
86
91
|
return {
|
|
87
92
|
zIndex: 3e3,
|
|
88
93
|
...r.styles,
|
|
89
94
|
position: "fixed",
|
|
90
95
|
width: `${r.width}px`,
|
|
91
|
-
left: `${
|
|
92
|
-
top: `${
|
|
96
|
+
left: `${w + 1}px`,
|
|
97
|
+
top: `${y + 1}px`
|
|
93
98
|
};
|
|
94
99
|
});
|
|
95
100
|
let e = u(!1);
|
|
96
|
-
|
|
101
|
+
H(() => {
|
|
97
102
|
e.value = !0;
|
|
98
|
-
}, 0),
|
|
103
|
+
}, 0), I(s, () => {
|
|
99
104
|
e.value = !1;
|
|
100
105
|
}, {
|
|
101
106
|
listenerOptions: {
|
|
102
107
|
capture: !0
|
|
103
108
|
}
|
|
104
|
-
}),
|
|
109
|
+
}), c(window, "scroll", () => {
|
|
105
110
|
e.value = !1;
|
|
106
111
|
}, {
|
|
107
112
|
capture: !0
|
|
108
|
-
}),
|
|
113
|
+
}), c(window, "drag", () => {
|
|
109
114
|
e.value = !1;
|
|
110
115
|
}, {
|
|
111
116
|
capture: !0
|
|
112
117
|
});
|
|
113
|
-
function
|
|
114
|
-
var
|
|
115
|
-
t != null && t.disabled || ((
|
|
118
|
+
function h(t) {
|
|
119
|
+
var o;
|
|
120
|
+
t != null && t.disabled || ((o = t.handler) == null || o.call(t), e.value = !1);
|
|
116
121
|
}
|
|
117
|
-
return (t,
|
|
122
|
+
return (t, o) => (l(), d(b, { name: "vft-zoom-in-top" }, {
|
|
118
123
|
default: C(() => [
|
|
119
|
-
|
|
124
|
+
g(a("div", {
|
|
120
125
|
ref_key: "contextMenuRef",
|
|
121
126
|
ref: s,
|
|
122
|
-
style:
|
|
123
|
-
onClick:
|
|
127
|
+
style: z(p(v)),
|
|
128
|
+
onClick: o[0] || (o[0] = M(() => {
|
|
124
129
|
}, ["stop"])),
|
|
125
|
-
class: "vft-menu"
|
|
130
|
+
class: $([p(x).b(), "vft-menu"])
|
|
126
131
|
}, [
|
|
127
|
-
|
|
128
|
-
(
|
|
129
|
-
onClick: (
|
|
130
|
-
index: m +
|
|
131
|
-
title:
|
|
132
|
-
divider:
|
|
133
|
-
disabled:
|
|
134
|
-
icon:
|
|
132
|
+
a("div", N, [
|
|
133
|
+
(l(!0), B(E, null, S(r.items, (i, m) => (l(), d(p(L), {
|
|
134
|
+
onClick: (n) => h(i),
|
|
135
|
+
index: m + i.text,
|
|
136
|
+
title: i.text,
|
|
137
|
+
divider: i.divider,
|
|
138
|
+
disabled: i.disabled,
|
|
139
|
+
icon: i.iconCfg,
|
|
135
140
|
isAloneUse: "",
|
|
136
141
|
key: m
|
|
137
142
|
}, null, 8, ["onClick", "index", "title", "divider", "disabled", "icon"]))), 128))
|
|
138
143
|
])
|
|
139
|
-
],
|
|
140
|
-
[
|
|
144
|
+
], 6), [
|
|
145
|
+
[A, p(e)]
|
|
141
146
|
])
|
|
142
147
|
]),
|
|
143
148
|
_: 1
|
|
@@ -145,5 +150,5 @@ const H = { class: "vft-sub-menu" }, Zt = /* @__PURE__ */ w({
|
|
|
145
150
|
}
|
|
146
151
|
});
|
|
147
152
|
export {
|
|
148
|
-
|
|
153
|
+
io as default
|
|
149
154
|
};
|
|
@@ -5,7 +5,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
5
5
|
required: false;
|
|
6
6
|
};
|
|
7
7
|
contentPosition: {
|
|
8
|
-
type: __PropType<"
|
|
8
|
+
type: __PropType<"left" | "right" | "center" | undefined>;
|
|
9
9
|
required: false;
|
|
10
10
|
};
|
|
11
11
|
borderStyle: {
|
|
@@ -30,7 +30,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
30
30
|
required: false;
|
|
31
31
|
};
|
|
32
32
|
contentPosition: {
|
|
33
|
-
type: __PropType<"
|
|
33
|
+
type: __PropType<"left" | "right" | "center" | undefined>;
|
|
34
34
|
required: false;
|
|
35
35
|
};
|
|
36
36
|
borderStyle: {
|
|
@@ -4,7 +4,7 @@ export declare const VftDivider: import("vft/es/utils").SFCWithInstall<import("v
|
|
|
4
4
|
required: false;
|
|
5
5
|
};
|
|
6
6
|
contentPosition: {
|
|
7
|
-
type: import("vue").PropType<"
|
|
7
|
+
type: import("vue").PropType<"left" | "right" | "center" | undefined>;
|
|
8
8
|
required: false;
|
|
9
9
|
};
|
|
10
10
|
borderStyle: {
|
|
@@ -29,7 +29,7 @@ export declare const VftDivider: import("vft/es/utils").SFCWithInstall<import("v
|
|
|
29
29
|
required: false;
|
|
30
30
|
};
|
|
31
31
|
contentPosition: {
|
|
32
|
-
type: import("vue").PropType<"
|
|
32
|
+
type: import("vue").PropType<"left" | "right" | "center" | undefined>;
|
|
33
33
|
required: false;
|
|
34
34
|
};
|
|
35
35
|
borderStyle: {
|
|
@@ -26,7 +26,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
26
26
|
cssVarBlock: (object: Record<string, string | undefined>) => Record<string, string>;
|
|
27
27
|
cssVarBlockName: (name: string) => string;
|
|
28
28
|
};
|
|
29
|
-
itemRef: (el: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> |
|
|
29
|
+
itemRef: (el: Element | import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null) => void;
|
|
30
30
|
dataset: {
|
|
31
31
|
"data-vft-collection-item": string;
|
|
32
32
|
};
|
|
@@ -9,7 +9,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
9
9
|
dropdownKls: import("vue").ComputedRef<string[]>;
|
|
10
10
|
role: import("vue").ComputedRef<string>;
|
|
11
11
|
triggerId: import("vue").ComputedRef<string>;
|
|
12
|
-
dropdownListWrapperRef: (el: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> |
|
|
12
|
+
dropdownListWrapperRef: (el: Element | import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null) => void;
|
|
13
13
|
handleKeydown: (e: KeyboardEvent) => void;
|
|
14
14
|
onBlur: (e: Event) => void;
|
|
15
15
|
onFocus: (e: FocusEvent) => void;
|
|
@@ -102,7 +102,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
102
102
|
$data: {};
|
|
103
103
|
$props: Partial<{}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
|
104
104
|
role: {
|
|
105
|
-
type: import("vue").PropType<"
|
|
105
|
+
type: import("vue").PropType<"grid" | "dialog" | "group" | "listbox" | "menu" | "navigation" | "tooltip" | "tree" | undefined>;
|
|
106
106
|
required: false;
|
|
107
107
|
};
|
|
108
108
|
showArrow: {
|
|
@@ -312,7 +312,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
312
312
|
$el: any;
|
|
313
313
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
314
314
|
role: {
|
|
315
|
-
type: import("vue").PropType<"
|
|
315
|
+
type: import("vue").PropType<"grid" | "dialog" | "group" | "listbox" | "menu" | "navigation" | "tooltip" | "tree" | undefined>;
|
|
316
316
|
required: false;
|
|
317
317
|
};
|
|
318
318
|
showArrow: {
|
|
@@ -536,7 +536,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
536
536
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
537
537
|
} & Readonly<import("vue").ExtractPropTypes<{
|
|
538
538
|
role: {
|
|
539
|
-
type: import("vue").PropType<"
|
|
539
|
+
type: import("vue").PropType<"grid" | "dialog" | "group" | "listbox" | "menu" | "navigation" | "tooltip" | "tree" | undefined>;
|
|
540
540
|
required: false;
|
|
541
541
|
};
|
|
542
542
|
showArrow: {
|
|
@@ -102,7 +102,7 @@ export declare const VftDropdown: import("vft/es/utils").SFCWithInstall<import("
|
|
|
102
102
|
$data: {};
|
|
103
103
|
$props: Partial<{}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
|
104
104
|
role: {
|
|
105
|
-
type: import("vue").PropType<"
|
|
105
|
+
type: import("vue").PropType<"grid" | "dialog" | "group" | "listbox" | "menu" | "navigation" | "tooltip" | "tree" | undefined>;
|
|
106
106
|
required: false;
|
|
107
107
|
};
|
|
108
108
|
showArrow: {
|
|
@@ -312,7 +312,7 @@ export declare const VftDropdown: import("vft/es/utils").SFCWithInstall<import("
|
|
|
312
312
|
$el: any;
|
|
313
313
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
314
314
|
role: {
|
|
315
|
-
type: import("vue").PropType<"
|
|
315
|
+
type: import("vue").PropType<"grid" | "dialog" | "group" | "listbox" | "menu" | "navigation" | "tooltip" | "tree" | undefined>;
|
|
316
316
|
required: false;
|
|
317
317
|
};
|
|
318
318
|
showArrow: {
|
|
@@ -536,7 +536,7 @@ export declare const VftDropdown: import("vft/es/utils").SFCWithInstall<import("
|
|
|
536
536
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
537
537
|
} & Readonly<import("vue").ExtractPropTypes<{
|
|
538
538
|
role: {
|
|
539
|
-
type: import("vue").PropType<"
|
|
539
|
+
type: import("vue").PropType<"grid" | "dialog" | "group" | "listbox" | "menu" | "navigation" | "tooltip" | "tree" | undefined>;
|
|
540
540
|
required: false;
|
|
541
541
|
};
|
|
542
542
|
showArrow: {
|
|
@@ -878,7 +878,7 @@ export declare const VftDropdown: import("vft/es/utils").SFCWithInstall<import("
|
|
|
878
878
|
dropdownKls: import("vue").ComputedRef<string[]>;
|
|
879
879
|
role: import("vue").ComputedRef<string>;
|
|
880
880
|
triggerId: import("vue").ComputedRef<string>;
|
|
881
|
-
dropdownListWrapperRef: (el: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> |
|
|
881
|
+
dropdownListWrapperRef: (el: Element | import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null) => void;
|
|
882
882
|
handleKeydown: (e: KeyboardEvent) => void;
|
|
883
883
|
onBlur: (e: Event) => void;
|
|
884
884
|
onFocus: (e: FocusEvent) => void;
|
|
@@ -943,7 +943,7 @@ export declare const VftDropdownMenu: import("vft/es/utils").SFCWithInstall<impo
|
|
|
943
943
|
dropdownKls: import("vue").ComputedRef<string[]>;
|
|
944
944
|
role: import("vue").ComputedRef<string>;
|
|
945
945
|
triggerId: import("vue").ComputedRef<string>;
|
|
946
|
-
dropdownListWrapperRef: (el: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> |
|
|
946
|
+
dropdownListWrapperRef: (el: Element | import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null) => void;
|
|
947
947
|
handleKeydown: (e: KeyboardEvent) => void;
|
|
948
948
|
onBlur: (e: Event) => void;
|
|
949
949
|
onFocus: (e: FocusEvent) => void;
|
|
@@ -20,7 +20,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
20
20
|
required: false;
|
|
21
21
|
};
|
|
22
22
|
size: {
|
|
23
|
-
type: __PropType<number[] |
|
|
23
|
+
type: __PropType<ComponentSize | number[] | undefined>;
|
|
24
24
|
required: false;
|
|
25
25
|
};
|
|
26
26
|
desc: {
|
|
@@ -37,7 +37,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
37
37
|
required: false;
|
|
38
38
|
};
|
|
39
39
|
size: {
|
|
40
|
-
type: __PropType<number[] |
|
|
40
|
+
type: __PropType<ComponentSize | number[] | undefined>;
|
|
41
41
|
required: false;
|
|
42
42
|
};
|
|
43
43
|
desc: {
|
|
@@ -9,7 +9,7 @@ export declare const VftEmpty: import("vft/es/utils").SFCWithInstall<import("vue
|
|
|
9
9
|
required: false;
|
|
10
10
|
};
|
|
11
11
|
size: {
|
|
12
|
-
type: import("vue").PropType<
|
|
12
|
+
type: import("vue").PropType<import("../types").ComponentSize | number[] | undefined>;
|
|
13
13
|
required: false;
|
|
14
14
|
};
|
|
15
15
|
desc: {
|
|
@@ -26,7 +26,7 @@ export declare const VftEmpty: import("vft/es/utils").SFCWithInstall<import("vue
|
|
|
26
26
|
required: false;
|
|
27
27
|
};
|
|
28
28
|
size: {
|
|
29
|
-
type: import("vue").PropType<
|
|
29
|
+
type: import("vue").PropType<import("../types").ComponentSize | number[] | undefined>;
|
|
30
30
|
required: false;
|
|
31
31
|
};
|
|
32
32
|
desc: {
|
|
@@ -37,11 +37,11 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
37
37
|
required: false;
|
|
38
38
|
};
|
|
39
39
|
labelPosition: {
|
|
40
|
-
type: __PropType<"
|
|
40
|
+
type: __PropType<"left" | "right" | "top" | undefined>;
|
|
41
41
|
required: false;
|
|
42
42
|
};
|
|
43
43
|
requireAsteriskPosition: {
|
|
44
|
-
type: __PropType<"
|
|
44
|
+
type: __PropType<"left" | "right" | undefined>;
|
|
45
45
|
required: false;
|
|
46
46
|
};
|
|
47
47
|
labelWidth: {
|
|
@@ -119,11 +119,11 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
119
119
|
required: false;
|
|
120
120
|
};
|
|
121
121
|
labelPosition: {
|
|
122
|
-
type: __PropType<"
|
|
122
|
+
type: __PropType<"left" | "right" | "top" | undefined>;
|
|
123
123
|
required: false;
|
|
124
124
|
};
|
|
125
125
|
requireAsteriskPosition: {
|
|
126
|
-
type: __PropType<"
|
|
126
|
+
type: __PropType<"left" | "right" | undefined>;
|
|
127
127
|
required: false;
|
|
128
128
|
};
|
|
129
129
|
labelWidth: {
|
|
@@ -18,11 +18,11 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<import("vue"
|
|
|
18
18
|
required: false;
|
|
19
19
|
};
|
|
20
20
|
labelPosition: {
|
|
21
|
-
type: import("vue").PropType<"
|
|
21
|
+
type: import("vue").PropType<"left" | "right" | "top" | undefined>;
|
|
22
22
|
required: false;
|
|
23
23
|
};
|
|
24
24
|
requireAsteriskPosition: {
|
|
25
|
-
type: import("vue").PropType<"
|
|
25
|
+
type: import("vue").PropType<"left" | "right" | undefined>;
|
|
26
26
|
required: false;
|
|
27
27
|
};
|
|
28
28
|
labelWidth: {
|
|
@@ -85,11 +85,11 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<import("vue"
|
|
|
85
85
|
required: false;
|
|
86
86
|
};
|
|
87
87
|
labelPosition: {
|
|
88
|
-
type: import("vue").PropType<"
|
|
88
|
+
type: import("vue").PropType<"left" | "right" | "top" | undefined>;
|
|
89
89
|
required: false;
|
|
90
90
|
};
|
|
91
91
|
requireAsteriskPosition: {
|
|
92
|
-
type: import("vue").PropType<"
|
|
92
|
+
type: import("vue").PropType<"left" | "right" | undefined>;
|
|
93
93
|
required: false;
|
|
94
94
|
};
|
|
95
95
|
labelWidth: {
|
|
@@ -1,44 +1,51 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import "
|
|
4
|
-
import "@vueuse/core";
|
|
5
|
-
import { generateCssVars as S } from "../../utils/ns-cover.js";
|
|
6
|
-
import { VftIcon as u } from "../icon/index.js";
|
|
7
|
-
import { useNamespace as V } from "../../hooks/use-namespace/index.js";
|
|
1
|
+
import { defineComponent as d, computed as o, openBlock as r, createElementBlock as h, normalizeClass as S, unref as t, normalizeStyle as B, createBlock as a, mergeProps as m, createCommentVNode as u, createElementVNode as V, toDisplayString as b } from "vue";
|
|
2
|
+
import { VftIcon as v } from "../icon/index.js";
|
|
3
|
+
import { useNamespace as N } from "../../hooks/use-namespace/index.js";
|
|
8
4
|
import "@popperjs/core";
|
|
5
|
+
import "lodash";
|
|
9
6
|
import "../../hooks/use-z-index/index.js";
|
|
7
|
+
import "@vueuse/core";
|
|
8
|
+
import { singleAttrToObj as E, addUnit as l, removeUnit as f } from "@vft/utils";
|
|
9
|
+
import { generateCssVars as U } from "../../utils/ns-cover.js";
|
|
10
10
|
import "@vue/reactivity";
|
|
11
11
|
import "@vue/shared";
|
|
12
|
-
const
|
|
12
|
+
const y = (
|
|
13
13
|
/* hoist-static*/
|
|
14
|
-
|
|
15
|
-
),
|
|
16
|
-
name:
|
|
17
|
-
}),
|
|
18
|
-
|
|
14
|
+
N("icon-text")
|
|
15
|
+
), $ = d({
|
|
16
|
+
name: y.b()
|
|
17
|
+
}), G = /* @__PURE__ */ d({
|
|
18
|
+
...$,
|
|
19
19
|
props: {
|
|
20
20
|
text: null,
|
|
21
21
|
icon: null,
|
|
22
|
-
color:
|
|
22
|
+
color: null,
|
|
23
23
|
hoverColor: null,
|
|
24
24
|
distance: null,
|
|
25
25
|
reverse: { type: Boolean },
|
|
26
26
|
size: null
|
|
27
27
|
},
|
|
28
28
|
emits: ["click"],
|
|
29
|
-
setup(e, { emit:
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
setup(e, { emit: z }) {
|
|
30
|
+
const C = o(() => e.hoverColor ? e.hoverColor : e.color), c = o(() => E(e.icon, "icon", { size: e.size, color: e.color })), i = o(() => e.reverse ? { marginLeft: l(e.distance) } : { marginRight: l(e.distance) }), n = o(() => f(e.size)), k = o(() => n.value && f(n.value) < 12 ? { transform: `scale(${n.value / 12})` } : {}), x = o(() => ({
|
|
31
|
+
...U({
|
|
32
|
+
color: e.color,
|
|
33
|
+
"hover-color": C.value,
|
|
34
|
+
fontSize: n.value < 12 ? "12px" : l(e.size)
|
|
35
|
+
}, "icon-text"),
|
|
36
|
+
...k.value
|
|
37
|
+
}));
|
|
38
|
+
return (g, s) => (r(), h("span", {
|
|
39
|
+
class: S(t(y).b()),
|
|
40
|
+
onClick: s[0] || (s[0] = (j) => z("click")),
|
|
41
|
+
style: B(t(x))
|
|
35
42
|
}, [
|
|
36
|
-
e.reverse ?
|
|
37
|
-
|
|
38
|
-
e.reverse ? (r(),
|
|
43
|
+
e.reverse ? u("", !0) : (r(), a(t(v), m({ key: 0 }, t(c), { style: t(i) }), null, 16, ["style"])),
|
|
44
|
+
V("span", null, b(e.text), 1),
|
|
45
|
+
e.reverse ? (r(), a(t(v), m({ key: 1 }, t(c), { style: t(i) }), null, 16, ["style"])) : u("", !0)
|
|
39
46
|
], 6));
|
|
40
47
|
}
|
|
41
48
|
});
|
|
42
49
|
export {
|
|
43
|
-
|
|
50
|
+
G as default
|
|
44
51
|
};
|