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.
Files changed (160) hide show
  1. package/dist/index.css +1 -1
  2. package/es/components/carousel/use-carousel.js +1 -1
  3. package/es/components/cascader/cascader.vue2.js +203 -202
  4. package/es/components/cascader-panel/menu.vue2.js +50 -49
  5. package/es/components/clamp-toggle/clamp-toggle.vue2.js +21 -17
  6. package/es/components/color-picker/color-picker.vue2.js +134 -133
  7. package/es/components/config-provider/config-provider.vue.d.ts +2 -0
  8. package/es/components/config-provider/config-provider.vue2.js +5 -4
  9. package/es/components/config-provider/constants.d.ts +1 -0
  10. package/es/components/config-provider/constants.js +3 -2
  11. package/es/components/config-provider/hooks/use-global-config.js +33 -30
  12. package/es/components/config-provider/index.d.ts +9 -0
  13. package/es/components/config-provider/index.js +6 -5
  14. package/es/components/date-picker/composables/use-basic-date-table.d.ts +1 -1
  15. package/es/components/date-picker/composables/use-basic-date-table.js +124 -123
  16. package/es/components/date-picker/composables/use-month-range-header.js +15 -14
  17. package/es/components/date-picker/composables/use-panel-date-range.js +24 -23
  18. package/es/components/date-picker/date-picker-com/basic-month-table.vue2.js +39 -38
  19. package/es/components/date-picker/date-picker-com/basic-year-table.vue2.js +39 -38
  20. package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +179 -178
  21. package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +225 -224
  22. package/es/components/date-time-select/date-time-select.vue2.js +39 -36
  23. package/es/components/dropdown/dropdown.vue2.js +68 -67
  24. package/es/components/empty/empty.vue2.js +39 -38
  25. package/es/components/full-screen/full-screen.vue2.js +18 -17
  26. package/es/components/image/image.vue2.js +60 -59
  27. package/es/components/image-viewer/image-viewer.vue2.js +45 -44
  28. package/es/components/index.js +161 -160
  29. package/es/components/input/input.vue2.js +4 -4
  30. package/es/components/input-tag/composables/use-input-tag.js +1 -1
  31. package/es/components/md-container/md-container.vue2.js +75 -74
  32. package/es/components/md-container/toc.js +37 -36
  33. package/es/components/modal/modal-footer-action.vue2.js +25 -24
  34. package/es/components/multiple-tabs/multiple-tabs.vue2.js +16 -15
  35. package/es/components/multiple-tabs/use/use-tab-dropdown.js +54 -53
  36. package/es/components/pagination/components/jumper.vue2.js +29 -28
  37. package/es/components/pagination/components/sizes.vue2.js +21 -20
  38. package/es/components/pagination/components/total.vue2.js +11 -10
  39. package/es/components/popconfirm/popconfirm.vue2.js +40 -39
  40. package/es/components/search/search.vue2.js +79 -77
  41. package/es/components/select/useSelect.js +232 -231
  42. package/es/components/super-form/super-form-action.vue2.js +41 -40
  43. package/es/components/super-form/super-form-item.vue2.js +206 -203
  44. package/es/components/super-form/use/helper.d.ts +1 -1
  45. package/es/components/super-form/use/helper.js +62 -62
  46. package/es/components/table/field.js +130 -110
  47. package/es/components/table/table.vue2.js +152 -150
  48. package/es/components/table/use/use-columns.js +29 -26
  49. package/es/components/table/use/use-data-source.js +87 -86
  50. package/es/components/time-picker/time-picker-com/panel-time-pick.vue2.js +66 -65
  51. package/es/components/time-picker/time-picker-com/panel-time-range.vue2.js +134 -133
  52. package/es/components/transfer/transfer-panel.vue2.js +57 -56
  53. package/es/components/transfer/transfer.vue2.js +70 -69
  54. package/es/components/tree/tree.vue2.js +60 -59
  55. package/es/components/upload/index.d.ts +3 -3
  56. package/es/components/upload/upload-content.vue.d.ts +2 -2
  57. package/es/components/upload/upload-content.vue2.js +78 -75
  58. package/es/components/upload/upload-list.vue2.js +46 -45
  59. package/es/components/upload/upload.vue.d.ts +2 -2
  60. package/es/components/upload/upload.vue2.js +87 -85
  61. package/es/components/upload/utils.js +29 -29
  62. package/es/constants/date.d.ts +1 -1
  63. package/es/constants/date.js +9 -1
  64. package/es/hooks/use-z-index/index.js +3 -3
  65. package/es/index.d.ts +1 -0
  66. package/es/index.js +5 -1
  67. package/es/locale/index.d.js +1 -0
  68. package/es/locale/index.d.ts +26 -0
  69. package/es/locale/index.js +10 -0
  70. package/es/locale/lang/en.d.ts +183 -0
  71. package/es/locale/lang/en.js +241 -0
  72. package/es/locale/lang/zh-cn.d.ts +183 -0
  73. package/es/locale/lang/zh-cn.js +241 -0
  74. package/es/locale/lang/zh-tw.d.ts +183 -0
  75. package/es/locale/lang/zh-tw.js +241 -0
  76. package/es/locale/use-locale.d.ts +17 -0
  77. package/es/locale/use-locale.js +56 -0
  78. package/es/package.json.d.ts +1 -1
  79. package/es/package.json.js +1 -1
  80. package/es/utils/vue/vnode.js +1 -1
  81. package/lib/components/cascader/cascader.vue2.cjs +1 -1
  82. package/lib/components/cascader-panel/menu.vue2.cjs +4 -4
  83. package/lib/components/clamp-toggle/clamp-toggle.vue2.cjs +1 -1
  84. package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
  85. package/lib/components/config-provider/config-provider.vue.d.ts +2 -0
  86. package/lib/components/config-provider/config-provider.vue2.cjs +1 -1
  87. package/lib/components/config-provider/constants.cjs +1 -1
  88. package/lib/components/config-provider/constants.d.ts +1 -0
  89. package/lib/components/config-provider/hooks/use-global-config.cjs +1 -1
  90. package/lib/components/config-provider/index.cjs +1 -1
  91. package/lib/components/config-provider/index.d.ts +9 -0
  92. package/lib/components/date-picker/composables/use-basic-date-table.cjs +1 -1
  93. package/lib/components/date-picker/composables/use-basic-date-table.d.ts +1 -1
  94. package/lib/components/date-picker/composables/use-month-range-header.cjs +1 -1
  95. package/lib/components/date-picker/composables/use-panel-date-range.cjs +1 -1
  96. package/lib/components/date-picker/date-picker-com/basic-month-table.vue2.cjs +1 -1
  97. package/lib/components/date-picker/date-picker-com/basic-year-table.vue2.cjs +1 -1
  98. package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
  99. package/lib/components/date-picker/date-picker-com/panel-date-range.vue2.cjs +1 -1
  100. package/lib/components/date-time-select/date-time-select.vue2.cjs +1 -1
  101. package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
  102. package/lib/components/empty/empty.vue2.cjs +1 -1
  103. package/lib/components/full-screen/full-screen.vue2.cjs +1 -1
  104. package/lib/components/image/image.vue2.cjs +1 -1
  105. package/lib/components/image-viewer/image-viewer.vue2.cjs +1 -1
  106. package/lib/components/index.cjs +1 -1
  107. package/lib/components/input/input.vue2.cjs +1 -1
  108. package/lib/components/md-container/md-container.vue2.cjs +1 -1
  109. package/lib/components/md-container/toc.cjs +1 -1
  110. package/lib/components/modal/modal-footer-action.vue2.cjs +1 -1
  111. package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
  112. package/lib/components/multiple-tabs/use/use-tab-dropdown.cjs +1 -1
  113. package/lib/components/pagination/components/jumper.vue2.cjs +1 -1
  114. package/lib/components/pagination/components/sizes.vue2.cjs +1 -1
  115. package/lib/components/pagination/components/total.vue2.cjs +1 -1
  116. package/lib/components/popconfirm/popconfirm.vue2.cjs +1 -1
  117. package/lib/components/search/search.vue2.cjs +1 -1
  118. package/lib/components/select/useSelect.cjs +1 -1
  119. package/lib/components/super-form/super-form-action.vue2.cjs +1 -1
  120. package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
  121. package/lib/components/super-form/use/helper.cjs +1 -1
  122. package/lib/components/super-form/use/helper.d.ts +1 -1
  123. package/lib/components/table/field.cjs +1 -1
  124. package/lib/components/table/table.vue2.cjs +1 -1
  125. package/lib/components/table/use/use-columns.cjs +1 -1
  126. package/lib/components/table/use/use-data-source.cjs +1 -1
  127. package/lib/components/time-picker/time-picker-com/panel-time-pick.vue2.cjs +1 -1
  128. package/lib/components/time-picker/time-picker-com/panel-time-range.vue2.cjs +1 -1
  129. package/lib/components/transfer/transfer-panel.vue2.cjs +1 -1
  130. package/lib/components/transfer/transfer.vue2.cjs +1 -1
  131. package/lib/components/tree/tree.vue2.cjs +1 -1
  132. package/lib/components/upload/index.d.ts +3 -3
  133. package/lib/components/upload/upload-content.vue.d.ts +2 -2
  134. package/lib/components/upload/upload-content.vue2.cjs +1 -1
  135. package/lib/components/upload/upload-list.vue2.cjs +1 -1
  136. package/lib/components/upload/upload.vue.d.ts +2 -2
  137. package/lib/components/upload/upload.vue2.cjs +1 -1
  138. package/lib/components/upload/utils.cjs +1 -1
  139. package/lib/constants/date.cjs +1 -1
  140. package/lib/constants/date.d.ts +1 -1
  141. package/lib/index.cjs +1 -1
  142. package/lib/index.d.ts +1 -0
  143. package/lib/locale/index.cjs +1 -0
  144. package/lib/locale/index.d.cjs +1 -0
  145. package/lib/locale/index.d.ts +26 -0
  146. package/lib/locale/lang/en.cjs +1 -0
  147. package/lib/locale/lang/en.d.ts +183 -0
  148. package/lib/locale/lang/zh-cn.cjs +1 -0
  149. package/lib/locale/lang/zh-cn.d.ts +183 -0
  150. package/lib/locale/lang/zh-tw.cjs +1 -0
  151. package/lib/locale/lang/zh-tw.d.ts +183 -0
  152. package/lib/locale/use-locale.cjs +1 -0
  153. package/lib/locale/use-locale.d.ts +17 -0
  154. package/lib/package.json.cjs +1 -1
  155. package/lib/package.json.d.ts +1 -1
  156. package/package.json +3 -3
  157. package/theme-style/index.css +1 -1
  158. package/theme-style/src/super-form.scss +0 -1
  159. package/theme-style/vft-super-form.css +1 -1
  160. 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 S } from "../date-picker/index.js";
