vft 0.0.451 → 0.0.452
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 +1 -1
- package/es/components/alert/alert.vue.d.ts +2 -1
- package/es/components/alert/alert.vue2.js +1 -1
- package/es/components/autocomplete/autocomplete.vue.d.ts +3 -2
- package/es/components/autocomplete/autocomplete.vue2.js +18 -18
- package/es/components/avatar/avatar.vue.d.ts +1 -1
- package/es/components/button/button-group.vue.d.ts +1 -1
- package/es/components/button/button-group.vue2.js +1 -1
- package/es/components/carousel/carousel.vue2.js +1 -1
- package/es/components/carousel/use-carousel.js +1 -1
- package/es/components/cascader/cascader.vue2.js +4 -7
- package/es/components/cascader-panel/node.vue2.js +1 -1
- package/es/components/check-tag/check-tag.vue2.js +2 -2
- package/es/components/checkbox/checkbox-group.vue.d.ts +1 -1
- package/es/components/clamp-toggle/clamp-toggle.vue2.js +1 -1
- package/es/components/col/col.vue2.js +6 -6
- package/es/components/color-picker/color-picker.vue.d.ts +1 -1
- package/es/components/color-picker/components/hue-slider.vue.js +4 -4
- package/es/components/color-picker/components/sv-panel.vue.js +4 -4
- package/es/components/context-menu/context-menu.vue.d.ts +1 -1
- package/es/components/context-menu/context-menu.vue2.js +15 -18
- package/es/components/date-picker/date-picker-com/basic-year-table.vue2.js +2 -2
- package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +1 -1
- package/es/components/date-time-select/date-time-select.vue2.js +38 -39
- package/es/components/dialog/dialog.vue.d.ts +1 -1
- package/es/components/drawer/drawer.vue.d.ts +1 -1
- package/es/components/dropdown/dropdown.vue.d.ts +1 -1
- package/es/components/dropdown/dropdown.vue2.js +1 -1
- package/es/components/full-screen/full-screen.vue.d.ts +1 -1
- package/es/components/header-layout/header-layout.vue.d.ts +1 -1
- package/es/components/horizontal-menu/horizontal-menu.vue.d.ts +2 -2
- package/es/components/horizontal-menu/horizontal-menu.vue2.js +15 -15
- package/es/components/icon/icon.vue.d.ts +1 -1
- package/es/components/icon-text/icon-text.vue2.js +12 -12
- package/es/components/iframe-layout/iframe-layout.vue.d.ts +1 -1
- package/es/components/image/image.vue2.js +1 -1
- package/es/components/image-viewer/image-viewer.vue2.js +1 -1
- package/es/components/input/input.vue2.js +4 -4
- package/es/components/input-number/input-number.vue2.js +1 -1
- package/es/components/input-tag/composables/use-input-tag.js +1 -1
- package/es/components/link/link.vue2.js +10 -11
- package/es/components/list-cell/list-cell.vue.d.ts +1 -1
- package/es/components/list-cell/list-cell.vue2.js +1 -1
- package/es/components/modal/modal.vue.d.ts +1 -1
- package/es/components/multiple-tabs/multiple-tabs.vue.d.ts +1 -1
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +11 -13
- package/es/components/multiple-tabs/tab-content.vue.d.ts +1 -1
- package/es/components/multiple-tabs/tab-content.vue2.js +7 -8
- package/es/components/overlay/overlay.vue2.js +5 -5
- package/es/components/pagination/components/jumper.vue.d.ts +1 -1
- package/es/components/pagination/components/pager.vue2.js +2 -12
- package/es/components/pagination/pagination.vue2.js +1 -1
- package/es/components/popconfirm/popconfirm.vue.d.ts +2 -2
- package/es/components/popper/trigger.vue2.js +13 -13
- package/es/components/progress/index.d.ts +3 -3
- package/es/components/qrcode/qrcode.vue.d.ts +1 -1
- package/es/components/radio/radio-button.vue2.js +4 -4
- package/es/components/radio/radio-group.vue.d.ts +1 -1
- package/es/components/radio/radio.vue2.js +1 -1
- package/es/components/rate/rate.vue2.js +4 -4
- package/es/components/result/result.vue.d.ts +1 -1
- package/es/components/router-view-content/router-view-content.vue.d.ts +1 -1
- package/es/components/router-view-content/router-view-content.vue2.js +2 -3
- package/es/components/scrollbar/scrollbar.vue2.js +16 -16
- package/es/components/skeleton/skeleton-item.vue.d.ts +1 -1
- package/es/components/slider/button.vue.d.ts +1 -1
- package/es/components/slider/button.vue2.js +1 -1
- package/es/components/slider/slider.vue.d.ts +1 -1
- package/es/components/slider/slider.vue2.js +1 -1
- package/es/components/super-form/super-form-item.vue2.js +1 -1
- package/es/components/super-form/super-form.vue2.js +1 -1
- package/es/components/switch/switch.vue2.js +1 -1
- package/es/components/table/index.d.ts +9 -0
- package/es/components/table/table.vue2.js +36 -32
- package/es/components/table/types.d.ts +1 -0
- package/es/components/tabs/tab-bar.vue.d.ts +1 -1
- package/es/components/tabs/tab-nav.vue.d.ts +1 -1
- package/es/components/tabs/tabs.vue.d.ts +3 -3
- package/es/components/tag/tag.vue.d.ts +1 -1
- package/es/components/time-picker/time-picker-com/basic-time-spinner.vue2.js +25 -25
- package/es/components/time-picker/time-picker-com/panel-time-pick.vue2.js +2 -3
- package/es/components/time-picker/time-picker-com/panel-time-range.vue2.js +2 -3
- package/es/components/time-select/time-select.vue2.js +2 -1
- package/es/components/timeline/timeline-item.vue.d.ts +1 -1
- package/es/components/tooltip/trigger.vue.d.ts +1 -1
- package/es/components/tree/tree-node.vue.js +1 -1
- package/es/components/upload/upload-content.vue2.js +3 -1
- package/es/components/upload/upload.vue2.js +1 -1
- package/es/components/watermark/watermark.vue2.js +2 -2
- package/es/hooks/use-z-index/index.js +3 -3
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/es/utils/vue/vnode.js +1 -1
- package/lib/components/affix/affix.vue2.cjs +1 -1
- package/lib/components/alert/alert.vue.d.ts +2 -1
- package/lib/components/alert/alert.vue2.cjs +1 -1
- package/lib/components/autocomplete/autocomplete.vue.d.ts +3 -2
- package/lib/components/autocomplete/autocomplete.vue2.cjs +1 -1
- package/lib/components/avatar/avatar.vue.d.ts +1 -1
- package/lib/components/button/button-group.vue.d.ts +1 -1
- package/lib/components/button/button-group.vue2.cjs +1 -1
- package/lib/components/carousel/carousel.vue2.cjs +1 -1
- package/lib/components/cascader/cascader.vue2.cjs +1 -1
- package/lib/components/cascader-panel/node.vue2.cjs +1 -1
- package/lib/components/check-tag/check-tag.vue2.cjs +1 -1
- package/lib/components/checkbox/checkbox-group.vue.d.ts +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/color-picker/color-picker.vue.d.ts +1 -1
- package/lib/components/color-picker/components/hue-slider.vue.cjs +1 -1
- package/lib/components/color-picker/components/sv-panel.vue.cjs +1 -1
- package/lib/components/context-menu/context-menu.vue.d.ts +1 -1
- package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/basic-year-table.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
- package/lib/components/date-time-select/date-time-select.vue2.cjs +1 -1
- package/lib/components/dialog/dialog.vue.d.ts +1 -1
- package/lib/components/drawer/drawer.vue.d.ts +1 -1
- package/lib/components/dropdown/dropdown.vue.d.ts +1 -1
- package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
- package/lib/components/full-screen/full-screen.vue.d.ts +1 -1
- package/lib/components/header-layout/header-layout.vue.d.ts +1 -1
- package/lib/components/horizontal-menu/horizontal-menu.vue.d.ts +2 -2
- package/lib/components/horizontal-menu/horizontal-menu.vue2.cjs +1 -1
- package/lib/components/icon/icon.vue.d.ts +1 -1
- package/lib/components/icon-text/icon-text.vue2.cjs +1 -1
- package/lib/components/iframe-layout/iframe-layout.vue.d.ts +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/input/input.vue2.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.vue.d.ts +1 -1
- package/lib/components/list-cell/list-cell.vue2.cjs +1 -1
- package/lib/components/modal/modal.vue.d.ts +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue.d.ts +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/tab-content.vue.d.ts +1 -1
- package/lib/components/multiple-tabs/tab-content.vue2.cjs +1 -1
- package/lib/components/overlay/overlay.vue2.cjs +1 -1
- package/lib/components/pagination/components/jumper.vue.d.ts +1 -1
- package/lib/components/pagination/components/pager.vue2.cjs +1 -1
- package/lib/components/pagination/pagination.vue2.cjs +1 -1
- package/lib/components/popconfirm/popconfirm.vue.d.ts +2 -2
- package/lib/components/progress/index.d.ts +3 -3
- package/lib/components/qrcode/qrcode.vue.d.ts +1 -1
- package/lib/components/radio/radio-button.vue2.cjs +1 -1
- package/lib/components/radio/radio-group.vue.d.ts +1 -1
- package/lib/components/radio/radio.vue2.cjs +1 -1
- package/lib/components/rate/rate.vue2.cjs +1 -1
- package/lib/components/result/result.vue.d.ts +1 -1
- package/lib/components/router-view-content/router-view-content.vue.d.ts +1 -1
- package/lib/components/router-view-content/router-view-content.vue2.cjs +1 -1
- package/lib/components/scrollbar/scrollbar.vue2.cjs +1 -1
- package/lib/components/skeleton/skeleton-item.vue.d.ts +1 -1
- package/lib/components/slider/button.vue.d.ts +1 -1
- package/lib/components/slider/button.vue2.cjs +1 -1
- package/lib/components/slider/slider.vue.d.ts +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/index.d.ts +9 -0
- package/lib/components/table/table.vue2.cjs +1 -1
- package/lib/components/table/types.d.ts +1 -0
- package/lib/components/tabs/tab-bar.vue.d.ts +1 -1
- package/lib/components/tabs/tab-nav.vue.d.ts +1 -1
- package/lib/components/tabs/tabs.vue.d.ts +3 -3
- package/lib/components/tag/tag.vue.d.ts +1 -1
- package/lib/components/time-picker/time-picker-com/basic-time-spinner.vue2.cjs +1 -1
- package/lib/components/time-picker/time-picker-com/panel-time-pick.vue2.cjs +1 -1
- package/lib/components/time-picker/time-picker-com/panel-time-range.vue2.cjs +1 -1
- package/lib/components/time-select/time-select.vue2.cjs +1 -1
- package/lib/components/timeline/timeline-item.vue.d.ts +1 -1
- package/lib/components/tooltip/trigger.vue.d.ts +1 -1
- package/lib/components/tree/tree-node.vue.cjs +1 -1
- package/lib/components/upload/upload.vue2.cjs +1 -1
- package/lib/components/watermark/watermark.vue2.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +5 -5
- package/web-types.json +1 -1
|
@@ -18,7 +18,7 @@ const G = $({
|
|
|
18
18
|
props: F,
|
|
19
19
|
emits: D,
|
|
20
20
|
setup(T, { expose: z, emit: B }) {
|
|
21
|
-
const
|
|
21
|
+
const e = T, p = B, i = A("affix"), a = m(), f = m(), l = m(), { height: r } = P(), {
|
|
22
22
|
height: s,
|
|
23
23
|
width: d,
|
|
24
24
|
top: h,
|
|
@@ -27,7 +27,7 @@ const D = C({
|
|
|
27
27
|
close: (e) => e instanceof MouseEvent
|
|
28
28
|
},
|
|
29
29
|
setup(e, { emit: h }) {
|
|
30
|
-
const t = I("alert"),
|
|
30
|
+
const B = h, t = I("alert"), m = g(), d = N(!0), f = a(() => e.type), T = a(() => [
|
|
31
31
|
t.e("icon"),
|
|
32
32
|
{ [t.is("big")]: !!e.description || !!m.default }
|
|
33
33
|
]), w = a(() => ({ [t.is("bold")]: e.description || m.default })), v = (n) => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { nextTick
|
|
2
|
-
import
|
|
1
|
+
import { nextTick } from 'vue';
|
|
2
|
+
import type { StyleValue } from 'vue';
|
|
3
|
+
import type { AutocompleteData, AutocompleteFetchSuggestions, Placement } from './types';
|
|
3
4
|
export interface AutocompleteProps {
|
|
4
5
|
valueKey?: string;
|
|
5
6
|
modelValue?: string | number;
|
|
@@ -50,9 +50,9 @@ const Ke = ["aria-expanded", "aria-owns"], Oe = ["id", "aria-selected", "onClick
|
|
|
50
50
|
select: (t) => ke(t)
|
|
51
51
|
},
|
|
52
52
|
setup(t, { expose: X, emit: Y }) {
|
|
53
|
-
const i = Fe("autocomplete"),
|
|
53
|
+
const i = Y, u = Fe("autocomplete"), Z = Ve(), _ = ve(), O = De(), o = c(), R = c(), S = c(), x = c();
|
|
54
54
|
let M = !1, T = !1;
|
|
55
|
-
const r = c([]), l = c(-1), P = c(""), f = c(!1), w = c(!1), m = c(!1), g = b(() =>
|
|
55
|
+
const r = c([]), l = c(-1), P = c(""), f = c(!1), w = c(!1), m = c(!1), g = b(() => u.b(String(Ne()))), ee = b(() => _.style), d = b(() => (r.value.length > 0 || m.value) && f.value), W = b(() => !t.hideLoading && m.value), te = b(() => o.value ? Array.from(
|
|
56
56
|
o.value.$el.querySelectorAll("input")
|
|
57
57
|
) : []), le = async () => {
|
|
58
58
|
await Ee(), d.value && (P.value = `${o.value.$el.offsetWidth}px`);
|
|
@@ -71,7 +71,7 @@ const Ke = ["aria-expanded", "aria-owns"], Oe = ["id", "aria-selected", "onClick
|
|
|
71
71
|
}
|
|
72
72
|
}, t.debounce), oe = (e) => {
|
|
73
73
|
const a = !!e;
|
|
74
|
-
if (
|
|
74
|
+
if (i(K, e), i(A, e), w.value = !1, f.value ||= a, !t.triggerOnFocus && !e) {
|
|
75
75
|
w.value = !0, r.value = [];
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
@@ -79,21 +79,21 @@ const Ke = ["aria-expanded", "aria-owns"], Oe = ["id", "aria-selected", "onClick
|
|
|
79
79
|
}, se = (e) => {
|
|
80
80
|
O.value || (e.target?.tagName !== "INPUT" || te.value.includes(document.activeElement)) && (f.value = !0);
|
|
81
81
|
}, ne = (e) => {
|
|
82
|
-
|
|
82
|
+
i(J, e);
|
|
83
83
|
}, ie = (e) => {
|
|
84
|
-
T ? T = !1 : (f.value = !0,
|
|
84
|
+
T ? T = !1 : (f.value = !0, i("focus", e), t.triggerOnFocus && !M && L(String(t.modelValue)));
|
|
85
85
|
}, ue = (e) => {
|
|
86
86
|
setTimeout(() => {
|
|
87
87
|
if (S.value?.isFocusInsideContent()) {
|
|
88
88
|
T = !0;
|
|
89
89
|
return;
|
|
90
90
|
}
|
|
91
|
-
f.value && h(),
|
|
91
|
+
f.value && h(), i("blur", e);
|
|
92
92
|
});
|
|
93
93
|
}, re = () => {
|
|
94
|
-
f.value = !1,
|
|
94
|
+
f.value = !1, i(A, ""), i("clear");
|
|
95
95
|
}, U = async () => {
|
|
96
|
-
d.value && l.value >= 0 && l.value < r.value.length ? V(r.value[l.value]) : t.selectWhenUnmatched && (
|
|
96
|
+
d.value && l.value >= 0 && l.value < r.value.length ? V(r.value[l.value]) : t.selectWhenUnmatched && (i("select", { value: t.modelValue }), r.value = [], l.value = -1);
|
|
97
97
|
}, ce = (e) => {
|
|
98
98
|
d.value && (e.preventDefault(), e.stopPropagation(), h());
|
|
99
99
|
}, h = () => {
|
|
@@ -103,7 +103,7 @@ const Ke = ["aria-expanded", "aria-owns"], Oe = ["id", "aria-selected", "onClick
|
|
|
103
103
|
}, de = () => {
|
|
104
104
|
o.value?.blur();
|
|
105
105
|
}, V = async (e) => {
|
|
106
|
-
|
|
106
|
+
i(K, e[t.valueKey]), i(A, e[t.valueKey]), i("select", e), r.value = [], l.value = -1;
|
|
107
107
|
}, C = (e) => {
|
|
108
108
|
if (!d.value || m.value) return;
|
|
109
109
|
if (e < 0) {
|
|
@@ -112,9 +112,9 @@ const Ke = ["aria-expanded", "aria-owns"], Oe = ["id", "aria-selected", "onClick
|
|
|
112
112
|
}
|
|
113
113
|
e >= r.value.length && (e = r.value.length - 1);
|
|
114
114
|
const a = R.value.querySelector(
|
|
115
|
-
`.${
|
|
115
|
+
`.${u.be("suggestion", "wrap")}`
|
|
116
116
|
), p = a.querySelectorAll(
|
|
117
|
-
`.${
|
|
117
|
+
`.${u.be("suggestion", "list")} li`
|
|
118
118
|
)[e], I = a.scrollTop, { offsetTop: H, scrollHeight: B } = p;
|
|
119
119
|
H + B > I + a.clientHeight && (a.scrollTop += B), H < I && (a.scrollTop -= B), l.value = e, o.value.ref.setAttribute(
|
|
120
120
|
"aria-activedescendant",
|
|
@@ -159,14 +159,14 @@ const Ke = ["aria-expanded", "aria-owns"], Oe = ["id", "aria-selected", "onClick
|
|
|
159
159
|
visible: d.value,
|
|
160
160
|
placement: t.placement,
|
|
161
161
|
"fallback-placements": ["bottom-start", "top-start"],
|
|
162
|
-
"popper-class": [s(
|
|
162
|
+
"popper-class": [s(u).e("popper"), t.popperClass],
|
|
163
163
|
teleported: t.teleported,
|
|
164
164
|
"gpu-acceleration": !1,
|
|
165
165
|
pure: "",
|
|
166
166
|
"manual-mode": "",
|
|
167
167
|
effect: "light",
|
|
168
168
|
trigger: "click",
|
|
169
|
-
transition: `${s(
|
|
169
|
+
transition: `${s(u).namespace.value}-zoom-in-top`,
|
|
170
170
|
persistent: "",
|
|
171
171
|
onBeforeShow: le,
|
|
172
172
|
onHide: ae
|
|
@@ -175,7 +175,7 @@ const Ke = ["aria-expanded", "aria-owns"], Oe = ["id", "aria-selected", "onClick
|
|
|
175
175
|
q("div", {
|
|
176
176
|
ref_key: "regionRef",
|
|
177
177
|
ref: R,
|
|
178
|
-
class: k([s(
|
|
178
|
+
class: k([s(u).b("suggestion"), s(u).is("loading", W.value)]),
|
|
179
179
|
style: z({
|
|
180
180
|
[t.fitInputWidth ? "width" : "minWidth"]: P.value,
|
|
181
181
|
outline: "none"
|
|
@@ -185,14 +185,14 @@ const Ke = ["aria-expanded", "aria-owns"], Oe = ["id", "aria-selected", "onClick
|
|
|
185
185
|
G(s(Se), {
|
|
186
186
|
id: g.value,
|
|
187
187
|
tag: "ul",
|
|
188
|
-
"wrap-class": s(
|
|
189
|
-
"view-class": s(
|
|
188
|
+
"wrap-class": s(u).be("suggestion", "wrap"),
|
|
189
|
+
"view-class": s(u).be("suggestion", "list"),
|
|
190
190
|
role: "listbox"
|
|
191
191
|
}, {
|
|
192
192
|
default: v(() => [
|
|
193
193
|
W.value ? (E(), F("li", {
|
|
194
194
|
key: 0,
|
|
195
|
-
class: k(s(
|
|
195
|
+
class: k(s(u).is("loading"))
|
|
196
196
|
}, null, 2)) : (E(!0), F(be, { key: 1 }, ye(r.value, (n, p) => (E(), F("li", {
|
|
197
197
|
id: `${g.value}-item-${p}`,
|
|
198
198
|
key: p,
|
|
@@ -214,7 +214,7 @@ const Ke = ["aria-expanded", "aria-owns"], Oe = ["id", "aria-selected", "onClick
|
|
|
214
214
|
q("div", {
|
|
215
215
|
ref_key: "listboxRef",
|
|
216
216
|
ref: x,
|
|
217
|
-
class: k([s(
|
|
217
|
+
class: k([s(u).b(), e.$attrs.class]),
|
|
218
218
|
style: z(ee.value),
|
|
219
219
|
role: "combobox",
|
|
220
220
|
"aria-haspopup": "listbox",
|
|
@@ -36,7 +36,7 @@ const se = ["onMouseenter", "onClick"], le = { key: 0 }, ue = {
|
|
|
36
36
|
},
|
|
37
37
|
emits: ["change"],
|
|
38
38
|
setup(i, { expose: z, emit: G }) {
|
|
39
|
-
const t = ie("carousel"),
|
|
39
|
+
const N = G, t = ie("carousel"), P = _(), {
|
|
40
40
|
root: x,
|
|
41
41
|
activeIndex: u,
|
|
42
42
|
arrowDisplay: k,
|
|
@@ -11,7 +11,7 @@ import "../../hooks/use-model-toggle/index.js";
|
|
|
11
11
|
import { useOrderedChildren as ge } from "../../hooks/use-ordered-children/index.js";
|
|
12
12
|
import "@popperjs/core";
|
|
13
13
|
import "../../hooks/use-z-index/index.js";
|
|
14
|
-
import {
|
|
14
|
+
import { carouselContextKey as Se, CAROUSEL_ITEM_NAME as H } from "./constants.js";
|
|
15
15
|
const L = 300, ze = (t, O, M) => {
|
|
16
16
|
const {
|
|
17
17
|
children: o,
|
|
@@ -31,7 +31,7 @@ const Tt = { key: 0 }, wt = ["placeholder"], Vt = ["onClick"], $t = "VftCascader
|
|
|
31
31
|
props: Ct,
|
|
32
32
|
emits: kt,
|
|
33
33
|
setup(Se, { expose: Ne, emit: Pe }) {
|
|
34
|
-
const De = {
|
|
34
|
+
const n = Se, C = Pe, De = {
|
|
35
35
|
modifiers: [
|
|
36
36
|
{
|
|
37
37
|
name: "arrowPosition",
|
|
@@ -44,7 +44,7 @@ const Tt = { key: 0 }, wt = ["placeholder"], Vt = ["onClick"], $t = "VftCascader
|
|
|
44
44
|
requires: ["arrow"]
|
|
45
45
|
}
|
|
46
46
|
]
|
|
47
|
-
},
|
|
47
|
+
}, ne = Xe();
|
|
48
48
|
let N = 0, U = 0;
|
|
49
49
|
const a = $e("cascader"), G = $e("input"), { form: Ie, formItem: re } = yt(), { valueOnClear: xe } = ht(n), { isComposing: ie, handleComposition: k } = gt({
|
|
50
50
|
afterComposition(e) {
|
|
@@ -75,10 +75,7 @@ const Tt = { key: 0 }, wt = ["placeholder"], Vt = ["onClick"], $t = "VftCascader
|
|
|
75
75
|
a.m(K.value),
|
|
76
76
|
a.is("disabled", b.value),
|
|
77
77
|
ne.class
|
|
78
|
-
]), Ke = i(() => [
|
|
79
|
-
G.e("icon"),
|
|
80
|
-
a.is("reverse", g.value)
|
|
81
|
-
]), Oe = i(() => a.is("focus", g.value || Q.value)), me = i(() => j.value?.popperRef?.contentRef), p = (e) => {
|
|
78
|
+
]), Ke = i(() => [G.e("icon"), a.is("reverse", g.value)]), Oe = i(() => a.is("focus", g.value || Q.value)), me = i(() => j.value?.popperRef?.contentRef), p = (e) => {
|
|
82
79
|
b.value || (e = e ?? !g.value, e !== g.value && (g.value = e, P.value?.input?.setAttribute("aria-expanded", `${e}`), e ? (D(), x(f.value?.scrollToExpandingNode)) : n.filterable && ee(), C("visibleChange", e)));
|
|
83
80
|
}, D = () => {
|
|
84
81
|
x(() => {
|
|
@@ -303,7 +300,7 @@ const Tt = { key: 0 }, wt = ["placeholder"], Vt = ["onClick"], $t = "VftCascader
|
|
|
303
300
|
Me.value ? (r(), w(s(ae), {
|
|
304
301
|
key: "clear",
|
|
305
302
|
icon: "icon-circle-close",
|
|
306
|
-
class: d([s(G).e("icon")
|
|
303
|
+
class: d(["icon-circle-close", [s(G).e("icon")]]),
|
|
307
304
|
onClick: z(Ue, ["stop"])
|
|
308
305
|
}, null, 8, ["class"])) : (r(), w(s(ae), {
|
|
309
306
|
icon: "icon-arrow-down",
|
|
@@ -112,7 +112,7 @@ const G = ["id", "aria-haspopup", "aria-owns", "aria-expanded", "tabindex"], Q =
|
|
|
112
112
|
}, null, 8, ["class"])) : (u(), m(n(x), {
|
|
113
113
|
key: 1,
|
|
114
114
|
icon: "icon-arrow-right",
|
|
115
|
-
class: f(["arrow-right", n(c).e("postfix")])
|
|
115
|
+
class: f(["arrow-right", [n(c).e("postfix")]])
|
|
116
116
|
}, null, 8, ["class"]))
|
|
117
117
|
], 64))
|
|
118
118
|
], 42, G));
|
|
@@ -18,8 +18,8 @@ const u = o({
|
|
|
18
18
|
},
|
|
19
19
|
emits: ["update:checked", "change"],
|
|
20
20
|
setup(e, { emit: a }) {
|
|
21
|
-
const t = k("check-tag"),
|
|
22
|
-
|
|
21
|
+
const t = a, c = k("check-tag"), n = s(() => [c.b(), c.is("checked", e.checked)]), m = () => {
|
|
22
|
+
t(h, !e.checked), t("update:checked", !e.checked);
|
|
23
23
|
};
|
|
24
24
|
return (r, f) => (p(), i("span", {
|
|
25
25
|
class: l(n.value),
|
|
@@ -46,7 +46,7 @@ const y = ["onClick"], k = a({
|
|
|
46
46
|
after: d(({ toggle: m, expanded: t, clamped: r }) => [
|
|
47
47
|
t || r ? (o(), u("span", {
|
|
48
48
|
key: 0,
|
|
49
|
-
class: f(["cursor-pointer", l(i).e("more")]),
|
|
49
|
+
class: f(["cursor-pointer", [l(i).e("more")]]),
|
|
50
50
|
onClick: m
|
|
51
51
|
}, p(t ? e.toggleText[1] : e.toggleText[0]), 11, y)) : x("", !0)
|
|
52
52
|
]),
|
|
@@ -27,23 +27,23 @@ const E = f({
|
|
|
27
27
|
push: { default: 0 }
|
|
28
28
|
},
|
|
29
29
|
setup(r) {
|
|
30
|
-
const s = C("col"),
|
|
30
|
+
const s = r, o = C("col"), { gutter: a } = d(j, { gutter: n(() => 0) }), i = n(() => {
|
|
31
31
|
const e = {};
|
|
32
32
|
return a.value && (e.paddingLeft = e.paddingRight = `${a.value / 2}px`), e;
|
|
33
33
|
}), m = n(() => {
|
|
34
34
|
const e = [];
|
|
35
35
|
return ["span", "offset", "pull", "push"].forEach((t) => {
|
|
36
|
-
const l =
|
|
37
|
-
c(l) && (t === "span" ? e.push(
|
|
36
|
+
const l = s[t];
|
|
37
|
+
c(l) && (t === "span" ? e.push(o.b(`${s[t]}`)) : l > 0 && e.push(o.b(`${t}-${s[t]}`)));
|
|
38
38
|
}), ["xs", "sm", "md", "lg", "xl"].forEach((t) => {
|
|
39
|
-
c(
|
|
39
|
+
c(s[t]) ? e.push(o.b(`${t}-${s[t]}`)) : _(s[t]) && Object.entries(s[t]).forEach(
|
|
40
40
|
([l, u]) => {
|
|
41
41
|
e.push(
|
|
42
|
-
l !== "span" ?
|
|
42
|
+
l !== "span" ? o.b(`${t}-${l}-${u}`) : o.b(`${t}-${u}`)
|
|
43
43
|
);
|
|
44
44
|
}
|
|
45
45
|
);
|
|
46
|
-
}), a.value && e.push(
|
|
46
|
+
}), a.value && e.push(o.is("guttered")), [o.b(), e];
|
|
47
47
|
});
|
|
48
48
|
return (e, p) => ($(), h(g(r.tag), {
|
|
49
49
|
class: v(m.value),
|
|
@@ -14,13 +14,13 @@ function p(e, r, f, d, u, b) {
|
|
|
14
14
|
ref: "thumb",
|
|
15
15
|
class: l(e.ns.e("thumb")),
|
|
16
16
|
style: i({
|
|
17
|
-
left: e.thumbLeft
|
|
18
|
-
top: e.thumbTop
|
|
17
|
+
left: `${e.thumbLeft}px`,
|
|
18
|
+
top: `${e.thumbTop}px`
|
|
19
19
|
})
|
|
20
20
|
}, null, 6)
|
|
21
21
|
], 2);
|
|
22
22
|
}
|
|
23
|
-
const
|
|
23
|
+
const k = /* @__PURE__ */ m(s, [["render", p]]);
|
|
24
24
|
export {
|
|
25
|
-
|
|
25
|
+
k as default
|
|
26
26
|
};
|
|
@@ -17,15 +17,15 @@ function p(e, l, u, d, c, m) {
|
|
|
17
17
|
r("div", {
|
|
18
18
|
class: o(e.ns.e("cursor")),
|
|
19
19
|
style: s({
|
|
20
|
-
top: e.cursorTop
|
|
21
|
-
left: e.cursorLeft
|
|
20
|
+
top: `${e.cursorTop}px`,
|
|
21
|
+
left: `${e.cursorLeft}px`
|
|
22
22
|
})
|
|
23
23
|
}, [...l[0] || (l[0] = [
|
|
24
24
|
r("div", null, null, -1)
|
|
25
25
|
])], 6)
|
|
26
26
|
], 6);
|
|
27
27
|
}
|
|
28
|
-
const
|
|
28
|
+
const k = /* @__PURE__ */ i(n, [["render", p]]);
|
|
29
29
|
export {
|
|
30
|
-
|
|
30
|
+
k as default
|
|
31
31
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as p, ref as
|
|
1
|
+
import { defineComponent as p, ref as a, computed as k, createBlock as c, openBlock as r, Transition as C, withCtx as b, withDirectives as g, createElementVNode as d, normalizeClass as z, withModifiers as M, normalizeStyle as $, unref as m, createElementBlock as B, Fragment as E, renderList as S, vShow as F } from "vue";
|
|
2
2
|
import { useTimeoutFn as H, useClickAway as I, useEventListener as f } from "@vft/use";
|
|
3
3
|
import { VftMenuItem as L } from "../menu/index.js";
|
|
4
4
|
import "@vueuse/core";
|
|
@@ -21,10 +21,8 @@ const R = { class: "vft-sub-menu" }, T = p({
|
|
|
21
21
|
items: {}
|
|
22
22
|
},
|
|
23
23
|
setup(n) {
|
|
24
|
-
const v = N("context-menu")
|
|
25
|
-
|
|
26
|
-
const x = k(() => {
|
|
27
|
-
const { x: t, y: o } = n.axis || { x: 0, y: 0 }, e = (n.items || []).length * 40, l = n.width || 0, s = document.body, w = s.clientWidth < t + l ? t - l : t, y = s.clientHeight < o + e ? o - e : o;
|
|
24
|
+
const v = N("context-menu"), u = a(), x = k(() => {
|
|
25
|
+
const { x: t, y: o } = n.axis || { x: 0, y: 0 }, e = (n.items || []).length * 40, s = n.width || 0, l = document.body, w = l.clientWidth < t + s ? t - s : t, y = l.clientHeight < o + e ? o - e : o;
|
|
28
26
|
return {
|
|
29
27
|
zIndex: 3e3,
|
|
30
28
|
...n.styles,
|
|
@@ -33,12 +31,11 @@ const R = { class: "vft-sub-menu" }, T = p({
|
|
|
33
31
|
left: `${w + 1}px`,
|
|
34
32
|
top: `${y + 1}px`
|
|
35
33
|
};
|
|
36
|
-
});
|
|
37
|
-
let i = c(!1);
|
|
34
|
+
}), i = a(!1);
|
|
38
35
|
H(() => {
|
|
39
36
|
i.value = !0;
|
|
40
37
|
}, 0), I(
|
|
41
|
-
|
|
38
|
+
u,
|
|
42
39
|
() => {
|
|
43
40
|
i.value = !1;
|
|
44
41
|
},
|
|
@@ -69,30 +66,30 @@ const R = { class: "vft-sub-menu" }, T = p({
|
|
|
69
66
|
function h(t) {
|
|
70
67
|
t?.disabled || (t.handler?.(), i.value = !1);
|
|
71
68
|
}
|
|
72
|
-
return (t, o) => (r(),
|
|
69
|
+
return (t, o) => (r(), c(C, { name: "vft-zoom-in-top" }, {
|
|
73
70
|
default: b(() => [
|
|
74
|
-
g(
|
|
71
|
+
g(d("div", {
|
|
75
72
|
ref_key: "contextMenuRef",
|
|
76
|
-
ref:
|
|
73
|
+
ref: u,
|
|
77
74
|
style: $(x.value),
|
|
78
75
|
onClick: o[0] || (o[0] = M(() => {
|
|
79
76
|
}, ["stop"])),
|
|
80
|
-
class: z([
|
|
77
|
+
class: z(["vft-menu", [m(v).b()]])
|
|
81
78
|
}, [
|
|
82
|
-
|
|
83
|
-
(r(!0), B(E, null, S(n.items, (e,
|
|
84
|
-
onClick: (
|
|
85
|
-
index:
|
|
79
|
+
d("div", R, [
|
|
80
|
+
(r(!0), B(E, null, S(n.items, (e, s) => (r(), c(m(L), {
|
|
81
|
+
onClick: (l) => h(e),
|
|
82
|
+
index: s + e.text,
|
|
86
83
|
title: e.text,
|
|
87
84
|
divider: e.divider,
|
|
88
85
|
disabled: e.disabled,
|
|
89
86
|
icon: e.iconCfg,
|
|
90
87
|
"is-alone-use": "",
|
|
91
|
-
key:
|
|
88
|
+
key: s
|
|
92
89
|
}, null, 8, ["onClick", "index", "title", "divider", "disabled", "icon"]))), 128))
|
|
93
90
|
])
|
|
94
91
|
], 6), [
|
|
95
|
-
[F,
|
|
92
|
+
[F, i.value]
|
|
96
93
|
])
|
|
97
94
|
]),
|
|
98
95
|
_: 1
|
|
@@ -19,10 +19,10 @@ const Z = ["aria-selected", "aria-label", "tabindex", "onKeydown"], be = /* @__P
|
|
|
19
19
|
props: Q,
|
|
20
20
|
emits: ["changerange", "pick", "select"],
|
|
21
21
|
setup(E, { expose: T, emit: A }) {
|
|
22
|
-
const N = (s, t) => {
|
|
22
|
+
const e = E, c = A, N = (s, t) => {
|
|
23
23
|
const a = f(String(s)).locale(t).startOf("year"), r = a.endOf("year").dayOfYear();
|
|
24
24
|
return X(r).map((n) => a.add(n, "day").toDate());
|
|
25
|
-
},
|
|
25
|
+
}, B = J("year-table"), D = m("zh-cn"), w = m(), b = m(), g = O(() => Math.floor(e.date.year() / 10) * 10), K = m([[], [], []]), k = m(), S = m(), h = O(() => {
|
|
26
26
|
const s = K.value, t = f().locale(D.value).startOf("year");
|
|
27
27
|
for (let a = 0; a < 3; a++) {
|
|
28
28
|
const o = s[a];
|
|
@@ -31,7 +31,7 @@ const gt = ["onClick"], Zt = /* @__PURE__ */ nt({
|
|
|
31
31
|
props: mt,
|
|
32
32
|
emits: ["pick", "set-picker-option", "panel-change"],
|
|
33
33
|
setup(Pe, { emit: Fe }) {
|
|
34
|
-
const $e = (e, t, l) => !0,
|
|
34
|
+
const n = Pe, b = Fe, $e = (e, t, l) => !0, f = Ve("picker-panel"), V = Ve("date-picker"), Ie = rt(), Ne = st(), d = g("zh-cn"), le = ee(kt), oe = ee(
|
|
35
35
|
ft
|
|
36
36
|
), Ee = ee(wt), { shortcuts: ne, disabledDate: c, cellClassName: Me, defaultTime: J } = le.props, E = ut(le.props, "defaultValue"), _ = g(), a = g(w().locale(d.value)), W = g(!1);
|
|
37
37
|
let H = !1;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { defineComponent as F, ref as u, computed as
|
|
1
|
+
import { defineComponent as F, ref as u, computed as A, createVNode as e, Fragment as E } from "vue";
|
|
2
2
|
import { isArray as Y } from "@vft/utils";
|
|
3
|
-
import { VftDatePicker as
|
|
4
|
-
import { VftDropdown as
|
|
3
|
+
import { VftDatePicker as S } from "../date-picker/index.js";
|
|
4
|
+
import { VftDropdown as q } from "../dropdown/index.js";
|
|
5
5
|
import { VftIcon as k } from "../icon/index.js";
|
|
6
6
|
import "@vueuse/core";
|
|
7
7
|
import "../config-provider/hooks/use-global-config.js";
|
|
8
8
|
import "lodash-es";
|
|
9
9
|
import "../form/index.js";
|
|
10
|
-
import { useNamespace as
|
|
10
|
+
import { useNamespace as z } from "../../hooks/use-namespace/index.js";
|
|
11
11
|
import "../../hooks/use-model-toggle/index.js";
|
|
12
12
|
import "@popperjs/core";
|
|
13
13
|
import "../../hooks/use-z-index/index.js";
|
|
14
14
|
import v from "dayjs";
|
|
15
|
-
const
|
|
15
|
+
const B = F({
|
|
16
16
|
name: "vft-date-time-select"
|
|
17
|
-
}),
|
|
18
|
-
...
|
|
17
|
+
}), oe = /* @__PURE__ */ F({
|
|
18
|
+
...B,
|
|
19
19
|
props: {
|
|
20
20
|
dateList: {
|
|
21
21
|
default: () => []
|
|
@@ -28,67 +28,66 @@ const G = F({
|
|
|
28
28
|
setup(d, {
|
|
29
29
|
emit: x
|
|
30
30
|
}) {
|
|
31
|
-
const
|
|
32
|
-
function M(
|
|
31
|
+
const H = x, o = z("date-time-select"), C = u(!1), g = u(), I = u("请选择时间"), t = u("");
|
|
32
|
+
function M(n) {
|
|
33
33
|
const {
|
|
34
34
|
count: a,
|
|
35
35
|
type: h,
|
|
36
36
|
format: f,
|
|
37
|
-
dateRange:
|
|
37
|
+
dateRange: l = !0,
|
|
38
38
|
startOfType: O,
|
|
39
39
|
endOfType: V
|
|
40
|
-
} =
|
|
40
|
+
} = n;
|
|
41
41
|
let m, r, L;
|
|
42
|
-
const p = f || d.defaultFormat
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
let D, T = A ? "startOf" : "endOf";
|
|
42
|
+
const p = f || d.defaultFormat, s = v().format(p), R = (i, j = !0) => {
|
|
43
|
+
let D;
|
|
44
|
+
const T = j ? "startOf" : "endOf";
|
|
46
45
|
return i === "week" ? D = v().add(a, i)[T](i).add(1, "day").format(p) : D = v().add(a, i)[T](i).format(p), D;
|
|
47
46
|
};
|
|
48
47
|
O && (m = R(O)), V && (r = R(V, !1)), L = v().add(a, h).format(p);
|
|
49
|
-
|
|
50
|
-
return
|
|
48
|
+
const c = m || r || L;
|
|
49
|
+
return l ? m && r ? [c, r] : a > 0 ? [c !== r && r || s, c] : a === 0 ? [m || s, r || s] : [c, c !== r && r || s] : c;
|
|
51
50
|
}
|
|
52
|
-
function N(
|
|
53
|
-
g.value =
|
|
51
|
+
function N(n, a) {
|
|
52
|
+
g.value = n, y.value.handleClose(), t.value = M(a), H("change", t.value);
|
|
54
53
|
}
|
|
55
54
|
function P() {
|
|
56
55
|
t.value = "";
|
|
57
56
|
}
|
|
58
|
-
const w =
|
|
59
|
-
function
|
|
60
|
-
C.value =
|
|
57
|
+
const w = A(() => Y(t.value) && t.value?.length ? `${t.value[0]} - ${t.value[1]}` : t.value), y = u();
|
|
58
|
+
function $(n) {
|
|
59
|
+
C.value = n;
|
|
61
60
|
}
|
|
62
|
-
const
|
|
63
|
-
const
|
|
61
|
+
const b = () => {
|
|
62
|
+
const n = Y(d.dateList[0]) ? d.dateList : [d.dateList];
|
|
64
63
|
return e("div", {
|
|
65
|
-
class:
|
|
66
|
-
}, [e(
|
|
64
|
+
class: o.e("content")
|
|
65
|
+
}, [e(E, null, [n.map((a, h) => e("div", {
|
|
67
66
|
key: h,
|
|
68
|
-
class:
|
|
69
|
-
}, [a.map((f,
|
|
70
|
-
class: [
|
|
71
|
-
onClick: () => N(
|
|
67
|
+
class: o.e("item-container")
|
|
68
|
+
}, [a.map((f, l) => e("div", {
|
|
69
|
+
class: [o.e("item"), o.is("active", g.value === l)],
|
|
70
|
+
onClick: () => N(l, f)
|
|
72
71
|
}, [e("span", {
|
|
73
|
-
key:
|
|
74
|
-
}, [f.text]), g.value ===
|
|
72
|
+
key: l
|
|
73
|
+
}, [f.text]), g.value === l ? e(k, {
|
|
75
74
|
icon: "icon-check"
|
|
76
|
-
}, null) : null])), e(
|
|
75
|
+
}, null) : null])), e(S, {
|
|
77
76
|
type: "daterange",
|
|
78
77
|
"range-separator": "To",
|
|
79
78
|
"start-placeholder": "Start date",
|
|
80
79
|
"end-placeholder": "End date"
|
|
81
80
|
}, null)]))])]);
|
|
82
81
|
};
|
|
83
|
-
return () => e(
|
|
82
|
+
return () => e(q, {
|
|
84
83
|
ref: y,
|
|
85
84
|
trigger: "click",
|
|
86
85
|
teleported: !1,
|
|
87
|
-
class:
|
|
88
|
-
onVisibleChange:
|
|
86
|
+
class: o.b(),
|
|
87
|
+
onVisibleChange: $
|
|
89
88
|
}, {
|
|
90
89
|
default: () => [e("span", {
|
|
91
|
-
class: [
|
|
90
|
+
class: [o.e("trigger"), "cursor-pointer"]
|
|
92
91
|
}, [e("span", {
|
|
93
92
|
class: [w.value ? "text" : "placeholder"]
|
|
94
93
|
}, [w.value || I.value]), t.value ? e(k, {
|
|
@@ -101,10 +100,10 @@ const G = F({
|
|
|
101
100
|
"rotate-180": C.value
|
|
102
101
|
}]
|
|
103
102
|
}, null) : null])],
|
|
104
|
-
dropdown: () =>
|
|
103
|
+
dropdown: () => b()
|
|
105
104
|
});
|
|
106
105
|
}
|
|
107
106
|
});
|
|
108
107
|
export {
|
|
109
|
-
|
|
108
|
+
oe as default
|
|
110
109
|
};
|