vft 0.0.115 → 0.0.118
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/affix/affix.vue2.js +25 -25
- package/es/components/alert/alert.vue2.js +3 -6
- package/es/components/autocomplete/autocomplete.vue2.js +25 -25
- package/es/components/backtop/backtop.vue2.js +15 -15
- package/es/components/button/button.vue2.js +27 -27
- package/es/components/card/card.vue2.js +11 -11
- package/es/components/check-tag/check-tag.vue2.js +8 -8
- package/es/components/checkbox/checkbox.vue2.js +12 -12
- package/es/components/clamp/clamp.vue2.js +33 -33
- package/es/components/clamp-toggle/clamp-toggle.vue2.js +17 -17
- package/es/components/col/col.vue2.js +11 -11
- package/es/components/config-provider/config-provider.vue2.js +25 -25
- package/es/components/container/aside.vue2.js +8 -8
- package/es/components/container/container.vue2.js +10 -10
- package/es/components/container/footer.vue2.js +5 -5
- package/es/components/container/header.vue2.js +14 -14
- package/es/components/container/main.vue2.js +7 -7
- package/es/components/context-menu/context-menu.vue2.js +27 -27
- package/es/components/date-time-select/date-time-select.vue2.js +32 -32
- package/es/components/descriptions/description-item.vue2.js +11 -12
- package/es/components/descriptions/description.vue2.js +5 -5
- package/es/components/descriptions/descriptions-row.vue2.js +17 -17
- package/es/components/dialog/dialog-content.vue2.js +16 -16
- package/es/components/dialog/dialog.vue2.js +19 -19
- package/es/components/divider/divider.vue2.js +8 -8
- package/es/components/drawer/drawer.vue2.js +6 -6
- package/es/components/dropdown/dropdown.vue2.js +32 -32
- package/es/components/empty/empty.vue2.js +22 -22
- package/es/components/footer-layout/footer-layout.vue2.js +12 -12
- package/es/components/form/form-item.vue2.js +1 -1
- package/es/components/form/form.vue2.js +1 -1
- package/es/components/full-screen/full-screen.vue2.js +16 -16
- package/es/components/header-layout/header-layout.vue2.js +18 -18
- package/es/components/horizontal-menu/horizontal-menu.vue2.js +34 -34
- package/es/components/icon/icon.vue2.js +11 -11
- package/es/components/icon-text/icon-text.vue2.js +21 -21
- package/es/components/iframe-layout/iframe-layout.vue2.js +14 -15
- package/es/components/iframe-layout/iframe-page.vue2.js +7 -7
- package/es/components/image/image.vue2.js +26 -26
- package/es/components/image-viewer/image-viewer.vue2.js +9 -9
- package/es/components/index.js +92 -92
- package/es/components/input-number/input-number.vue2.js +22 -22
- package/es/components/link/link.vue2.js +20 -20
- package/es/components/list-cell/list-cell.vue2.js +18 -18
- package/es/components/logo/logo.vue2.js +8 -8
- package/es/components/md-comment/md-comment.vue2.js +10 -10
- package/es/components/md-container/md-container.vue2.js +29 -29
- package/es/components/md-vue-playground/md-vue-playground.vue2.js +20 -20
- package/es/components/menu/menu-item-group.vue2.js +14 -14
- package/es/components/menu/menu-item.vue2.js +21 -21
- package/es/components/menu/menu.vue2.js +26 -26
- package/es/components/menu/sub-menu.vue2.js +43 -43
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +41 -41
- package/es/components/overlay/overlay.vue2.js +20 -20
- package/es/components/page-wrapper/page-wrapper.vue2.js +17 -17
- package/es/components/pagination/pagination.vue2.js +22 -22
- package/es/components/popconfirm/popconfirm.vue2.js +5 -5
- package/es/components/popover/popover.vue2.js +7 -7
- package/es/components/progress/progress.vue2.js +7 -7
- package/es/components/qrcode/qrcode.vue2.js +11 -12
- package/es/components/radio/radio.vue2.js +14 -14
- package/es/components/result/result.vue2.js +9 -9
- package/es/components/router-view-content/router-view-content.vue2.js +19 -20
- package/es/components/row/row.vue2.js +14 -14
- package/es/components/scrollbar/scrollbar.vue2.js +23 -23
- package/es/components/search/search.vue2.js +23 -23
- package/es/components/side-menu/side-menu.vue2.js +35 -35
- package/es/components/skeleton/skeleton.vue2.js +13 -13
- package/es/components/slider/button.vue2.js +13 -13
- package/es/components/slider/slider.vue2.js +1 -1
- package/es/components/super-form/super-form.vue2.js +52 -52
- package/es/components/switch/switch.vue2.js +53 -53
- package/es/components/table/{columns.js → field.js} +19 -19
- package/es/components/table/index.js +1 -1
- package/es/components/table/table.vue2.js +85 -105
- package/es/components/tabs/tab-nav.vue2.js +31 -31
- package/es/components/tabs/tab-pane.vue2.js +11 -11
- package/es/components/tabs/tabs.vue2.js +1 -1
- package/es/components/upload/upload.vue2.js +25 -26
- package/es/components/verify-code/verify-code.vue2.js +20 -20
- package/es/index.js +92 -92
- package/es/package.json.js +1 -1
- package/lib/components/affix/affix.vue2.cjs +1 -1
- package/lib/components/alert/alert.vue2.cjs +1 -1
- package/lib/components/autocomplete/autocomplete.vue2.cjs +1 -1
- package/lib/components/backtop/backtop.vue2.cjs +1 -1
- package/lib/components/button/button.vue2.cjs +1 -1
- package/lib/components/card/card.vue2.cjs +1 -1
- package/lib/components/check-tag/check-tag.vue2.cjs +1 -1
- package/lib/components/checkbox/checkbox.vue2.cjs +1 -1
- package/lib/components/clamp/clamp.vue2.cjs +1 -1
- package/lib/components/clamp-toggle/clamp-toggle.vue2.cjs +1 -1
- package/lib/components/col/col.vue2.cjs +1 -1
- package/lib/components/config-provider/config-provider.vue2.cjs +1 -1
- package/lib/components/container/aside.vue2.cjs +1 -1
- package/lib/components/container/container.vue2.cjs +1 -1
- package/lib/components/container/footer.vue2.cjs +1 -1
- package/lib/components/container/header.vue2.cjs +1 -1
- package/lib/components/container/main.vue2.cjs +1 -1
- package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
- package/lib/components/date-time-select/date-time-select.vue2.cjs +1 -1
- package/lib/components/descriptions/description-item.vue2.cjs +1 -1
- package/lib/components/descriptions/description.vue2.cjs +1 -1
- package/lib/components/descriptions/descriptions-row.vue2.cjs +1 -1
- package/lib/components/dialog/dialog-content.vue2.cjs +1 -1
- package/lib/components/dialog/dialog.vue2.cjs +1 -1
- package/lib/components/divider/divider.vue2.cjs +1 -1
- package/lib/components/drawer/drawer.vue2.cjs +1 -1
- package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
- package/lib/components/empty/empty.vue2.cjs +1 -1
- package/lib/components/footer-layout/footer-layout.vue2.cjs +1 -1
- package/lib/components/form/form-item.vue2.cjs +1 -1
- package/lib/components/form/form.vue2.cjs +1 -1
- package/lib/components/full-screen/full-screen.vue2.cjs +1 -1
- package/lib/components/header-layout/header-layout.vue2.cjs +1 -1
- package/lib/components/horizontal-menu/horizontal-menu.vue2.cjs +1 -1
- package/lib/components/icon/icon.vue2.cjs +1 -1
- package/lib/components/icon-text/icon-text.vue2.cjs +1 -1
- package/lib/components/iframe-layout/iframe-layout.vue2.cjs +1 -1
- package/lib/components/iframe-layout/iframe-page.vue2.cjs +1 -1
- package/lib/components/image/image.vue2.cjs +1 -1
- package/lib/components/image-viewer/image-viewer.vue2.cjs +1 -1
- package/lib/components/index.cjs +1 -1
- package/lib/components/input-number/input-number.vue2.cjs +1 -1
- package/lib/components/link/link.vue2.cjs +1 -1
- package/lib/components/list-cell/list-cell.vue2.cjs +1 -1
- package/lib/components/logo/logo.vue2.cjs +1 -1
- package/lib/components/md-comment/md-comment.vue2.cjs +1 -1
- package/lib/components/md-container/md-container.vue2.cjs +1 -1
- package/lib/components/md-vue-playground/md-vue-playground.vue2.cjs +1 -1
- package/lib/components/menu/menu-item-group.vue2.cjs +1 -1
- package/lib/components/menu/menu-item.vue2.cjs +1 -1
- package/lib/components/menu/menu.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/overlay/overlay.vue2.cjs +1 -1
- package/lib/components/page-wrapper/page-wrapper.vue2.cjs +1 -1
- package/lib/components/pagination/pagination.vue2.cjs +1 -1
- package/lib/components/popconfirm/popconfirm.vue2.cjs +1 -1
- package/lib/components/popover/popover.vue2.cjs +1 -1
- package/lib/components/progress/progress.vue2.cjs +2 -2
- package/lib/components/qrcode/qrcode.vue2.cjs +1 -1
- package/lib/components/radio/radio.vue2.cjs +1 -1
- package/lib/components/result/result.vue2.cjs +1 -1
- package/lib/components/router-view-content/router-view-content.vue2.cjs +1 -1
- package/lib/components/row/row.vue2.cjs +1 -1
- package/lib/components/scrollbar/scrollbar.vue2.cjs +1 -1
- package/lib/components/search/search.vue2.cjs +1 -1
- package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
- package/lib/components/skeleton/skeleton.vue2.cjs +1 -1
- package/lib/components/slider/button.vue2.cjs +1 -1
- package/lib/components/slider/slider.vue2.cjs +1 -1
- package/lib/components/super-form/super-form.vue2.cjs +1 -1
- package/lib/components/switch/switch.vue2.cjs +1 -1
- package/lib/components/table/{columns.cjs → field.cjs} +1 -1
- package/lib/components/table/index.cjs +1 -1
- package/lib/components/table/table.vue2.cjs +1 -1
- package/lib/components/tabs/tab-nav.vue2.cjs +1 -1
- package/lib/components/tabs/tab-pane.vue2.cjs +1 -1
- package/lib/components/tabs/tabs.vue2.cjs +1 -1
- package/lib/components/upload/upload.vue2.cjs +1 -1
- package/lib/components/verify-code/verify-code.vue2.cjs +1 -1
- package/lib/index.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/package.json +4 -4
- package/web-types.json +1 -1
- package/theme-style/vft-select-v2.css +0 -1
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { defineComponent as $, shallowRef as c, ref as v, computed as E, watch as
|
|
2
|
-
import { useWindowSize as
|
|
3
|
-
import { addUnit as
|
|
4
|
-
import { throwError as
|
|
1
|
+
import { defineComponent as $, shallowRef as c, ref as v, computed as E, watch as k, onMounted as M, watchEffect as R, openBlock as W, createElementBlock as A, normalizeClass as S, unref as _, normalizeStyle as y, createElementVNode as H, renderSlot as I } from "vue";
|
|
2
|
+
import { useWindowSize as O, useElementBounding as T, useEventListener as P } from "@vueuse/core";
|
|
3
|
+
import { addUnit as q } from "@vft/utils";
|
|
4
|
+
import { throwError as L } from "../../utils/error.js";
|
|
5
5
|
import "lodash";
|
|
6
6
|
import "../../utils/ns-cover.js";
|
|
7
|
-
import { getScrollContainer as
|
|
8
|
-
import { useNamespace as
|
|
7
|
+
import { getScrollContainer as U } from "../../utils/dom/scroll.js";
|
|
8
|
+
import { useNamespace as V } from "../../hooks/use-namespace/index.js";
|
|
9
9
|
import "@popperjs/core";
|
|
10
10
|
import "../../hooks/use-z-index/index.js";
|
|
11
|
-
import { affixProps as
|
|
12
|
-
const
|
|
13
|
-
name:
|
|
11
|
+
import { affixProps as Y, affixEmits as j } from "./affix.js";
|
|
12
|
+
const D = "ElAffix", F = $({
|
|
13
|
+
name: "vft-affix"
|
|
14
14
|
}), se = /* @__PURE__ */ $({
|
|
15
15
|
...F,
|
|
16
|
-
props:
|
|
17
|
-
emits:
|
|
18
|
-
setup(
|
|
19
|
-
const e =
|
|
16
|
+
props: Y,
|
|
17
|
+
emits: j,
|
|
18
|
+
setup(b, { expose: z, emit: m }) {
|
|
19
|
+
const e = b, p = V("affix"), a = c(), f = c(), l = c(), { height: r } = O(), {
|
|
20
20
|
height: s,
|
|
21
21
|
width: d,
|
|
22
22
|
top: h,
|
|
23
23
|
bottom: x,
|
|
24
24
|
update: i
|
|
25
|
-
} = T(f, { windowScroll: !1 }), n = T(a), o = v(!1), g = v(0), u = v(0),
|
|
25
|
+
} = T(f, { windowScroll: !1 }), n = T(a), o = v(!1), g = v(0), u = v(0), C = E(() => ({
|
|
26
26
|
height: o.value ? `${s.value}px` : "",
|
|
27
27
|
width: o.value ? `${d.value}px` : ""
|
|
28
|
-
})),
|
|
28
|
+
})), N = E(() => {
|
|
29
29
|
if (!o.value)
|
|
30
30
|
return {};
|
|
31
|
-
const t = e.offset ?
|
|
31
|
+
const t = e.offset ? q(e.offset) : 0;
|
|
32
32
|
return {
|
|
33
33
|
height: `${s.value}px`,
|
|
34
34
|
width: `${d.value}px`,
|
|
@@ -50,30 +50,30 @@ const b = "ElAffix", F = $({
|
|
|
50
50
|
o.value = r.value - e.offset < x.value && r.value > n.top.value, u.value = t < 0 ? -t : 0;
|
|
51
51
|
} else
|
|
52
52
|
o.value = r.value - e.offset < x.value;
|
|
53
|
-
},
|
|
53
|
+
}, B = () => {
|
|
54
54
|
i(), m("scroll", {
|
|
55
55
|
scrollTop: g.value,
|
|
56
56
|
fixed: o.value
|
|
57
57
|
});
|
|
58
58
|
};
|
|
59
|
-
return
|
|
60
|
-
e.target ? (a.value = document.querySelector(e.target) ?? void 0, a.value ||
|
|
61
|
-
}),
|
|
59
|
+
return k(o, (t) => m("change", t)), M(() => {
|
|
60
|
+
e.target ? (a.value = document.querySelector(e.target) ?? void 0, a.value || L(D, `Target is not existed: ${e.target}`)) : a.value = document.documentElement, l.value = U(f.value, !0), i();
|
|
61
|
+
}), P(l, "scroll", B), R(w), z({
|
|
62
62
|
/** @description update affix status */
|
|
63
63
|
update: w,
|
|
64
64
|
/** @description update rootRect info */
|
|
65
65
|
updateRoot: i
|
|
66
|
-
}), (t, G) => (
|
|
66
|
+
}), (t, G) => (W(), A("div", {
|
|
67
67
|
ref_key: "root",
|
|
68
68
|
ref: f,
|
|
69
69
|
class: S(_(p).b()),
|
|
70
|
-
style: y(
|
|
70
|
+
style: y(C.value)
|
|
71
71
|
}, [
|
|
72
|
-
|
|
72
|
+
H("div", {
|
|
73
73
|
class: S({ [_(p).m("fixed")]: o.value }),
|
|
74
|
-
style: y(
|
|
74
|
+
style: y(N.value)
|
|
75
75
|
}, [
|
|
76
|
-
|
|
76
|
+
I(t.$slots, "default")
|
|
77
77
|
], 6)
|
|
78
78
|
], 6));
|
|
79
79
|
}
|
|
@@ -7,11 +7,8 @@ import "../../hooks/use-z-index/index.js";
|
|
|
7
7
|
import "@vueuse/core";
|
|
8
8
|
import "@vft/utils";
|
|
9
9
|
import "../../utils/ns-cover.js";
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
E("alert")
|
|
13
|
-
), D = C({
|
|
14
|
-
name: t.b()
|
|
10
|
+
const D = C({
|
|
11
|
+
name: "vft-alert"
|
|
15
12
|
}), L = /* @__PURE__ */ C({
|
|
16
13
|
...D,
|
|
17
14
|
props: {
|
|
@@ -28,7 +25,7 @@ const t = (
|
|
|
28
25
|
close: (n) => n instanceof MouseEvent
|
|
29
26
|
},
|
|
30
27
|
setup(n, { emit: h }) {
|
|
31
|
-
const d = w(), f = g(!0), m = c(() => n.type), B = c(() => [
|
|
28
|
+
const t = E("alert"), d = w(), f = g(!0), m = c(() => n.type), B = c(() => [
|
|
32
29
|
t.e("icon"),
|
|
33
30
|
{ [t.is("big")]: !!n.description || !!d.default }
|
|
34
31
|
]), T = c(() => ({ [t.is("bold")]: n.description || d.default })), p = (e) => {
|
|
@@ -15,11 +15,11 @@ import { VftTooltip as Fe } from "../tooltip/index.js";
|
|
|
15
15
|
import "../form/index.js";
|
|
16
16
|
import { generateId as Ne } from "./types.js";
|
|
17
17
|
import { useFormDisabled as Ke } from "../form/hooks/use-form-common-props.js";
|
|
18
|
-
const Oe = ["aria-expanded", "aria-owns"], Re = ["id", "aria-selected", "onClick"], Me = "ElAutocomplete",
|
|
18
|
+
const Oe = ["aria-expanded", "aria-owns"], Re = ["id", "aria-selected", "onClick"], Me = "ElAutocomplete", i = (
|
|
19
19
|
/* hoist-static*/
|
|
20
20
|
Te("autocomplete")
|
|
21
21
|
), Pe = X({
|
|
22
|
-
name:
|
|
22
|
+
name: "vft-autocomplete",
|
|
23
23
|
inheritAttrs: !1
|
|
24
24
|
}), at = /* @__PURE__ */ X({
|
|
25
25
|
...Pe,
|
|
@@ -51,10 +51,10 @@ const Oe = ["aria-expanded", "aria-owns"], Re = ["id", "aria-selected", "onClick
|
|
|
51
51
|
clear: () => !0,
|
|
52
52
|
select: (t) => Ve(t)
|
|
53
53
|
},
|
|
54
|
-
setup(t, { expose: Y, emit:
|
|
54
|
+
setup(t, { expose: Y, emit: r }) {
|
|
55
55
|
const Z = Ie(), x = de(), M = Ke(), o = f(), P = f(), V = f(), W = f();
|
|
56
56
|
let U = !1, C = !1;
|
|
57
|
-
const
|
|
57
|
+
const u = f([]), a = f(-1), H = f(""), c = f(!1), h = f(!1), m = f(!1), b = w(() => i.b(String(Ne()))), _ = w(() => x.style), d = w(() => (u.value.length > 0 || m.value) && c.value), I = w(() => !t.hideLoading && m.value), ee = w(() => o.value ? Array.from(
|
|
58
58
|
o.value.$el.querySelectorAll("input")
|
|
59
59
|
) : []), te = async () => {
|
|
60
60
|
await Ee(), d.value && (H.value = `${o.value.$el.offsetWidth}px`);
|
|
@@ -64,7 +64,7 @@ const Oe = ["aria-expanded", "aria-owns"], Re = ["id", "aria-selected", "onClick
|
|
|
64
64
|
if (h.value)
|
|
65
65
|
return;
|
|
66
66
|
const l = (n) => {
|
|
67
|
-
m.value = !1, console.log("cb---", n, h.value, k(n)), !h.value && (k(n) ? (
|
|
67
|
+
m.value = !1, console.log("cb---", n, h.value, k(n)), !h.value && (k(n) ? (u.value = n, a.value = t.highlightFirstItem ? 0 : -1) : Ce(Me, "autocomplete suggestions must be an array"));
|
|
68
68
|
};
|
|
69
69
|
if (m.value = !0, console.log(t.fetchSuggestions, e, 8989), k(t.fetchSuggestions))
|
|
70
70
|
console.log("isArray----"), l(t.fetchSuggestions);
|
|
@@ -74,8 +74,8 @@ const Oe = ["aria-expanded", "aria-owns"], Re = ["id", "aria-selected", "onClick
|
|
|
74
74
|
}
|
|
75
75
|
}, t.debounce), ae = (e) => {
|
|
76
76
|
const l = !!e;
|
|
77
|
-
if (
|
|
78
|
-
h.value = !0,
|
|
77
|
+
if (r(R, e), r(T, e), h.value = !1, c.value || (c.value = l), !t.triggerOnFocus && !e) {
|
|
78
|
+
h.value = !0, u.value = [];
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
81
81
|
L(e);
|
|
@@ -83,9 +83,9 @@ const Oe = ["aria-expanded", "aria-owns"], Re = ["id", "aria-selected", "onClick
|
|
|
83
83
|
var l;
|
|
84
84
|
M.value || (((l = e.target) == null ? void 0 : l.tagName) !== "INPUT" || ee.value.includes(document.activeElement)) && (c.value = !0);
|
|
85
85
|
}, se = (e) => {
|
|
86
|
-
|
|
86
|
+
r(Q, e);
|
|
87
87
|
}, ne = (e) => {
|
|
88
|
-
C ? C = !1 : (c.value = !0,
|
|
88
|
+
C ? C = !1 : (c.value = !0, r("focus", e), t.triggerOnFocus && !U && L(String(t.modelValue)));
|
|
89
89
|
}, re = (e) => {
|
|
90
90
|
setTimeout(() => {
|
|
91
91
|
var l;
|
|
@@ -93,12 +93,12 @@ const Oe = ["aria-expanded", "aria-owns"], Re = ["id", "aria-selected", "onClick
|
|
|
93
93
|
C = !0;
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
96
|
-
c.value && y(),
|
|
96
|
+
c.value && y(), r("blur", e);
|
|
97
97
|
});
|
|
98
98
|
}, ue = () => {
|
|
99
|
-
c.value = !1,
|
|
99
|
+
c.value = !1, r(T, ""), r("clear");
|
|
100
100
|
}, z = async () => {
|
|
101
|
-
d.value && a.value >= 0 && a.value <
|
|
101
|
+
d.value && a.value >= 0 && a.value < u.value.length ? B(u.value[a.value]) : t.selectWhenUnmatched && (r("select", { value: t.modelValue }), u.value = [], a.value = -1);
|
|
102
102
|
}, ie = (e) => {
|
|
103
103
|
d.value && (e.preventDefault(), e.stopPropagation(), y());
|
|
104
104
|
}, y = () => {
|
|
@@ -110,7 +110,7 @@ const Oe = ["aria-expanded", "aria-owns"], Re = ["id", "aria-selected", "onClick
|
|
|
110
110
|
var e;
|
|
111
111
|
(e = o.value) == null || e.blur();
|
|
112
112
|
}, B = async (e) => {
|
|
113
|
-
|
|
113
|
+
r(R, e[t.valueKey]), r(T, e[t.valueKey]), r("select", e), u.value = [], a.value = -1;
|
|
114
114
|
}, D = (e) => {
|
|
115
115
|
if (!d.value || m.value)
|
|
116
116
|
return;
|
|
@@ -118,11 +118,11 @@ const Oe = ["aria-expanded", "aria-owns"], Re = ["id", "aria-selected", "onClick
|
|
|
118
118
|
a.value = -1;
|
|
119
119
|
return;
|
|
120
120
|
}
|
|
121
|
-
e >=
|
|
121
|
+
e >= u.value.length && (e = u.value.length - 1);
|
|
122
122
|
const l = P.value.querySelector(
|
|
123
|
-
`.${
|
|
123
|
+
`.${i.be("suggestion", "wrap")}`
|
|
124
124
|
), v = l.querySelectorAll(
|
|
125
|
-
`.${
|
|
125
|
+
`.${i.be("suggestion", "list")} li`
|
|
126
126
|
)[e], p = l.scrollTop, { offsetTop: F, scrollHeight: N } = v;
|
|
127
127
|
F + N > p + l.clientHeight && (l.scrollTop += N), F < p && (l.scrollTop -= N), a.value = e, o.value.ref.setAttribute(
|
|
128
128
|
"aria-activedescendant",
|
|
@@ -148,7 +148,7 @@ const Oe = ["aria-expanded", "aria-owns"], Re = ["id", "aria-selected", "onClick
|
|
|
148
148
|
/** @description el-tooltip component instance */
|
|
149
149
|
popperRef: V,
|
|
150
150
|
/** @description fetch suggestions result */
|
|
151
|
-
suggestions:
|
|
151
|
+
suggestions: u,
|
|
152
152
|
/** @description triggers when a suggestion is clicked */
|
|
153
153
|
handleSelect: B,
|
|
154
154
|
/** @description handle keyboard enter event */
|
|
@@ -169,14 +169,14 @@ const Oe = ["aria-expanded", "aria-owns"], Re = ["id", "aria-selected", "onClick
|
|
|
169
169
|
visible: d.value,
|
|
170
170
|
placement: e.placement,
|
|
171
171
|
"fallback-placements": ["bottom-start", "top-start"],
|
|
172
|
-
"popper-class": [s(
|
|
172
|
+
"popper-class": [s(i).e("popper"), e.popperClass],
|
|
173
173
|
teleported: e.teleported,
|
|
174
174
|
"gpu-acceleration": !1,
|
|
175
175
|
pure: "",
|
|
176
176
|
"manual-mode": "",
|
|
177
177
|
effect: "light",
|
|
178
178
|
trigger: "click",
|
|
179
|
-
transition: `${s(
|
|
179
|
+
transition: `${s(i).namespace.value}-zoom-in-top`,
|
|
180
180
|
persistent: "",
|
|
181
181
|
onBeforeShow: te,
|
|
182
182
|
onHide: le
|
|
@@ -185,7 +185,7 @@ const Oe = ["aria-expanded", "aria-owns"], Re = ["id", "aria-selected", "onClick
|
|
|
185
185
|
G("div", {
|
|
186
186
|
ref_key: "regionRef",
|
|
187
187
|
ref: P,
|
|
188
|
-
class: S([s(
|
|
188
|
+
class: S([s(i).b("suggestion"), s(i).is("loading", I.value)]),
|
|
189
189
|
style: j({
|
|
190
190
|
[e.fitInputWidth ? "width" : "minWidth"]: H.value,
|
|
191
191
|
outline: "none"
|
|
@@ -195,15 +195,15 @@ const Oe = ["aria-expanded", "aria-owns"], Re = ["id", "aria-selected", "onClick
|
|
|
195
195
|
ge(($(), q(s(De), {
|
|
196
196
|
id: b.value,
|
|
197
197
|
tag: "ul",
|
|
198
|
-
"wrap-class": s(
|
|
199
|
-
"view-class": s(
|
|
198
|
+
"wrap-class": s(i).be("suggestion", "wrap"),
|
|
199
|
+
"view-class": s(i).be("suggestion", "list"),
|
|
200
200
|
role: "listbox"
|
|
201
201
|
}, {
|
|
202
202
|
default: g(() => [
|
|
203
203
|
I.value ? ($(), K("li", {
|
|
204
204
|
key: 0,
|
|
205
|
-
class: S(s(
|
|
206
|
-
}, null, 2)) : ($(!0), K(me, { key: 1 }, he(
|
|
205
|
+
class: S(s(i).is("loading"))
|
|
206
|
+
}, null, 2)) : ($(!0), K(me, { key: 1 }, he(u.value, (v, p) => ($(), K("li", {
|
|
207
207
|
id: `${b.value}-item-${p}`,
|
|
208
208
|
key: p,
|
|
209
209
|
class: S({ highlighted: a.value === p }),
|
|
@@ -226,7 +226,7 @@ const Oe = ["aria-expanded", "aria-owns"], Re = ["id", "aria-selected", "onClick
|
|
|
226
226
|
G("div", {
|
|
227
227
|
ref_key: "listboxRef",
|
|
228
228
|
ref: W,
|
|
229
|
-
class: S([s(
|
|
229
|
+
class: S([s(i).b(), e.$attrs.class]),
|
|
230
230
|
style: j(_.value),
|
|
231
231
|
role: "combobox",
|
|
232
232
|
"aria-haspopup": "listbox",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as c, getCurrentInstance as g, computed as a, openBlock as
|
|
1
|
+
import { defineComponent as c, getCurrentInstance as g, computed as a, openBlock as i, createBlock as l, Transition as v, unref as t, withCtx as y, createElementBlock as C, normalizeStyle as h, normalizeClass as x, withModifiers as T, renderSlot as z, normalizeProps as B, mergeProps as $, createCommentVNode as s } from "vue";
|
|
2
2
|
import { singleAttrToObj as w } from "@vft/utils";
|
|
3
3
|
import "../divider/index.js";
|
|
4
4
|
import { VftIcon as S } from "../icon/index.js";
|
|
@@ -90,11 +90,11 @@ import "../../hooks/use-z-index/index.js";
|
|
|
90
90
|
import "@vueuse/core";
|
|
91
91
|
import "../../utils/ns-cover.js";
|
|
92
92
|
import { useBackTop as I } from "./use-backtop.js";
|
|
93
|
-
const
|
|
93
|
+
const m = (
|
|
94
94
|
/* hoist-static*/
|
|
95
95
|
_("backtop")
|
|
96
96
|
), N = c({
|
|
97
|
-
name:
|
|
97
|
+
name: "vft-backtop"
|
|
98
98
|
}), go = /* @__PURE__ */ c({
|
|
99
99
|
...N,
|
|
100
100
|
props: {
|
|
@@ -106,19 +106,19 @@ const r = (
|
|
|
106
106
|
scrollTargetKey: {}
|
|
107
107
|
},
|
|
108
108
|
emits: ["click"],
|
|
109
|
-
setup(
|
|
110
|
-
const f = g(), { handleClick: p, visible: d } = I(f.props, u,
|
|
111
|
-
right: `${
|
|
112
|
-
bottom: `${
|
|
113
|
-
})), e = a(() => w(
|
|
114
|
-
return (k, n) => (
|
|
115
|
-
name: `${t(
|
|
109
|
+
setup(r, { emit: u }) {
|
|
110
|
+
const f = g(), { handleClick: p, visible: d } = I(f.props, u, m.b()), b = a(() => ({
|
|
111
|
+
right: `${r.right}px`,
|
|
112
|
+
bottom: `${r.bottom}px`
|
|
113
|
+
})), e = a(() => w(r.icon, "icon", { size: 25 }));
|
|
114
|
+
return (k, n) => (i(), l(v, {
|
|
115
|
+
name: `${t(m).namespace}-fade-in`
|
|
116
116
|
}, {
|
|
117
|
-
default:
|
|
118
|
-
t(d) ? (
|
|
117
|
+
default: y(() => [
|
|
118
|
+
t(d) ? (i(), C("div", {
|
|
119
119
|
key: 0,
|
|
120
|
-
style:
|
|
121
|
-
class: x(t(
|
|
120
|
+
style: h(b.value),
|
|
121
|
+
class: x(t(m).b()),
|
|
122
122
|
onClick: n[0] || (n[0] = T(
|
|
123
123
|
//@ts-ignore
|
|
124
124
|
(...o) => t(p) && t(p)(...o),
|
|
@@ -128,7 +128,7 @@ const r = (
|
|
|
128
128
|
z(k.$slots, "default", {}, () => {
|
|
129
129
|
var o;
|
|
130
130
|
return [
|
|
131
|
-
(o = e.value) != null && o.icon ? (
|
|
131
|
+
(o = e.value) != null && o.icon ? (i(), l(t(S), B($({ key: 0 }, e.value)), null, 16)) : s("", !0)
|
|
132
132
|
];
|
|
133
133
|
})
|
|
134
134
|
], 6)) : s("", !0)
|
|
@@ -9,11 +9,11 @@ import { singleAttrToObj as O } from "@vft/utils";
|
|
|
9
9
|
import "../../utils/ns-cover.js";
|
|
10
10
|
import { useButton as P } from "./use-button.js";
|
|
11
11
|
import { useButtonCustomStyle as T } from "./button-custom.js";
|
|
12
|
-
const
|
|
12
|
+
const t = (
|
|
13
13
|
/* hoist-static*/
|
|
14
14
|
N("button")
|
|
15
15
|
), V = B({
|
|
16
|
-
name:
|
|
16
|
+
name: "vft-button"
|
|
17
17
|
}), U = /* @__PURE__ */ B({
|
|
18
18
|
...V,
|
|
19
19
|
props: {
|
|
@@ -39,7 +39,7 @@ const o = (
|
|
|
39
39
|
},
|
|
40
40
|
emits: ["click"],
|
|
41
41
|
setup(C, { expose: S, emit: h }) {
|
|
42
|
-
const l = C, s = I(() => O(l.icon, "icon")),
|
|
42
|
+
const l = C, s = I(() => O(l.icon, "icon")), v = T(l), { _ref: i, _size: r, _type: p, _disabled: c, _props: z, shouldAddSpace: u, handleClick: $ } = P(l, h);
|
|
43
43
|
return S({
|
|
44
44
|
/** @description button html element */
|
|
45
45
|
ref: i,
|
|
@@ -50,44 +50,44 @@ const o = (
|
|
|
50
50
|
/** @description button disabled */
|
|
51
51
|
disabled: c,
|
|
52
52
|
/** @description whether adding space */
|
|
53
|
-
shouldAddSpace:
|
|
54
|
-
}), (
|
|
53
|
+
shouldAddSpace: u
|
|
54
|
+
}), (o, w) => (n(), a(_(o.tag), m({
|
|
55
55
|
ref_key: "_ref",
|
|
56
56
|
ref: i
|
|
57
|
-
}, e(
|
|
57
|
+
}, e(z), {
|
|
58
58
|
class: [
|
|
59
|
-
e(
|
|
60
|
-
e(
|
|
61
|
-
e(
|
|
62
|
-
e(
|
|
63
|
-
e(
|
|
64
|
-
e(
|
|
65
|
-
e(
|
|
66
|
-
e(
|
|
67
|
-
e(
|
|
68
|
-
e(
|
|
69
|
-
e(
|
|
70
|
-
e(
|
|
59
|
+
e(t).b(),
|
|
60
|
+
e(t).m(e(p)),
|
|
61
|
+
e(t).m(e(r)),
|
|
62
|
+
e(t).is("disabled", e(c)),
|
|
63
|
+
e(t).is("loading", o.loading),
|
|
64
|
+
e(t).is("plain", o.plain),
|
|
65
|
+
e(t).is("round", o.round),
|
|
66
|
+
e(t).is("circle", o.circle),
|
|
67
|
+
e(t).is("text", o.text),
|
|
68
|
+
e(t).is("link", o.link),
|
|
69
|
+
e(t).is("has-bg", o.bg),
|
|
70
|
+
e(t).is("block", o.block)
|
|
71
71
|
],
|
|
72
|
-
style: e(
|
|
72
|
+
style: e(v),
|
|
73
73
|
onClick: e($)
|
|
74
74
|
}), {
|
|
75
75
|
default: j(() => {
|
|
76
|
-
var
|
|
76
|
+
var d;
|
|
77
77
|
return [
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
o.loading ? (n(), y(A, { key: 0 }, [
|
|
79
|
+
o.$slots.loading ? f(o.$slots, "loading", { key: 0 }) : (n(), a(e(g), {
|
|
80
80
|
key: 1,
|
|
81
81
|
rotate: "",
|
|
82
|
-
class: k(e(
|
|
82
|
+
class: k(e(t).is("loading")),
|
|
83
83
|
icon: "ico-ep:loading"
|
|
84
84
|
}, null, 8, ["class"]))
|
|
85
|
-
], 64)) : (
|
|
86
|
-
|
|
85
|
+
], 64)) : (d = s.value) != null && d.icon ? (n(), a(e(g), F(m({ key: 1 }, s.value)), null, 16)) : b("", !0),
|
|
86
|
+
o.$slots.default ? (n(), y("span", {
|
|
87
87
|
key: 2,
|
|
88
|
-
class: k({ [e(
|
|
88
|
+
class: k({ [e(t).em("text", "expand")]: e(u) })
|
|
89
89
|
}, [
|
|
90
|
-
f(
|
|
90
|
+
f(o.$slots, "default")
|
|
91
91
|
], 2)) : b("", !0)
|
|
92
92
|
];
|
|
93
93
|
}),
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as l, openBlock as t, createElementBlock as s, normalizeClass as r, unref as
|
|
2
|
-
import { useNamespace as
|
|
1
|
+
import { defineComponent as l, openBlock as t, createElementBlock as s, normalizeClass as r, unref as o, renderSlot as d, createTextVNode as m, toDisplayString as n, createCommentVNode as i, createElementVNode as p, normalizeStyle as c } from "vue";
|
|
2
|
+
import { useNamespace as f } from "../../hooks/use-namespace/index.js";
|
|
3
3
|
import "@popperjs/core";
|
|
4
4
|
import "lodash";
|
|
5
5
|
import "../../hooks/use-z-index/index.js";
|
|
6
6
|
import "@vueuse/core";
|
|
7
7
|
import "@vft/utils";
|
|
8
8
|
import "../../utils/ns-cover.js";
|
|
9
|
-
const
|
|
9
|
+
const a = (
|
|
10
10
|
/* hoist-static*/
|
|
11
|
-
|
|
12
|
-
),
|
|
13
|
-
name:
|
|
11
|
+
f("card")
|
|
12
|
+
), u = l({
|
|
13
|
+
name: "vft-card"
|
|
14
14
|
}), V = /* @__PURE__ */ l({
|
|
15
|
-
...
|
|
15
|
+
...u,
|
|
16
16
|
props: {
|
|
17
17
|
header: { default: "" },
|
|
18
18
|
bodyStyle: { default: "" },
|
|
@@ -20,19 +20,19 @@ const o = (
|
|
|
20
20
|
},
|
|
21
21
|
setup(h) {
|
|
22
22
|
return (e, y) => (t(), s("div", {
|
|
23
|
-
class: r([a
|
|
23
|
+
class: r([o(a).b(), o(a).is(`${e.shadow}-shadow`)])
|
|
24
24
|
}, [
|
|
25
25
|
e.$slots.header || e.header ? (t(), s("div", {
|
|
26
26
|
key: 0,
|
|
27
|
-
class: r(a
|
|
27
|
+
class: r(o(a).e("header"))
|
|
28
28
|
}, [
|
|
29
29
|
d(e.$slots, "header", {}, () => [
|
|
30
30
|
m(n(e.header), 1)
|
|
31
31
|
])
|
|
32
32
|
], 2)) : i("", !0),
|
|
33
33
|
p("div", {
|
|
34
|
-
class: r(a
|
|
35
|
-
style:
|
|
34
|
+
class: r(o(a).e("body")),
|
|
35
|
+
style: c(e.bodyStyle)
|
|
36
36
|
}, [
|
|
37
37
|
d(e.$slots, "default")
|
|
38
38
|
], 6)
|
|
@@ -7,22 +7,22 @@ import "../../hooks/use-z-index/index.js";
|
|
|
7
7
|
import "@vueuse/core";
|
|
8
8
|
import "@vft/utils";
|
|
9
9
|
import "../../utils/ns-cover.js";
|
|
10
|
-
const
|
|
10
|
+
const t = (
|
|
11
11
|
/* hoist-static*/
|
|
12
12
|
h("check-tag")
|
|
13
|
-
),
|
|
14
|
-
name:
|
|
13
|
+
), k = o({
|
|
14
|
+
name: "vft-check-tag"
|
|
15
15
|
}), x = /* @__PURE__ */ o({
|
|
16
|
-
...
|
|
16
|
+
...k,
|
|
17
17
|
props: {
|
|
18
18
|
checked: { type: Boolean, default: !1 }
|
|
19
19
|
},
|
|
20
20
|
emits: ["update:checked", "change"],
|
|
21
|
-
setup(e, { emit:
|
|
22
|
-
const a = s(() => [
|
|
23
|
-
|
|
21
|
+
setup(e, { emit: c }) {
|
|
22
|
+
const a = s(() => [t.b(), t.is("checked", e.checked)]), n = () => {
|
|
23
|
+
c(i, !e.checked), c("update:checked", !e.checked);
|
|
24
24
|
};
|
|
25
|
-
return (r,
|
|
25
|
+
return (r, u) => (m(), l("span", {
|
|
26
26
|
class: d(a.value),
|
|
27
27
|
onClick: n
|
|
28
28
|
}, [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as S, useSlots as K, computed as c, openBlock as i, createBlock as L, resolveDynamicComponent as O, unref as a, normalizeClass as s, withCtx as R, createElementVNode as y, withDirectives as
|
|
1
|
+
import { defineComponent as S, useSlots as K, computed as c, openBlock as i, createBlock as L, resolveDynamicComponent as O, unref as a, normalizeClass as s, withCtx as R, createElementVNode as y, withDirectives as h, createElementBlock as r, isRef as C, vModelCheckbox as B, createTextVNode as V, toDisplayString as g, Fragment as N, renderSlot as U, createCommentVNode as b } from "vue";
|
|
2
2
|
import { useNamespace as j } from "../../hooks/use-namespace/index.js";
|
|
3
3
|
import "@popperjs/core";
|
|
4
4
|
import "lodash";
|
|
@@ -7,12 +7,12 @@ import "@vueuse/core";
|
|
|
7
7
|
import "@vft/utils";
|
|
8
8
|
import "../../utils/ns-cover.js";
|
|
9
9
|
import "../form/index.js";
|
|
10
|
-
import { useCheckbox as
|
|
11
|
-
const
|
|
10
|
+
import { useCheckbox as x } from "./composables/use-checkbox.js";
|
|
11
|
+
const M = ["tabindex", "role", "aria-checked"], T = ["id", "aria-hidden", "name", "tabindex", "disabled", "true-value", "false-value"], q = ["id", "aria-hidden", "disabled", "value", "name", "tabindex"], n = (
|
|
12
12
|
/* hoist-static*/
|
|
13
13
|
j("checkbox")
|
|
14
14
|
), A = S({
|
|
15
|
-
name:
|
|
15
|
+
name: "vft-checkbox"
|
|
16
16
|
}), ee = /* @__PURE__ */ S({
|
|
17
17
|
...A,
|
|
18
18
|
props: {
|
|
@@ -45,7 +45,7 @@ const T = ["tabindex", "role", "aria-checked"], q = ["id", "aria-hidden", "name"
|
|
|
45
45
|
model: t,
|
|
46
46
|
handleChange: m,
|
|
47
47
|
onClickRoot: z
|
|
48
|
-
} =
|
|
48
|
+
} = x(p, F), E = c(() => [
|
|
49
49
|
n.b(),
|
|
50
50
|
n.m(w.value),
|
|
51
51
|
n.is("disabled", u.value),
|
|
@@ -70,10 +70,10 @@ const T = ["tabindex", "role", "aria-checked"], q = ["id", "aria-hidden", "name"
|
|
|
70
70
|
role: e.indeterminate ? "checkbox" : void 0,
|
|
71
71
|
"aria-checked": e.indeterminate ? "mixed" : void 0
|
|
72
72
|
}, [
|
|
73
|
-
e.trueValue || e.falseValue ?
|
|
73
|
+
e.trueValue || e.falseValue ? h((i(), r("input", {
|
|
74
74
|
key: 0,
|
|
75
75
|
id: a(v),
|
|
76
|
-
"onUpdate:modelValue": l[0] || (l[0] = (o) =>
|
|
76
|
+
"onUpdate:modelValue": l[0] || (l[0] = (o) => C(t) ? t.value = o : null),
|
|
77
77
|
class: s(a(n).e("original")),
|
|
78
78
|
type: "checkbox",
|
|
79
79
|
"aria-hidden": e.indeterminate ? "true" : "false",
|
|
@@ -86,12 +86,12 @@ const T = ["tabindex", "role", "aria-checked"], q = ["id", "aria-hidden", "name"
|
|
|
86
86
|
(...o) => a(m) && a(m)(...o)),
|
|
87
87
|
onFocus: l[2] || (l[2] = (o) => d.value = !0),
|
|
88
88
|
onBlur: l[3] || (l[3] = (o) => d.value = !1)
|
|
89
|
-
}, null, 42,
|
|
89
|
+
}, null, 42, T)), [
|
|
90
90
|
[B, a(t)]
|
|
91
|
-
]) :
|
|
91
|
+
]) : h((i(), r("input", {
|
|
92
92
|
key: 1,
|
|
93
93
|
id: a(v),
|
|
94
|
-
"onUpdate:modelValue": l[4] || (l[4] = (o) =>
|
|
94
|
+
"onUpdate:modelValue": l[4] || (l[4] = (o) => C(t) ? t.value = o : null),
|
|
95
95
|
class: s(a(n).e("original")),
|
|
96
96
|
type: "checkbox",
|
|
97
97
|
"aria-hidden": e.indeterminate ? "true" : "false",
|
|
@@ -103,13 +103,13 @@ const T = ["tabindex", "role", "aria-checked"], q = ["id", "aria-hidden", "name"
|
|
|
103
103
|
(...o) => a(m) && a(m)(...o)),
|
|
104
104
|
onFocus: l[6] || (l[6] = (o) => d.value = !0),
|
|
105
105
|
onBlur: l[7] || (l[7] = (o) => d.value = !1)
|
|
106
|
-
}, null, 42,
|
|
106
|
+
}, null, 42, q)), [
|
|
107
107
|
[B, a(t)]
|
|
108
108
|
]),
|
|
109
109
|
y("span", {
|
|
110
110
|
class: s(a(n).e("inner"))
|
|
111
111
|
}, null, 2)
|
|
112
|
-
], 10,
|
|
112
|
+
], 10, M),
|
|
113
113
|
a(f) ? (i(), r("span", {
|
|
114
114
|
key: 0,
|
|
115
115
|
class: s(a(n).e("label"))
|