vft 0.0.507 → 0.0.509
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/dist/index.css +1 -1
- package/es/components/carousel/use-carousel.js +1 -1
- package/es/components/cascader/cascader.vue2.js +203 -202
- package/es/components/cascader-panel/menu.vue2.js +50 -49
- package/es/components/clamp-toggle/clamp-toggle.vue2.js +21 -17
- package/es/components/color-picker/color-picker.vue2.js +134 -133
- package/es/components/config-provider/config-provider.vue.d.ts +2 -0
- package/es/components/config-provider/config-provider.vue2.js +5 -4
- package/es/components/config-provider/constants.d.ts +1 -0
- package/es/components/config-provider/constants.js +3 -2
- package/es/components/config-provider/hooks/use-global-config.js +33 -30
- package/es/components/config-provider/index.d.ts +9 -0
- package/es/components/config-provider/index.js +6 -5
- package/es/components/date-picker/composables/use-basic-date-table.d.ts +1 -1
- package/es/components/date-picker/composables/use-basic-date-table.js +124 -123
- package/es/components/date-picker/composables/use-month-range-header.js +15 -14
- package/es/components/date-picker/composables/use-panel-date-range.js +24 -23
- package/es/components/date-picker/date-picker-com/basic-month-table.vue2.js +39 -38
- package/es/components/date-picker/date-picker-com/basic-year-table.vue2.js +39 -38
- package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +179 -178
- package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +225 -224
- package/es/components/date-time-select/date-time-select.vue2.js +39 -36
- package/es/components/dropdown/dropdown.vue2.js +68 -67
- package/es/components/empty/empty.vue2.js +39 -38
- package/es/components/full-screen/full-screen.vue2.js +18 -17
- package/es/components/image/image.vue2.js +60 -59
- package/es/components/image-viewer/image-viewer.vue2.js +45 -44
- package/es/components/index.js +161 -160
- package/es/components/input/input.vue2.js +4 -4
- package/es/components/input-tag/composables/use-input-tag.js +1 -1
- package/es/components/md-container/md-container.vue2.js +75 -74
- package/es/components/md-container/toc.js +37 -36
- package/es/components/modal/modal-footer-action.vue2.js +25 -24
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +16 -15
- package/es/components/multiple-tabs/use/use-tab-dropdown.js +54 -53
- package/es/components/pagination/components/jumper.vue2.js +29 -28
- package/es/components/pagination/components/sizes.vue2.js +21 -20
- package/es/components/pagination/components/total.vue2.js +11 -10
- package/es/components/popconfirm/popconfirm.vue2.js +40 -39
- package/es/components/search/search.vue2.js +79 -77
- package/es/components/select/useSelect.js +232 -231
- package/es/components/super-form/super-form-action.vue2.js +41 -40
- package/es/components/super-form/super-form-item.vue2.js +206 -203
- package/es/components/super-form/use/helper.d.ts +1 -1
- package/es/components/super-form/use/helper.js +62 -62
- package/es/components/table/field.js +130 -110
- package/es/components/table/table.vue2.js +152 -150
- package/es/components/table/use/use-columns.js +29 -26
- package/es/components/table/use/use-data-source.js +87 -86
- package/es/components/time-picker/time-picker-com/panel-time-pick.vue2.js +66 -65
- package/es/components/time-picker/time-picker-com/panel-time-range.vue2.js +134 -133
- package/es/components/transfer/transfer-panel.vue2.js +57 -56
- package/es/components/transfer/transfer.vue2.js +70 -69
- package/es/components/tree/tree.vue2.js +60 -59
- package/es/components/upload/index.d.ts +3 -3
- package/es/components/upload/upload-content.vue.d.ts +2 -2
- package/es/components/upload/upload-content.vue2.js +78 -75
- package/es/components/upload/upload-list.vue2.js +46 -45
- package/es/components/upload/upload.vue.d.ts +2 -2
- package/es/components/upload/upload.vue2.js +87 -85
- package/es/components/upload/utils.js +29 -29
- package/es/constants/date.d.ts +1 -1
- package/es/constants/date.js +9 -1
- package/es/hooks/use-z-index/index.js +3 -3
- package/es/index.d.ts +1 -0
- package/es/index.js +5 -1
- package/es/locale/index.d.js +1 -0
- package/es/locale/index.d.ts +26 -0
- package/es/locale/index.js +10 -0
- package/es/locale/lang/en.d.ts +183 -0
- package/es/locale/lang/en.js +241 -0
- package/es/locale/lang/zh-cn.d.ts +183 -0
- package/es/locale/lang/zh-cn.js +241 -0
- package/es/locale/lang/zh-tw.d.ts +183 -0
- package/es/locale/lang/zh-tw.js +241 -0
- package/es/locale/use-locale.d.ts +17 -0
- package/es/locale/use-locale.js +56 -0
- 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/cascader/cascader.vue2.cjs +1 -1
- package/lib/components/cascader-panel/menu.vue2.cjs +4 -4
- package/lib/components/clamp-toggle/clamp-toggle.vue2.cjs +1 -1
- package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
- package/lib/components/config-provider/config-provider.vue.d.ts +2 -0
- package/lib/components/config-provider/config-provider.vue2.cjs +1 -1
- package/lib/components/config-provider/constants.cjs +1 -1
- package/lib/components/config-provider/constants.d.ts +1 -0
- package/lib/components/config-provider/hooks/use-global-config.cjs +1 -1
- package/lib/components/config-provider/index.cjs +1 -1
- package/lib/components/config-provider/index.d.ts +9 -0
- package/lib/components/date-picker/composables/use-basic-date-table.cjs +1 -1
- package/lib/components/date-picker/composables/use-basic-date-table.d.ts +1 -1
- package/lib/components/date-picker/composables/use-month-range-header.cjs +1 -1
- package/lib/components/date-picker/composables/use-panel-date-range.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/basic-month-table.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-picker/date-picker-com/panel-date-range.vue2.cjs +1 -1
- package/lib/components/date-time-select/date-time-select.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/full-screen/full-screen.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/input.vue2.cjs +1 -1
- package/lib/components/md-container/md-container.vue2.cjs +1 -1
- package/lib/components/md-container/toc.cjs +1 -1
- package/lib/components/modal/modal-footer-action.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/use/use-tab-dropdown.cjs +1 -1
- package/lib/components/pagination/components/jumper.vue2.cjs +1 -1
- package/lib/components/pagination/components/sizes.vue2.cjs +1 -1
- package/lib/components/pagination/components/total.vue2.cjs +1 -1
- package/lib/components/popconfirm/popconfirm.vue2.cjs +1 -1
- package/lib/components/search/search.vue2.cjs +1 -1
- package/lib/components/select/useSelect.cjs +1 -1
- package/lib/components/super-form/super-form-action.vue2.cjs +1 -1
- package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
- package/lib/components/super-form/use/helper.cjs +1 -1
- package/lib/components/super-form/use/helper.d.ts +1 -1
- package/lib/components/table/field.cjs +1 -1
- package/lib/components/table/table.vue2.cjs +1 -1
- package/lib/components/table/use/use-columns.cjs +1 -1
- package/lib/components/table/use/use-data-source.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/transfer/transfer-panel.vue2.cjs +1 -1
- package/lib/components/transfer/transfer.vue2.cjs +1 -1
- package/lib/components/tree/tree.vue2.cjs +1 -1
- package/lib/components/upload/index.d.ts +3 -3
- package/lib/components/upload/upload-content.vue.d.ts +2 -2
- package/lib/components/upload/upload-content.vue2.cjs +1 -1
- package/lib/components/upload/upload-list.vue2.cjs +1 -1
- package/lib/components/upload/upload.vue.d.ts +2 -2
- package/lib/components/upload/upload.vue2.cjs +1 -1
- package/lib/components/upload/utils.cjs +1 -1
- package/lib/constants/date.cjs +1 -1
- package/lib/constants/date.d.ts +1 -1
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/locale/index.cjs +1 -0
- package/lib/locale/index.d.cjs +1 -0
- package/lib/locale/index.d.ts +26 -0
- package/lib/locale/lang/en.cjs +1 -0
- package/lib/locale/lang/en.d.ts +183 -0
- package/lib/locale/lang/zh-cn.cjs +1 -0
- package/lib/locale/lang/zh-cn.d.ts +183 -0
- package/lib/locale/lang/zh-tw.cjs +1 -0
- package/lib/locale/lang/zh-tw.d.ts +183 -0
- package/lib/locale/use-locale.cjs +1 -0
- package/lib/locale/use-locale.d.ts +17 -0
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +3 -3
- package/theme-style/index.css +1 -1
- package/theme-style/src/super-form.scss +0 -1
- package/theme-style/vft-super-form.css +1 -1
- package/web-types.json +1 -1
|
@@ -1,21 +1,22 @@
|
|
|
1
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 q } from "../date-picker/index.js";
|
|
4
|
+
import { VftDropdown as z } 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 B } 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
|
+
import { useLocale as G } from "../../locale/use-locale.js";
|
|
14
15
|
import v from "dayjs";
|
|
15
|
-
const
|
|
16
|
+
const J = F({
|
|
16
17
|
name: "vft-date-time-select"
|
|
17
|
-
}),
|
|
18
|
-
...
|
|
18
|
+
}), ce = /* @__PURE__ */ F({
|
|
19
|
+
...J,
|
|
19
20
|
props: {
|
|
20
21
|
dateList: {
|
|
21
22
|
default: () => []
|
|
@@ -28,70 +29,72 @@ const B = F({
|
|
|
28
29
|
setup(d, {
|
|
29
30
|
emit: x
|
|
30
31
|
}) {
|
|
31
|
-
const H = x,
|
|
32
|
-
|
|
32
|
+
const H = x, l = B("date-time-select"), {
|
|
33
|
+
t: I
|
|
34
|
+
} = G(), C = u(!1), g = u(), M = u(I("vft.dateTimeSelect.placeholder")), t = u("");
|
|
35
|
+
function N(o) {
|
|
33
36
|
const {
|
|
34
37
|
count: a,
|
|
35
38
|
type: h,
|
|
36
39
|
format: f,
|
|
37
|
-
dateRange:
|
|
40
|
+
dateRange: n = !0,
|
|
38
41
|
startOfType: O,
|
|
39
42
|
endOfType: V
|
|
40
|
-
} =
|
|
43
|
+
} = o;
|
|
41
44
|
let m, r, L;
|
|
42
|
-
const p = f || d.defaultFormat, s = v().format(p),
|
|
45
|
+
const p = f || d.defaultFormat, s = v().format(p), T = (i, j = !0) => {
|
|
43
46
|
let D;
|
|
44
|
-
const
|
|
45
|
-
return i === "week" ? D = v().add(a, i)[
|
|
47
|
+
const R = j ? "startOf" : "endOf";
|
|
48
|
+
return i === "week" ? D = v().add(a, i)[R](i).add(1, "day").format(p) : D = v().add(a, i)[R](i).format(p), D;
|
|
46
49
|
};
|
|
47
|
-
O && (m =
|
|
50
|
+
O && (m = T(O)), V && (r = T(V, !1)), L = v().add(a, h).format(p);
|
|
48
51
|
const c = m || r || L;
|
|
49
|
-
return
|
|
52
|
+
return n ? m && r ? [c, r] : a > 0 ? [c !== r && r || s, c] : a === 0 ? [m || s, r || s] : [c, c !== r && r || s] : c;
|
|
50
53
|
}
|
|
51
|
-
function
|
|
52
|
-
g.value =
|
|
54
|
+
function P(o, a) {
|
|
55
|
+
g.value = o, y.value.handleClose(), t.value = N(a), H("change", t.value);
|
|
53
56
|
}
|
|
54
|
-
function
|
|
57
|
+
function S() {
|
|
55
58
|
t.value = "";
|
|
56
59
|
}
|
|
57
60
|
const w = A(() => Y(t.value) && t.value?.length ? `${t.value[0]} - ${t.value[1]}` : t.value), y = u();
|
|
58
|
-
function $(
|
|
59
|
-
C.value =
|
|
61
|
+
function $(o) {
|
|
62
|
+
C.value = o;
|
|
60
63
|
}
|
|
61
64
|
const b = () => {
|
|
62
|
-
const
|
|
65
|
+
const o = Y(d.dateList[0]) ? d.dateList : [d.dateList];
|
|
63
66
|
return e("div", {
|
|
64
|
-
class:
|
|
65
|
-
}, [e(E, null, [
|
|
67
|
+
class: l.e("content")
|
|
68
|
+
}, [e(E, null, [o.map((a, h) => e("div", {
|
|
66
69
|
key: h,
|
|
67
|
-
class:
|
|
68
|
-
}, [a.map((f,
|
|
69
|
-
class: [
|
|
70
|
-
onClick: () =>
|
|
70
|
+
class: l.e("item-container")
|
|
71
|
+
}, [a.map((f, n) => e("div", {
|
|
72
|
+
class: [l.e("item"), l.is("active", g.value === n)],
|
|
73
|
+
onClick: () => P(n, f)
|
|
71
74
|
}, [e("span", {
|
|
72
|
-
key:
|
|
73
|
-
}, [f.text]), g.value ===
|
|
75
|
+
key: n
|
|
76
|
+
}, [f.text]), g.value === n ? e(k, {
|
|
74
77
|
icon: "icon-check"
|
|
75
|
-
}, null) : null])), e(
|
|
78
|
+
}, null) : null])), e(q, {
|
|
76
79
|
type: "daterange",
|
|
77
80
|
"range-separator": "To",
|
|
78
81
|
"start-placeholder": "Start date",
|
|
79
82
|
"end-placeholder": "End date"
|
|
80
83
|
}, null)]))])]);
|
|
81
84
|
};
|
|
82
|
-
return () => e(
|
|
85
|
+
return () => e(z, {
|
|
83
86
|
ref: y,
|
|
84
87
|
trigger: "click",
|
|
85
88
|
teleported: !1,
|
|
86
|
-
class:
|
|
89
|
+
class: l.b(),
|
|
87
90
|
onVisibleChange: $
|
|
88
91
|
}, {
|
|
89
92
|
default: () => [e("span", {
|
|
90
|
-
class: [
|
|
93
|
+
class: [l.e("trigger"), "cursor-pointer"]
|
|
91
94
|
}, [e("span", {
|
|
92
95
|
class: [w.value ? "text" : "placeholder"]
|
|
93
|
-
}, [w.value ||
|
|
94
|
-
onClick:
|
|
96
|
+
}, [w.value || M.value]), t.value ? e(k, {
|
|
97
|
+
onClick: S,
|
|
95
98
|
icon: "icon-circle-close",
|
|
96
99
|
class: "hover:text-black"
|
|
97
100
|
}, null) : null, t.value ? e(k, {
|
|
@@ -105,5 +108,5 @@ const B = F({
|
|
|
105
108
|
}
|
|
106
109
|
});
|
|
107
110
|
export {
|
|
108
|
-
|
|
111
|
+
ce as default
|
|
109
112
|
};
|
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
import { defineComponent as S, getCurrentInstance as
|
|
2
|
-
import { VftButtonGroup as
|
|
1
|
+
import { defineComponent as S, getCurrentInstance as Z, ref as a, computed as b, watch as _, toRef as h, onBeforeUnmount as ee, provide as T, createElementBlock as te, openBlock as $, normalizeClass as x, unref as o, createVNode as r, createBlock as oe, createCommentVNode as ne, createSlots as re, withCtx as n, renderSlot as y, mergeProps as I } from "vue";
|
|
2
|
+
import { VftButtonGroup as le, VftButton as O } from "../button/index.js";
|
|
3
3
|
import "../form/index.js";
|
|
4
|
-
import { VftIcon as
|
|
5
|
-
import
|
|
4
|
+
import { VftIcon as ie } from "../icon/index.js";
|
|
5
|
+
import ae from "../roving-focus-group/roving-focus-group.vue2.js";
|
|
6
6
|
import "../roving-focus-group/roving-focus-group-impl.vue2.js";
|
|
7
7
|
import "../roving-focus-group/roving-focus-item.vue2.js";
|
|
8
8
|
import "../roving-focus-group/types.js";
|
|
9
9
|
import { EVENT_CODE as w } from "../../constants/aria.js";
|
|
10
|
-
import { VftScrollbar as
|
|
11
|
-
import { OnlyChild as
|
|
12
|
-
import { VftTooltip as
|
|
10
|
+
import { VftScrollbar as de } from "../scrollbar/index.js";
|
|
11
|
+
import { OnlyChild as fe } from "../slot/only-child.js";
|
|
12
|
+
import { VftTooltip as ue } from "../tooltip/index.js";
|
|
13
13
|
import "@vueuse/core";
|
|
14
|
-
import { isArray as
|
|
15
|
-
import { addUnit as
|
|
14
|
+
import { isArray as se } from "@vft/utils";
|
|
15
|
+
import { addUnit as ce } from "../../utils/helper.js";
|
|
16
16
|
import "lodash-es";
|
|
17
|
-
import { useId as
|
|
18
|
-
import { useNamespace as
|
|
17
|
+
import { useId as me } from "../../hooks/use-id/index.js";
|
|
18
|
+
import { useNamespace as pe } from "../../hooks/use-namespace/index.js";
|
|
19
19
|
import "../../hooks/use-model-toggle/index.js";
|
|
20
20
|
import "@popperjs/core";
|
|
21
21
|
import "../../hooks/use-z-index/index.js";
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
|
|
22
|
+
import { useLocale as ve } from "../../locale/use-locale.js";
|
|
23
|
+
import { DROPDOWN_INJECTION_KEY as ge } from "./tokens.js";
|
|
24
|
+
import { VftCollection as be } from "./types.js";
|
|
25
|
+
import { useFormSize as he } from "../form/hooks/use-form-common-props.js";
|
|
26
|
+
const ye = S({
|
|
26
27
|
name: "vft-dropdown"
|
|
27
|
-
}),
|
|
28
|
-
...
|
|
28
|
+
}), Me = /* @__PURE__ */ S({
|
|
29
|
+
...ye,
|
|
29
30
|
props: {
|
|
30
31
|
trigger: { default: "hover" },
|
|
31
32
|
effect: { default: "light" },
|
|
@@ -48,99 +49,99 @@ const be = S({
|
|
|
48
49
|
teleported: { type: Boolean, default: !0 }
|
|
49
50
|
},
|
|
50
51
|
emits: ["visible-change", "command", "click"],
|
|
51
|
-
setup(e, { expose: z, emit:
|
|
52
|
-
const d = e, u =
|
|
53
|
-
maxHeight:
|
|
54
|
-
})),
|
|
55
|
-
|
|
52
|
+
setup(e, { expose: z, emit: L }) {
|
|
53
|
+
const { t: R } = ve(), d = e, u = L, l = pe("dropdown"), V = Z(), i = a(), C = a(), m = a(null), f = a(null), D = a(null), p = a(null), k = a(!1), N = [w.enter, w.space, w.down], H = b(() => ({
|
|
54
|
+
maxHeight: ce(d.maxHeight)
|
|
55
|
+
})), P = me().value, v = b(() => d.id || P);
|
|
56
|
+
_(
|
|
56
57
|
[i, h(d, "trigger")],
|
|
57
58
|
([t, c], [B]) => {
|
|
58
|
-
const
|
|
59
|
+
const X = se(c) ? c : [c];
|
|
59
60
|
B?.$el?.removeEventListener && B.$el.removeEventListener(
|
|
60
61
|
"pointerenter",
|
|
61
62
|
s
|
|
62
63
|
), t?.$el?.removeEventListener && t.$el.removeEventListener(
|
|
63
64
|
"pointerenter",
|
|
64
65
|
s
|
|
65
|
-
), t?.$el?.addEventListener &&
|
|
66
|
+
), t?.$el?.addEventListener && X.includes("hover") && t.$el.addEventListener(
|
|
66
67
|
"pointerenter",
|
|
67
68
|
s
|
|
68
69
|
);
|
|
69
70
|
},
|
|
70
71
|
{ immediate: !0 }
|
|
71
|
-
),
|
|
72
|
+
), ee(() => {
|
|
72
73
|
i.value?.$el?.removeEventListener && i.value.$el.removeEventListener(
|
|
73
74
|
"pointerenter",
|
|
74
75
|
s
|
|
75
76
|
);
|
|
76
77
|
});
|
|
77
|
-
function
|
|
78
|
+
function A() {
|
|
78
79
|
E();
|
|
79
80
|
}
|
|
80
81
|
function E() {
|
|
81
82
|
m.value?.onClose();
|
|
82
83
|
}
|
|
83
|
-
function
|
|
84
|
+
function F() {
|
|
84
85
|
m.value?.onOpen();
|
|
85
86
|
}
|
|
86
|
-
const g =
|
|
87
|
-
function
|
|
87
|
+
const g = he();
|
|
88
|
+
function K(...t) {
|
|
88
89
|
u("command", ...t);
|
|
89
90
|
}
|
|
90
91
|
function s() {
|
|
91
92
|
i.value?.$el?.focus();
|
|
92
93
|
}
|
|
93
|
-
function K() {
|
|
94
|
-
}
|
|
95
94
|
function U() {
|
|
95
|
+
}
|
|
96
|
+
function G() {
|
|
96
97
|
o(f)?.focus(), p.value = null;
|
|
97
98
|
}
|
|
98
|
-
function
|
|
99
|
+
function J(t) {
|
|
99
100
|
p.value = t;
|
|
100
101
|
}
|
|
101
|
-
function
|
|
102
|
+
function M(t) {
|
|
102
103
|
k.value || (t.preventDefault(), t.stopImmediatePropagation());
|
|
103
104
|
}
|
|
104
|
-
function
|
|
105
|
+
function W() {
|
|
105
106
|
u("visible-change", !0);
|
|
106
107
|
}
|
|
107
|
-
function
|
|
108
|
+
function Y(t) {
|
|
108
109
|
t?.type === "keydown" && f.value?.focus();
|
|
109
110
|
}
|
|
110
|
-
function
|
|
111
|
+
function j() {
|
|
111
112
|
u("visible-change", !1);
|
|
112
113
|
}
|
|
113
|
-
T(
|
|
114
|
+
T(ge, {
|
|
114
115
|
contentRef: f,
|
|
115
116
|
role: b(() => d.role),
|
|
116
117
|
triggerId: v,
|
|
117
118
|
isUsingKeyboard: k,
|
|
118
|
-
onItemEnter:
|
|
119
|
-
onItemLeave:
|
|
119
|
+
onItemEnter: U,
|
|
120
|
+
onItemLeave: G
|
|
120
121
|
}), T("elDropdown", {
|
|
121
|
-
instance:
|
|
122
|
+
instance: V,
|
|
122
123
|
dropdownSize: g,
|
|
123
|
-
handleClick:
|
|
124
|
-
commandHandler:
|
|
124
|
+
handleClick: A,
|
|
125
|
+
commandHandler: K,
|
|
125
126
|
trigger: h(d, "trigger"),
|
|
126
127
|
hideOnClick: h(d, "hideOnClick")
|
|
127
128
|
});
|
|
128
|
-
const
|
|
129
|
+
const q = (t) => {
|
|
129
130
|
t.preventDefault(), f.value?.focus?.({
|
|
130
131
|
preventScroll: !0
|
|
131
132
|
});
|
|
132
|
-
},
|
|
133
|
+
}, Q = (t) => {
|
|
133
134
|
u("click", t);
|
|
134
135
|
};
|
|
135
136
|
return z({
|
|
136
137
|
handleClose: E,
|
|
137
|
-
handleOpen:
|
|
138
|
+
handleOpen: F,
|
|
138
139
|
// Todo
|
|
139
|
-
onFocusAfterTrapped:
|
|
140
|
-
}), (t, c) => ($(),
|
|
140
|
+
onFocusAfterTrapped: q
|
|
141
|
+
}), (t, c) => ($(), te("div", {
|
|
141
142
|
class: x([o(l).b(), o(l).is("disabled", e.disabled)])
|
|
142
143
|
}, [
|
|
143
|
-
r(o(
|
|
144
|
+
r(o(ue), {
|
|
144
145
|
ref_key: "popperRef",
|
|
145
146
|
ref: m,
|
|
146
147
|
role: e.role,
|
|
@@ -165,28 +166,28 @@ const be = S({
|
|
|
165
166
|
teleported: e.teleported,
|
|
166
167
|
pure: "",
|
|
167
168
|
persistent: "",
|
|
168
|
-
onBeforeShow:
|
|
169
|
-
onShow:
|
|
170
|
-
onBeforeHide:
|
|
171
|
-
},
|
|
169
|
+
onBeforeShow: W,
|
|
170
|
+
onShow: Y,
|
|
171
|
+
onBeforeHide: j
|
|
172
|
+
}, re({
|
|
172
173
|
content: n(() => [
|
|
173
|
-
r(o(
|
|
174
|
+
r(o(de), {
|
|
174
175
|
ref_key: "scrollbar",
|
|
175
|
-
ref:
|
|
176
|
-
"wrap-style":
|
|
176
|
+
ref: D,
|
|
177
|
+
"wrap-style": H.value,
|
|
177
178
|
tag: "div",
|
|
178
179
|
"view-class": [o(l).e("list"), "test"]
|
|
179
180
|
}, {
|
|
180
181
|
default: n(() => [
|
|
181
|
-
r(o(
|
|
182
|
+
r(o(ae), {
|
|
182
183
|
loop: e.loop,
|
|
183
184
|
"current-tab-id": p.value,
|
|
184
185
|
orientation: "horizontal",
|
|
185
|
-
onCurrentTabIdChange:
|
|
186
|
-
onEntryFocus:
|
|
186
|
+
onCurrentTabIdChange: J,
|
|
187
|
+
onEntryFocus: M
|
|
187
188
|
}, {
|
|
188
189
|
default: n(() => [
|
|
189
|
-
r(o(
|
|
190
|
+
r(o(be), null, {
|
|
190
191
|
default: n(() => [
|
|
191
192
|
y(t.$slots, "dropdown")
|
|
192
193
|
]),
|
|
@@ -204,7 +205,7 @@ const be = S({
|
|
|
204
205
|
e.splitButton ? void 0 : {
|
|
205
206
|
name: "default",
|
|
206
207
|
fn: n(() => [
|
|
207
|
-
r(o(
|
|
208
|
+
r(o(fe), {
|
|
208
209
|
id: v.value,
|
|
209
210
|
ref_key: "triggeringElementRef",
|
|
210
211
|
ref: i,
|
|
@@ -220,7 +221,7 @@ const be = S({
|
|
|
220
221
|
key: "0"
|
|
221
222
|
}
|
|
222
223
|
]), 1032, ["role", "effect", "popper-options", "hide-after", "placement", "popper-class", "reference-element", "trigger", "trigger-target-el", "show-after", "virtual-ref", "virtual-triggering", "disabled", "transition", "teleported"]),
|
|
223
|
-
e.splitButton ? ($(),
|
|
224
|
+
e.splitButton ? ($(), oe(o(le), { key: 0 }, {
|
|
224
225
|
default: n(() => [
|
|
225
226
|
r(o(O), I({
|
|
226
227
|
ref_key: "referenceElementRef",
|
|
@@ -230,7 +231,7 @@ const be = S({
|
|
|
230
231
|
type: e.type,
|
|
231
232
|
disabled: e.disabled,
|
|
232
233
|
tabindex: e.tabindex,
|
|
233
|
-
onClick:
|
|
234
|
+
onClick: Q
|
|
234
235
|
}), {
|
|
235
236
|
default: n(() => [
|
|
236
237
|
y(t.$slots, "default")
|
|
@@ -248,22 +249,22 @@ const be = S({
|
|
|
248
249
|
class: o(l).e("caret-button"),
|
|
249
250
|
disabled: e.disabled,
|
|
250
251
|
tabindex: e.tabindex,
|
|
251
|
-
"aria-label": "
|
|
252
|
+
"aria-label": o(R)("toggleDropdown")
|
|
252
253
|
}), {
|
|
253
254
|
default: n(() => [
|
|
254
|
-
r(o(
|
|
255
|
+
r(o(ie), {
|
|
255
256
|
class: x(o(l).e("icon")),
|
|
256
257
|
icon: "icon-arrow-down"
|
|
257
258
|
}, null, 8, ["class"])
|
|
258
259
|
]),
|
|
259
260
|
_: 1
|
|
260
|
-
}, 16, ["id", "size", "type", "class", "disabled", "tabindex"])
|
|
261
|
+
}, 16, ["id", "size", "type", "class", "disabled", "tabindex", "aria-label"])
|
|
261
262
|
]),
|
|
262
263
|
_: 3
|
|
263
|
-
})) :
|
|
264
|
+
})) : ne("", !0)
|
|
264
265
|
], 2));
|
|
265
266
|
}
|
|
266
267
|
});
|
|
267
268
|
export {
|
|
268
|
-
|
|
269
|
+
Me as default
|
|
269
270
|
};
|
|
@@ -1,71 +1,72 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as p, getCurrentInstance as k, computed as s, createElementBlock as l, openBlock as m, normalizeClass as c, unref as o, createElementVNode as z, createCommentVNode as u, renderSlot as d, createBlock as x, normalizeProps as D, mergeProps as E, createVNode as C } from "vue";
|
|
2
2
|
import { VftIcon as V } from "../icon/index.js";
|
|
3
3
|
import "@vueuse/core";
|
|
4
|
-
import { singleAttrToObj as
|
|
5
|
-
import { addUnit as
|
|
4
|
+
import { singleAttrToObj as h, renderTNode as w, VNode as F } from "@vft/utils";
|
|
5
|
+
import { addUnit as $ } from "../../utils/helper.js";
|
|
6
6
|
import "lodash-es";
|
|
7
7
|
import "../form/index.js";
|
|
8
|
-
import { useNamespace as
|
|
8
|
+
import { useNamespace as b } from "../../hooks/use-namespace/index.js";
|
|
9
9
|
import "../../hooks/use-model-toggle/index.js";
|
|
10
10
|
import "@popperjs/core";
|
|
11
11
|
import "../../hooks/use-z-index/index.js";
|
|
12
|
+
import { useLocale as B } from "../../locale/use-locale.js";
|
|
12
13
|
import { EmptyEnum as e } from "./constants.js";
|
|
13
|
-
const
|
|
14
|
+
const I = p({
|
|
14
15
|
name: "vft-empty"
|
|
15
|
-
}),
|
|
16
|
-
...
|
|
16
|
+
}), Q = /* @__PURE__ */ p({
|
|
17
|
+
...I,
|
|
17
18
|
props: {
|
|
18
19
|
icon: {},
|
|
19
20
|
type: { default: () => e.NoData },
|
|
20
21
|
size: { default: "default" },
|
|
21
22
|
desc: {}
|
|
22
23
|
},
|
|
23
|
-
setup(
|
|
24
|
-
const
|
|
24
|
+
setup(n) {
|
|
25
|
+
const r = b("empty"), f = k(), { t } = B(), y = /* @__PURE__ */ new Map([
|
|
25
26
|
[
|
|
26
27
|
e.NotFound,
|
|
27
28
|
{
|
|
28
|
-
text: "
|
|
29
|
+
text: t("vft.empty.notFound")
|
|
29
30
|
}
|
|
30
31
|
],
|
|
31
32
|
[
|
|
32
33
|
e.Delete,
|
|
33
34
|
{
|
|
34
|
-
text: "
|
|
35
|
+
text: t("vft.empty.deleted")
|
|
35
36
|
}
|
|
36
37
|
],
|
|
37
38
|
[
|
|
38
39
|
e.NetworkDisconnect,
|
|
39
40
|
{
|
|
40
|
-
text: "
|
|
41
|
+
text: t("vft.empty.networkDisconnect")
|
|
41
42
|
}
|
|
42
43
|
],
|
|
43
44
|
[
|
|
44
45
|
e.NoData,
|
|
45
46
|
{
|
|
46
|
-
text: "
|
|
47
|
+
text: t("vft.empty.noData")
|
|
47
48
|
}
|
|
48
49
|
],
|
|
49
50
|
[
|
|
50
51
|
e.PageError,
|
|
51
52
|
{
|
|
52
|
-
text: "
|
|
53
|
+
text: t("vft.empty.pageError")
|
|
53
54
|
}
|
|
54
55
|
],
|
|
55
56
|
[
|
|
56
57
|
e.NoFilter,
|
|
57
58
|
{
|
|
58
|
-
text: "
|
|
59
|
+
text: t("vft.empty.noFilter")
|
|
59
60
|
}
|
|
60
61
|
],
|
|
61
62
|
[
|
|
62
63
|
e.NoSearch,
|
|
63
64
|
{
|
|
64
|
-
text: "
|
|
65
|
+
text: t("vft.empty.noSearch")
|
|
65
66
|
}
|
|
66
67
|
]
|
|
67
|
-
]),
|
|
68
|
-
switch (
|
|
68
|
+
]), v = s(() => y.get(n.type)), N = s(() => {
|
|
69
|
+
switch (n.size) {
|
|
69
70
|
case "large":
|
|
70
71
|
return 120;
|
|
71
72
|
case "default":
|
|
@@ -73,37 +74,37 @@ const B = d({
|
|
|
73
74
|
case "small":
|
|
74
75
|
return 60;
|
|
75
76
|
default:
|
|
76
|
-
return
|
|
77
|
+
return n.size || 80;
|
|
77
78
|
}
|
|
78
|
-
}),
|
|
79
|
-
size:
|
|
80
|
-
icon:
|
|
81
|
-
})),
|
|
82
|
-
() =>
|
|
79
|
+
}), g = s(() => h(n.icon, "icon", {
|
|
80
|
+
size: $(N.value),
|
|
81
|
+
icon: n.type
|
|
82
|
+
})), i = s(
|
|
83
|
+
() => w(f, "desc", { defaultNode: v.value?.text })
|
|
83
84
|
);
|
|
84
|
-
return (
|
|
85
|
-
class: c([
|
|
85
|
+
return (a, P) => (m(), l("div", {
|
|
86
|
+
class: c([o(r).b()])
|
|
86
87
|
}, [
|
|
87
|
-
|
|
88
|
-
class: c(
|
|
88
|
+
z("div", {
|
|
89
|
+
class: c(o(r).e("image"))
|
|
89
90
|
}, [
|
|
90
|
-
|
|
91
|
+
a.$slots.img ? d(a.$slots, "img", { key: 0 }) : (m(), x(o(V), D(E({ key: 1 }, g.value)), null, 16))
|
|
91
92
|
], 2),
|
|
92
|
-
|
|
93
|
+
i.value ? (m(), l("span", {
|
|
93
94
|
key: 0,
|
|
94
|
-
class: c(
|
|
95
|
+
class: c(o(r).e("desc"))
|
|
95
96
|
}, [
|
|
96
|
-
|
|
97
|
-
], 2)) :
|
|
98
|
-
|
|
97
|
+
C(o(F), { content: i.value }, null, 8, ["content"])
|
|
98
|
+
], 2)) : u("", !0),
|
|
99
|
+
a.$slots.default ? (m(), l("div", {
|
|
99
100
|
key: 1,
|
|
100
|
-
class: c(
|
|
101
|
+
class: c(o(r).e("bottom"))
|
|
101
102
|
}, [
|
|
102
|
-
|
|
103
|
-
], 2)) :
|
|
103
|
+
d(a.$slots, "default")
|
|
104
|
+
], 2)) : u("", !0)
|
|
104
105
|
], 2));
|
|
105
106
|
}
|
|
106
107
|
});
|
|
107
108
|
export {
|
|
108
|
-
|
|
109
|
+
Q as default
|
|
109
110
|
};
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { defineComponent as r, createBlock as p, openBlock as
|
|
2
|
-
import { useFullscreen as
|
|
3
|
-
import { delObjAttrNotExist as
|
|
4
|
-
import { VftIconText as
|
|
1
|
+
import { defineComponent as r, createBlock as p, openBlock as m, unref as o, mergeProps as a } from "vue";
|
|
2
|
+
import { useFullscreen as u } from "@vft/use";
|
|
3
|
+
import { delObjAttrNotExist as f } from "@vft/utils";
|
|
4
|
+
import { VftIconText as x } from "../icon-text/index.js";
|
|
5
5
|
import "@vueuse/core";
|
|
6
6
|
import "../config-provider/hooks/use-global-config.js";
|
|
7
7
|
import { primaryColor as d } from "../../utils/ns-cover.js";
|
|
8
8
|
import "lodash-es";
|
|
9
9
|
import "../form/index.js";
|
|
10
|
-
import { useNamespace as
|
|
10
|
+
import { useNamespace as _ } 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 { useLocale as v } from "../../locale/use-locale.js";
|
|
15
|
+
const y = r({
|
|
15
16
|
name: "full-screen"
|
|
16
|
-
}),
|
|
17
|
-
...
|
|
17
|
+
}), A = /* @__PURE__ */ r({
|
|
18
|
+
...y,
|
|
18
19
|
props: {
|
|
19
20
|
text: {},
|
|
20
21
|
icon: {},
|
|
@@ -32,18 +33,18 @@ const _ = r({
|
|
|
32
33
|
clampTooltipCfg: {},
|
|
33
34
|
useClamp: { type: Boolean }
|
|
34
35
|
},
|
|
35
|
-
setup(
|
|
36
|
-
const
|
|
37
|
-
return (
|
|
38
|
-
class: o(
|
|
36
|
+
setup(n) {
|
|
37
|
+
const l = n, c = _("full-screen"), { t: e } = v(), { toggle: i, isFullscreen: t } = u(), s = d().value;
|
|
38
|
+
return (B, C) => (m(), p(o(x), a({
|
|
39
|
+
class: o(c).b(),
|
|
39
40
|
distance: 2,
|
|
40
|
-
"hover-color": o(
|
|
41
|
+
"hover-color": o(s),
|
|
41
42
|
onClick: o(i),
|
|
42
|
-
icon: o(
|
|
43
|
-
text: o(
|
|
44
|
-
}, o(
|
|
43
|
+
icon: o(t) ? "icon-exit-full-screen" : "icon-full-screen",
|
|
44
|
+
text: o(t) ? o(e)("vft.fullScreen.exit") : o(e)("vft.fullScreen.enter")
|
|
45
|
+
}, o(f)(l, !0, !0), { pointer: "" }), null, 16, ["class", "hover-color", "onClick", "icon", "text"]));
|
|
45
46
|
}
|
|
46
47
|
});
|
|
47
48
|
export {
|
|
48
|
-
|
|
49
|
+
A as default
|
|
49
50
|
};
|