4
- import { VftDropdown as q } from "../dropdown/index.js";
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 z } from "../../hooks/use-namespace/index.js";
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 B = F({
16
+ const J = F({
16
17
  name: "vft-date-time-select"
17
- }), oe = /* @__PURE__ */ F({
18
- ...B,
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, o = z("date-time-select"), C = u(!1), g = u(), I = u("请选择时间"), t = u("");
32
- function M(n) {
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: l = !0,
40
+ dateRange: n = !0,
38
41
  startOfType: O,
39
42
  endOfType: V
40
- } = n;
43
+ } = o;
41
44
  let m, r, L;
42
- const p = f || d.defaultFormat, s = v().format(p), R = (i, j = !0) => {
45
+ const p = f || d.defaultFormat, s = v().format(p), T = (i, j = !0) => {
43
46
  let D;
44
- const T = j ? "startOf" : "endOf";
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
+ 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 = R(O)), V && (r = R(V, !1)), L = v().add(a, h).format(p);
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 l ? m && r ? [c, r] : a > 0 ? [c !== r && r || s, c] : a === 0 ? [m || s, r || s] : [c, c !== r && r || s] : c;
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 N(n, a) {
52
- g.value = n, y.value.handleClose(), t.value = M(a), H("change", t.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 P() {
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 $(n) {
59
- C.value = n;
61
+ function $(o) {
62
+ C.value = o;
60
63
  }
61
64
  const b = () => {
62
- const n = Y(d.dateList[0]) ? d.dateList : [d.dateList];
65
+ const o = Y(d.dateList[0]) ? d.dateList : [d.dateList];
63
66
  return e("div", {
64
- class: o.e("content")
65
- }, [e(E, null, [n.map((a, h) => e("div", {
67
+ class: l.e("content")
68
+ }, [e(E, null, [o.map((a, h) => e("div", {
66
69
  key: h,
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)
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: l
73
- }, [f.text]), g.value === l ? e(k, {
75
+ key: n
76
+ }, [f.text]), g.value === n ? e(k, {
74
77
  icon: "icon-check"
75
- }, null) : null])), e(S, {
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(q, {
85
+ return () => e(z, {
83
86
  ref: y,
84
87
  trigger: "click",
85
88
  teleported: !1,
86
- class: o.b(),
89
+ class: l.b(),
87
90
  onVisibleChange: $
88
91
  }, {
89
92
  default: () => [e("span", {
90
- class: [o.e("trigger"), "cursor-pointer"]
93
+ class: [l.e("trigger"), "cursor-pointer"]
91
94
  }, [e("span", {
92
95
  class: [w.value ? "text" : "placeholder"]
93
- }, [w.value || I.value]), t.value ? e(k, {
94
- onClick: P,
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
- oe as default
111
+ ce as default
109
112
  };
@@ -1,31 +1,32 @@
1
- import { defineComponent as S, getCurrentInstance as X, ref as a, computed as b, watch as Z, toRef as h, onBeforeUnmount as _, provide as T, createElementBlock as ee, openBlock as $, normalizeClass as x, unref as o, createVNode as r, createBlock as te, createCommentVNode as oe, createSlots as ne, withCtx as n, renderSlot as y, mergeProps as I } from "vue";
2
- import { VftButtonGroup as re, VftButton as O } from "../button/index.js";
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 le } from "../icon/index.js";
5
- import ie from "../roving-focus-group/roving-focus-group.vue2.js";
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 ae } from "../scrollbar/index.js";
11
- import { OnlyChild as de } from "../slot/only-child.js";
12
- import { VftTooltip as fe } from "../tooltip/index.js";
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 ue } from "@vft/utils";
15
- import { addUnit as se } from "../../utils/helper.js";
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 ce } from "../../hooks/use-id/index.js";
18
- import { useNamespace as me } from "../../hooks/use-namespace/index.js";
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 { DROPDOWN_INJECTION_KEY as pe } from "./tokens.js";
23
- import { VftCollection as ve } from "./types.js";
24
- import { useFormSize as ge } from "../form/hooks/use-form-common-props.js";
25
- const be = S({
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
- }), Ue = /* @__PURE__ */ S({
28
- ...be,
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: R }) {
52
- const d = e, u = R, l = me("dropdown"), L = X(), i = a(), C = a(), m = a(null), f = a(null), V = a(null), p = a(null), k = a(!1), N = [w.enter, w.space, w.down], D = b(() => ({
53
- maxHeight: se(d.maxHeight)
54
- })), H = ce().value, v = b(() => d.id || H);
55
- Z(
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 Q = ue(c) ? c : [c];
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 && Q.includes("hover") && 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 P() {
78
+ function A() {
78
79
  E();
79
80
  }
80
81
  function E() {
81
82
  m.value?.onClose();
82
83
  }
83
- function A() {
84
+ function F() {
84
85
  m.value?.onOpen();
85
86
  }
86
- const g = ge();
87
- function F(...t) {
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 G(t) {
99
+ function J(t) {
99
100
  p.value = t;
100
101
  }
101
- function J(t) {
102
+ function M(t) {
102
103
  k.value || (t.preventDefault(), t.stopImmediatePropagation());
103
104
  }
104
- function M() {
105
+ function W() {
105
106
  u("visible-change", !0);
106
107
  }
107
- function W(t) {
108
+ function Y(t) {
108
109
  t?.type === "keydown" && f.value?.focus();
109
110
  }
110
- function Y() {
111
+ function j() {
111
112
  u("visible-change", !1);
112
113
  }
113
- T(pe, {
114
+ T(ge, {
114
115
  contentRef: f,
115
116
  role: b(() => d.role),
116
117
  triggerId: v,
117
118
  isUsingKeyboard: k,
118
- onItemEnter: K,
119
- onItemLeave: U
119
+ onItemEnter: U,
120
+ onItemLeave: G
120
121
  }), T("elDropdown", {
121
- instance: L,
122
+ instance: V,
122
123
  dropdownSize: g,
123
- handleClick: P,
124
- commandHandler: F,
124
+ handleClick: A,
125
+ commandHandler: K,
125
126
  trigger: h(d, "trigger"),
126
127
  hideOnClick: h(d, "hideOnClick")
127
128
  });
128
- const j = (t) => {
129
+ const q = (t) => {
129
130
  t.preventDefault(), f.value?.focus?.({
130
131
  preventScroll: !0
131
132
  });
132
- }, q = (t) => {
133
+ }, Q = (t) => {
133
134
  u("click", t);
134
135
  };
135
136
  return z({
136
137
  handleClose: E,
137
- handleOpen: A,
138
+ handleOpen: F,
138
139
  // Todo
139
- onFocusAfterTrapped: j
140
- }), (t, c) => ($(), ee("div", {
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(fe), {
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: M,
169
- onShow: W,
170
- onBeforeHide: Y
171
- }, ne({
169
+ onBeforeShow: W,
170
+ onShow: Y,
171
+ onBeforeHide: j
172
+ }, re({
172
173
  content: n(() => [
173
- r(o(ae), {
174
+ r(o(de), {
174
175
  ref_key: "scrollbar",
175
- ref: V,
176
- "wrap-style": D.value,
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(ie), {
182
+ r(o(ae), {
182
183
  loop: e.loop,
183
184
  "current-tab-id": p.value,
184
185
  orientation: "horizontal",
185
- onCurrentTabIdChange: G,
186
- onEntryFocus: J
186
+ onCurrentTabIdChange: J,
187
+ onEntryFocus: M
187
188
  }, {
188
189
  default: n(() => [
189
- r(o(ve), null, {
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(de), {
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 ? ($(), te(o(re), { key: 0 }, {
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: q
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(le), {
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
- })) : oe("", !0)
264
+ })) : ne("", !0)
264
265
  ], 2));
265
266
  }
266
267
  });
267
268
  export {
268
- Ue as default
269
+ Me as default
269
270
  };
@@ -1,71 +1,72 @@
1
- import { defineComponent as d, getCurrentInstance as v, computed as s, createElementBlock as l, openBlock as a, normalizeClass as c, unref as t, createElementVNode as k, createCommentVNode as i, renderSlot as u, createBlock as z, normalizeProps as x, mergeProps as C, createVNode as E } from "vue";
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 D, renderTNode as $, VNode as b } from "@vft/utils";
5
- import { addUnit as h } from "../../utils/helper.js";
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 w } from "../../hooks/use-namespace/index.js";
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 B = d({
14
+ const I = p({
14
15
  name: "vft-empty"
15
- }), J = /* @__PURE__ */ d({
16
- ...B,
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(o) {
24
- const n = w("empty"), p = v(), f = /* @__PURE__ */ new Map([
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
- ]), N = s(() => f.get(o.type)), g = s(() => {
68
- switch (o.size) {
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 o.size || 80;
77
+ return n.size || 80;
77
78
  }
78
- }), y = s(() => D(o.icon, "icon", {
79
- size: h(g.value),
80
- icon: o.type
81
- })), m = s(
82
- () => $(p, "desc", { defaultNode: N.value?.text })
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 (r, I) => (a(), l("div", {
85
- class: c([t(n).b()])
85
+ return (a, P) => (m(), l("div", {
86
+ class: c([o(r).b()])
86
87
  }, [
87
- k("div", {
88
- class: c(t(n).e("image"))
88
+ z("div", {
89
+ class: c(o(r).e("image"))
89
90
  }, [
90
- r.$slots.img ? u(r.$slots, "img", { key: 0 }) : (a(), z(t(V), x(C({ key: 1 }, y.value)), null, 16))
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
- m.value ? (a(), l("span", {
93
+ i.value ? (m(), l("span", {
93
94
  key: 0,
94
- class: c(t(n).e("desc"))
95
+ class: c(o(r).e("desc"))
95
96
  }, [
96
- E(t(b), { content: m.value }, null, 8, ["content"])
97
- ], 2)) : i("", !0),
98
- r.$slots.default ? (a(), l("div", {
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(t(n).e("bottom"))
101
+ class: c(o(r).e("bottom"))
101
102
  }, [
102
- u(r.$slots, "default")
103
- ], 2)) : i("", !0)
103
+ d(a.$slots, "default")
104
+ ], 2)) : u("", !0)
104
105
  ], 2));
105
106
  }
106
107
  });
107
108
  export {
108
- J as default
109
+ Q as default
109
110
  };
@@ -1,20 +1,21 @@
1
- import { defineComponent as r, createBlock as p, openBlock as s, unref as o, mergeProps as m } from "vue";
2
- import { useFullscreen as a } from "@vft/use";
3
- import { delObjAttrNotExist as u } from "@vft/utils";
4
- import { VftIconText as f } from "../icon-text/index.js";
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 x } from "../../hooks/use-namespace/index.js";
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
- const _ = r({
14
+ import { useLocale as v } from "../../locale/use-locale.js";
15
+ const y = r({
15
16
  name: "full-screen"
16
- }), z = /* @__PURE__ */ r({
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(t) {
36
- const n = t, l = x("full-screen"), { toggle: i, isFullscreen: e } = a(), c = d().value;
37
- return (y, B) => (s(), p(o(f), m({
38
- class: o(l).b(),
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(c),
41
+ "hover-color": o(s),
41
42
  onClick: o(i),
42
- icon: o(e) ? "icon-exit-full-screen" : "icon-full-screen",
43
- text: o(e) ? "退出全屏" : "全屏"
44
- }, o(u)(n, !0, !0), { pointer: "" }), null, 16, ["class", "hover-color", "onClick", "icon", "text"]));
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
- z as default
49
+ A as default
49
50
  };