vft 0.0.506 → 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 (161) hide show
  1. package/dist/index.css +1 -1
  2. package/es/components/cascader/cascader.vue2.js +203 -202
  3. package/es/components/cascader-panel/menu.vue2.js +50 -49
  4. package/es/components/clamp-toggle/clamp-toggle.vue2.js +21 -17
  5. package/es/components/color-picker/color-picker.vue2.js +134 -133
  6. package/es/components/config-provider/config-provider.vue.d.ts +2 -0
  7. package/es/components/config-provider/config-provider.vue2.js +5 -4
  8. package/es/components/config-provider/constants.d.ts +1 -0
  9. package/es/components/config-provider/constants.js +3 -2
  10. package/es/components/config-provider/hooks/use-global-config.js +33 -30
  11. package/es/components/config-provider/index.d.ts +9 -0
  12. package/es/components/config-provider/index.js +6 -5
  13. package/es/components/date-picker/composables/use-basic-date-table.d.ts +1 -1
  14. package/es/components/date-picker/composables/use-basic-date-table.js +124 -123
  15. package/es/components/date-picker/composables/use-month-range-header.js +15 -14
  16. package/es/components/date-picker/composables/use-panel-date-range.js +24 -23
  17. package/es/components/date-picker/date-picker-com/basic-month-table.vue2.js +39 -38
  18. package/es/components/date-picker/date-picker-com/basic-year-table.vue2.js +39 -38
  19. package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +179 -178
  20. package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +225 -224
  21. package/es/components/date-time-select/date-time-select.vue2.js +39 -36
  22. package/es/components/dropdown/dropdown.vue2.js +68 -67
  23. package/es/components/empty/empty.vue2.js +39 -38
  24. package/es/components/full-screen/full-screen.vue2.js +18 -17
  25. package/es/components/image/image.vue2.js +60 -59
  26. package/es/components/image-viewer/image-viewer.vue2.js +45 -44
  27. package/es/components/index.js +161 -160
  28. package/es/components/input/index.d.ts +5 -0
  29. package/es/components/input/input.vue.d.ts +2 -0
  30. package/es/components/input/input.vue2.js +42 -41
  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/lib/components/cascader/cascader.vue2.cjs +1 -1
  81. package/lib/components/cascader-panel/menu.vue2.cjs +4 -4
  82. package/lib/components/clamp-toggle/clamp-toggle.vue2.cjs +1 -1
  83. package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
  84. package/lib/components/config-provider/config-provider.vue.d.ts +2 -0
  85. package/lib/components/config-provider/config-provider.vue2.cjs +1 -1
  86. package/lib/components/config-provider/constants.cjs +1 -1
  87. package/lib/components/config-provider/constants.d.ts +1 -0
  88. package/lib/components/config-provider/hooks/use-global-config.cjs +1 -1
  89. package/lib/components/config-provider/index.cjs +1 -1
  90. package/lib/components/config-provider/index.d.ts +9 -0
  91. package/lib/components/date-picker/composables/use-basic-date-table.cjs +1 -1
  92. package/lib/components/date-picker/composables/use-basic-date-table.d.ts +1 -1
  93. package/lib/components/date-picker/composables/use-month-range-header.cjs +1 -1
  94. package/lib/components/date-picker/composables/use-panel-date-range.cjs +1 -1
  95. package/lib/components/date-picker/date-picker-com/basic-month-table.vue2.cjs +1 -1
  96. package/lib/components/date-picker/date-picker-com/basic-year-table.vue2.cjs +1 -1
  97. package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
  98. package/lib/components/date-picker/date-picker-com/panel-date-range.vue2.cjs +1 -1
  99. package/lib/components/date-time-select/date-time-select.vue2.cjs +1 -1
  100. package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
  101. package/lib/components/empty/empty.vue2.cjs +1 -1
  102. package/lib/components/full-screen/full-screen.vue2.cjs +1 -1
  103. package/lib/components/image/image.vue2.cjs +1 -1
  104. package/lib/components/image-viewer/image-viewer.vue2.cjs +1 -1
  105. package/lib/components/index.cjs +1 -1
  106. package/lib/components/input/index.d.ts +5 -0
  107. package/lib/components/input/input.vue.d.ts +2 -0
  108. package/lib/components/input/input.vue2.cjs +1 -1
  109. package/lib/components/md-container/md-container.vue2.cjs +1 -1
  110. package/lib/components/md-container/toc.cjs +1 -1
  111. package/lib/components/modal/modal-footer-action.vue2.cjs +1 -1
  112. package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
  113. package/lib/components/multiple-tabs/use/use-tab-dropdown.cjs +1 -1
  114. package/lib/components/pagination/components/jumper.vue2.cjs +1 -1
  115. package/lib/components/pagination/components/sizes.vue2.cjs +1 -1
  116. package/lib/components/pagination/components/total.vue2.cjs +1 -1
  117. package/lib/components/popconfirm/popconfirm.vue2.cjs +1 -1
  118. package/lib/components/search/search.vue2.cjs +1 -1
  119. package/lib/components/select/useSelect.cjs +1 -1
  120. package/lib/components/super-form/super-form-action.vue2.cjs +1 -1
  121. package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
  122. package/lib/components/super-form/use/helper.cjs +1 -1
  123. package/lib/components/super-form/use/helper.d.ts +1 -1
  124. package/lib/components/table/field.cjs +1 -1
  125. package/lib/components/table/table.vue2.cjs +1 -1
  126. package/lib/components/table/use/use-columns.cjs +1 -1
  127. package/lib/components/table/use/use-data-source.cjs +1 -1
  128. package/lib/components/time-picker/time-picker-com/panel-time-pick.vue2.cjs +1 -1
  129. package/lib/components/time-picker/time-picker-com/panel-time-range.vue2.cjs +1 -1
  130. package/lib/components/transfer/transfer-panel.vue2.cjs +1 -1
  131. package/lib/components/transfer/transfer.vue2.cjs +1 -1
  132. package/lib/components/tree/tree.vue2.cjs +1 -1
  133. package/lib/components/upload/index.d.ts +3 -3
  134. package/lib/components/upload/upload-content.vue.d.ts +2 -2
  135. package/lib/components/upload/upload-content.vue2.cjs +1 -1
  136. package/lib/components/upload/upload-list.vue2.cjs +1 -1
  137. package/lib/components/upload/upload.vue.d.ts +2 -2
  138. package/lib/components/upload/upload.vue2.cjs +1 -1
  139. package/lib/components/upload/utils.cjs +1 -1
  140. package/lib/constants/date.cjs +1 -1
  141. package/lib/constants/date.d.ts +1 -1
  142. package/lib/index.cjs +1 -1
  143. package/lib/index.d.ts +1 -0
  144. package/lib/locale/index.cjs +1 -0
  145. package/lib/locale/index.d.cjs +1 -0
  146. package/lib/locale/index.d.ts +26 -0
  147. package/lib/locale/lang/en.cjs +1 -0
  148. package/lib/locale/lang/en.d.ts +183 -0
  149. package/lib/locale/lang/zh-cn.cjs +1 -0
  150. package/lib/locale/lang/zh-cn.d.ts +183 -0
  151. package/lib/locale/lang/zh-tw.cjs +1 -0
  152. package/lib/locale/lang/zh-tw.d.ts +183 -0
  153. package/lib/locale/use-locale.cjs +1 -0
  154. package/lib/locale/use-locale.d.ts +17 -0
  155. package/lib/package.json.cjs +1 -1
  156. package/lib/package.json.d.ts +1 -1
  157. package/package.json +2 -2
  158. package/theme-style/index.css +1 -1
  159. package/theme-style/src/super-form.scss +0 -1
  160. package/theme-style/vft-super-form.css +1 -1
  161. package/web-types.json +1 -1
@@ -1,111 +1,112 @@
1
- import { defineComponent as Se, useAttrs as Ye, ref as c, computed as i, unref as s, watch as x, nextTick as N, onMounted as Ze, createBlock as E, openBlock as r, withCtx as v, createElementBlock as m, createCommentVNode as P, withDirectives as q, withModifiers as F, normalizeClass as d, renderSlot as V, createVNode as te, vShow as Te, Fragment as le, renderList as se, createElementVNode as z, toDisplayString as U, normalizeStyle as _e, createSlots as et, withKeys as tt, vModelText as lt } from "vue";
2
- import { cloneDeep as st, debounce as ot } from "lodash-es";
3
- import { useResizeObserver as at, useCssVar as nt } from "@vueuse/core";
4
- import { focusNode as rt, getSibling as it } from "../../utils/dom/aria.js";
5
- import { isPromise as ut, isClient as ct } from "@vft/utils";
6
- import { debugWarn as pt } from "../../utils/error.js";
1
+ import { defineComponent as Ne, useAttrs as Ze, ref as c, computed as i, unref as l, watch as x, nextTick as N, onMounted as _e, createBlock as E, openBlock as r, withCtx as v, createElementBlock as m, createCommentVNode as P, withDirectives as U, withModifiers as F, normalizeClass as d, renderSlot as V, createVNode as te, vShow as Ee, Fragment as se, renderList as le, createElementVNode as z, toDisplayString as A, normalizeStyle as et, createSlots as tt, withKeys as st, vModelText as lt } from "vue";
2
+ import { cloneDeep as ot, debounce as at } from "lodash-es";
3
+ import { useResizeObserver as nt, useCssVar as rt } from "@vueuse/core";
4
+ import { focusNode as it, getSibling as ut } from "../../utils/dom/aria.js";
5
+ import { isPromise as ct, isClient as pt } from "@vft/utils";
6
+ import { debugWarn as dt } from "../../utils/error.js";
7
7
  import "../config-provider/hooks/use-global-config.js";
8
8
  import { EVENT_CODE as h } from "../../constants/aria.js";
9
- import { UPDATE_MODEL_EVENT as dt, CHANGE_EVENT as ft } from "../../constants/event.js";
9
+ import { UPDATE_MODEL_EVENT as ft, CHANGE_EVENT as vt } from "../../constants/event.js";
10
10
  import "../form/index.js";
11
- import { VftCascaderPanel as vt } from "../cascader-panel/index.js";
12
- import { VftInput as mt } from "../input/index.js";
13
- import { VftTooltip as Ee } from "../tooltip/index.js";
14
- import { VftScrollbar as we } from "../scrollbar/index.js";
15
- import { VftTag as $e } from "../tag/index.js";
11
+ import { VftCascaderPanel as mt } from "../cascader-panel/index.js";
12
+ import { VftInput as gt } from "../input/index.js";
13
+ import { VftTooltip as we } from "../tooltip/index.js";
14
+ import { VftScrollbar as $e } from "../scrollbar/index.js";
15
+ import { VftTag as Ve } from "../tag/index.js";
16
16
  import { VftIcon as oe } from "../icon/index.js";
17
- import { ClickOutside as gt } from "@vft/directives";
18
- import { useNamespace as Ve } from "../../hooks/use-namespace/index.js";
17
+ import { ClickOutside as ht } from "@vft/directives";
18
+ import { useNamespace as Se } 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 { useComposition as ht } from "../../hooks/use-composition/index.js";
23
- import { useEmptyValues as kt } from "../../hooks/use-empty-values/index.js";
24
- import { cascaderEmits as Ct, cascaderProps as yt } from "./cascader.js";
25
- import { useFormItem as bt } from "../form/hooks/use-form-item.js";
26
- import { useFormSize as Tt } from "../form/hooks/use-form-common-props.js";
27
- const Et = { key: 0 }, wt = ["placeholder"], $t = ["onClick"], Vt = "VftCascader", St = Se({
28
- name: Vt
29
- }), el = /* @__PURE__ */ Se({
30
- ...St,
31
- props: yt,
32
- emits: Ct,
33
- setup(Ne, { expose: Pe, emit: De }) {
34
- const a = Ne, C = De, Ie = {
22
+ import { useComposition as kt } from "../../hooks/use-composition/index.js";
23
+ import { useEmptyValues as Ct } from "../../hooks/use-empty-values/index.js";
24
+ import { useLocale as yt } from "../../locale/use-locale.js";
25
+ import { cascaderEmits as bt, cascaderProps as Tt } from "./cascader.js";
26
+ import { useFormItem as Et } from "../form/hooks/use-form-item.js";
27
+ import { useFormSize as wt } from "../form/hooks/use-form-common-props.js";
28
+ const $t = { key: 0 }, Vt = ["placeholder"], St = ["onClick"], Nt = "VftCascader", Pt = Ne({
29
+ name: Nt
30
+ }), ls = /* @__PURE__ */ Ne({
31
+ ...Pt,
32
+ props: Tt,
33
+ emits: bt,
34
+ setup(Pe, { expose: De, emit: Ie }) {
35
+ const a = Pe, C = Ie, xe = {
35
36
  modifiers: [
36
37
  {
37
38
  name: "arrowPosition",
38
39
  enabled: !0,
39
40
  phase: "main",
40
41
  fn: ({ state: e }) => {
41
- const { modifiersData: t, placement: l } = e;
42
- ["right", "left", "bottom", "top"].includes(l) || t.arrow && (t.arrow.x = 35);
42
+ const { modifiersData: t, placement: s } = e;
43
+ ["right", "left", "bottom", "top"].includes(s) || t.arrow && (t.arrow.x = 35);
43
44
  },
44
45
  requires: ["arrow"]
45
46
  }
46
47
  ]
47
- }, ae = Ye();
48
+ }, ae = Ze(), { t: ne } = yt();
48
49
  let D = 0, G = 0;
49
- const n = Ve("cascader"), j = Ve("input"), { form: xe, formItem: ne } = bt(), { valueOnClear: Fe } = kt(a), { isComposing: re, handleComposition: k } = ht({
50
+ const n = Se("cascader"), j = Se("input"), { form: Fe, formItem: re } = Et(), { valueOnClear: ze } = Ct(a), { isComposing: ie, handleComposition: k } = kt({
50
51
  afterComposition(e) {
51
52
  const t = e.target?.value;
52
53
  ee(t);
53
54
  }
54
- }), A = c(null), S = c(null), ie = c(null), f = c(null), K = c(null), g = c(!1), ue = c(!1), y = c(!1), J = c(!1), B = c(""), w = c(""), $ = c([]), H = c([]), Q = c([]), ze = i(() => ae.style), b = i(() => a.disabled || xe?.disabled), ce = i(() => a.placeholder ?? "请选择"), Ae = i(
55
- () => w.value || $.value.length > 0 || re.value ? "" : ce.value
56
- ), M = Tt(), pe = i(
57
- () => M.value === "small" ? "small" : "default"
58
- ), T = i(() => !!a.props.multiple), de = i(() => !a.filterable || T.value), fe = i(
59
- () => T.value ? w.value : B.value
60
- ), ve = [], O = i(() => {
55
+ }), K = c(null), S = c(null), ue = c(null), f = c(null), B = c(null), g = c(!1), ce = c(!1), y = c(!1), J = c(!1), H = c(""), w = c(""), $ = c([]), M = c([]), Q = c([]), Ae = i(() => ae.style), b = i(() => a.disabled || Fe?.disabled), pe = i(() => a.placeholder ?? ne("vft.cascader.placeholder")), Ke = i(
56
+ () => w.value || $.value.length > 0 || ie.value ? "" : pe.value
57
+ ), O = wt(), de = i(
58
+ () => O.value === "small" ? "small" : "default"
59
+ ), T = i(() => !!a.props.multiple), fe = i(() => !a.filterable || T.value), ve = i(
60
+ () => T.value ? w.value : H.value
61
+ ), me = [], L = i(() => {
61
62
  const e = f.value;
62
63
  if (!e)
63
- return ve;
64
- const t = e.checkedNodes, l = s(t);
65
- return Array.isArray(l) && l.length ? l : ve;
66
- }), Ke = i(() => !a.clearable || b.value || y.value ? !1 : !!O.value.length), L = i(() => {
67
- const { showAllLevels: e, separator: t } = a, l = O.value;
68
- return l.length ? T.value ? "" : l[0].calcText(e, t) : "";
69
- }), Be = i(() => ne?.validateState || ""), me = i({
64
+ return me;
65
+ const t = e.checkedNodes, s = l(t);
66
+ return Array.isArray(s) && s.length ? s : me;
67
+ }), Be = i(() => !a.clearable || b.value || y.value ? !1 : !!L.value.length), R = i(() => {
68
+ const { showAllLevels: e, separator: t } = a, s = L.value;
69
+ return s.length ? T.value ? "" : s[0].calcText(e, t) : "";
70
+ }), He = i(() => re?.validateState || ""), ge = i({
70
71
  get() {
71
- return st(a.modelValue);
72
+ return ot(a.modelValue);
72
73
  },
73
74
  set(e) {
74
- const t = e ?? Fe.value;
75
- C(dt, t), C(ft, t), a.validateEvent && ne?.validate("change").catch((l) => pt(l));
75
+ const t = e ?? ze.value;
76
+ C(ft, t), C(vt, t), a.validateEvent && re?.validate("change").catch((s) => dt(s));
76
77
  }
77
- }), He = i(() => [
78
+ }), Me = i(() => [
78
79
  n.b(),
79
- n.m(M.value),
80
+ n.m(O.value),
80
81
  n.is("disabled", b.value),
81
82
  ae.class
82
- ]), Me = i(() => [j.e("icon"), n.is("reverse", g.value)]), Oe = i(() => n.is("focus", g.value || J.value)), ge = i(() => A.value?.popperRef?.contentRef), p = (e) => {
83
+ ]), Oe = i(() => [j.e("icon"), n.is("reverse", g.value)]), Le = i(() => n.is("focus", g.value || J.value)), he = i(() => K.value?.popperRef?.contentRef), p = (e) => {
83
84
  b.value || (e = e ?? !g.value, e !== g.value && (g.value = e, S.value?.input?.setAttribute("aria-expanded", `${e}`), e ? (I(), N(f.value?.scrollToExpandingNode)) : a.filterable && _(), C("visibleChange", e)));
84
85
  }, I = () => {
85
86
  N(() => {
86
- A.value?.updatePopper();
87
+ K.value?.updatePopper();
87
88
  });
88
89
  }, X = () => {
89
90
  y.value = !1;
90
91
  }, Y = (e) => {
91
- const { showAllLevels: t, separator: l } = a;
92
+ const { showAllLevels: t, separator: s } = a;
92
93
  return {
93
94
  node: e,
94
95
  key: e.uid,
95
- text: e.calcText(t, l),
96
+ text: e.calcText(t, s),
96
97
  hitState: !1,
97
98
  closable: !b.value && !e.isDisabled,
98
99
  isCollapseTag: !1
99
100
  };
100
- }, R = (e) => {
101
+ }, W = (e) => {
101
102
  const t = e.node;
102
103
  t.doCheck(!1), f.value?.calculateCheckedValue(), C("removeTag", t.valueByOption);
103
- }, Le = () => {
104
+ }, Re = () => {
104
105
  switch (a.showCheckedStrategy) {
105
106
  case "child":
106
- return O.value;
107
+ return L.value;
107
108
  case "parent": {
108
- const e = ke(!1), t = e.map((o) => o.value);
109
+ const e = Ce(!1), t = e.map((o) => o.value);
109
110
  return e.filter(
110
111
  (o) => !o.parent || !t.includes(o.parent.value)
111
112
  );
@@ -113,39 +114,39 @@ const Et = { key: 0 }, wt = ["placeholder"], $t = ["onClick"], Vt = "VftCascader
113
114
  default:
114
115
  return [];
115
116
  }
116
- }, Re = () => {
117
+ }, We = () => {
117
118
  if (!T.value) return;
118
- const e = Le(), t = [], l = [];
119
- if (e.forEach((o) => l.push(Y(o))), H.value = l, e.length) {
120
- e.slice(0, a.maxCollapseTags).forEach((W) => t.push(Y(W)));
119
+ const e = Re(), t = [], s = [];
120
+ if (e.forEach((o) => s.push(Y(o))), M.value = s, e.length) {
121
+ e.slice(0, a.maxCollapseTags).forEach((q) => t.push(Y(q)));
121
122
  const o = e.slice(a.maxCollapseTags), u = o.length;
122
123
  u && (a.collapseTags ? t.push({
123
124
  key: -1,
124
125
  text: `+ ${u}`,
125
126
  closable: !1,
126
127
  isCollapseTag: !0
127
- }) : o.forEach((W) => t.push(Y(W))));
128
+ }) : o.forEach((q) => t.push(Y(q))));
128
129
  }
129
130
  $.value = t;
130
- }, he = () => {
131
- const { filterMethod: e, showAllLevels: t, separator: l } = a, o = f.value?.getFlattedNodes(!a.props.checkStrictly)?.filter((u) => u.isDisabled ? !1 : (u.calcText(t, l), e(u, fe.value)));
131
+ }, ke = () => {
132
+ const { filterMethod: e, showAllLevels: t, separator: s } = a, o = f.value?.getFlattedNodes(!a.props.checkStrictly)?.filter((u) => u.isDisabled ? !1 : (u.calcText(t, s), e(u, ve.value)));
132
133
  T.value && ($.value.forEach((u) => {
133
134
  u.hitState = !1;
134
- }), H.value.forEach((u) => {
135
+ }), M.value.forEach((u) => {
135
136
  u.hitState = !1;
136
137
  })), y.value = !0, Q.value = o, I();
137
- }, We = () => {
138
+ }, qe = () => {
138
139
  let e;
139
- y.value && K.value ? e = K.value.$el.querySelector(
140
+ y.value && B.value ? e = B.value.$el.querySelector(
140
141
  `.${n.e("suggestion-item")}`
141
142
  ) : e = f.value?.$el.querySelector(
142
143
  `.${n.b("node")}[tabindex="-1"]`
143
144
  ), e && (e.focus(), !y.value && e.click());
144
145
  }, Z = () => {
145
- const e = S.value?.input, t = ie.value, l = K.value?.$el;
146
- if (!(!ct || !e)) {
147
- if (l) {
148
- const o = l.querySelector(
146
+ const e = S.value?.input, t = ue.value, s = B.value?.$el;
147
+ if (!(!pt || !e)) {
148
+ if (s) {
149
+ const o = s.querySelector(
149
150
  `.${n.e("suggestion-list")}`
150
151
  );
151
152
  o.style.minWidth = `${e.offsetWidth}px`;
@@ -155,17 +156,17 @@ const Et = { key: 0 }, wt = ["placeholder"], $t = ["onClick"], Vt = "VftCascader
155
156
  e.style.height = u, I();
156
157
  }
157
158
  }
158
- }, ke = (e) => f.value?.getCheckedNodes(e), qe = (e) => {
159
+ }, Ce = (e) => f.value?.getCheckedNodes(e), Ue = (e) => {
159
160
  I(), C("expandChange", e);
160
- }, Ue = (e) => {
161
- if (!re.value)
161
+ }, Ge = (e) => {
162
+ if (!ie.value)
162
163
  switch (e.code) {
163
164
  case h.enter:
164
165
  case h.numpadEnter:
165
166
  p();
166
167
  break;
167
168
  case h.down:
168
- p(!0), N(We), e.preventDefault();
169
+ p(!0), N(qe), e.preventDefault();
169
170
  break;
170
171
  case h.esc:
171
172
  g.value === !0 && (e.preventDefault(), e.stopPropagation(), p(!1));
@@ -174,23 +175,23 @@ const Et = { key: 0 }, wt = ["placeholder"], $t = ["onClick"], Vt = "VftCascader
174
175
  p(!1);
175
176
  break;
176
177
  }
177
- }, Ge = () => {
178
+ }, je = () => {
178
179
  f.value?.clearCheckedNodes(), !g.value && a.filterable && _(), p(!1), C("clear");
179
180
  }, _ = () => {
180
- const { value: e } = L;
181
- B.value = e, w.value = e;
182
- }, je = (e) => {
181
+ const { value: e } = R;
182
+ H.value = e, w.value = e;
183
+ }, Je = (e) => {
183
184
  const { checked: t } = e;
184
185
  T.value ? f.value?.handleCheckChange(e, !t, !1) : (!t && f.value?.handleCheckChange(e, !0, !1), p(!1));
185
- }, Je = (e) => {
186
- const t = e.target, { code: l } = e;
187
- switch (l) {
186
+ }, Qe = (e) => {
187
+ const t = e.target, { code: s } = e;
188
+ switch (s) {
188
189
  case h.up:
189
190
  case h.down: {
190
191
  e.preventDefault();
191
- const o = l === h.up ? -1 : 1;
192
- rt(
193
- it(
192
+ const o = s === h.up ? -1 : 1;
193
+ it(
194
+ ut(
194
195
  t,
195
196
  o,
196
197
  `.${n.e("suggestion-item")}[tabindex="-1"]`
@@ -203,44 +204,44 @@ const Et = { key: 0 }, wt = ["placeholder"], $t = ["onClick"], Vt = "VftCascader
203
204
  t.click();
204
205
  break;
205
206
  }
206
- }, Qe = () => {
207
+ }, Xe = () => {
207
208
  const e = $.value, t = e[e.length - 1];
208
- G = w.value ? 0 : G + 1, !(!t || !G || a.collapseTags && e.length > 1) && (t.hitState ? R(t) : t.hitState = !0);
209
- }, Ce = (e) => {
210
- J.value = !0, C("focus", e);
209
+ G = w.value ? 0 : G + 1, !(!t || !G || a.collapseTags && e.length > 1) && (t.hitState ? W(t) : t.hitState = !0);
211
210
  }, ye = (e) => {
211
+ J.value = !0, C("focus", e);
212
+ }, be = (e) => {
212
213
  N(() => {
213
- const t = S.value?.$el, l = document.activeElement;
214
- t?.contains(l) || A.value?.isFocusInsideContent?.(e) || (J.value = !1);
214
+ const t = S.value?.$el, s = document.activeElement;
215
+ t?.contains(s) || K.value?.isFocusInsideContent?.(e) || (J.value = !1);
215
216
  }), C("blur", e);
216
- }, Xe = ot(() => {
217
- const { value: e } = fe;
217
+ }, Ye = at(() => {
218
+ const { value: e } = ve;
218
219
  if (!e) return;
219
220
  const t = a.beforeFilter(e);
220
- ut(t) ? t.then(he).catch(() => {
221
- }) : t !== !1 ? he() : X();
221
+ ct(t) ? t.then(ke).catch(() => {
222
+ }) : t !== !1 ? ke() : X();
222
223
  }, a.debounce), ee = (e, t) => {
223
- !g.value && p(!0), !t?.isComposing && (e ? Xe() : X());
224
- }, be = (e) => Number.parseFloat(
225
- nt(j.cssVarName("input-height"), e).value
224
+ !g.value && p(!0), !t?.isComposing && (e ? Ye() : X());
225
+ }, Te = (e) => Number.parseFloat(
226
+ rt(j.cssVarName("input-height"), e).value
226
227
  ) - 2;
227
228
  return x(y, I), x(
228
- [O, b, () => a.collapseTags],
229
- Re
229
+ [L, b, () => a.collapseTags],
230
+ We
230
231
  ), x($, () => {
231
232
  N(() => Z());
232
- }), x(M, async () => {
233
+ }), x(O, async () => {
233
234
  await N();
234
235
  const e = S.value.input;
235
- D = be(e) || D, Z();
236
- }), x(L, _, { immediate: !0 }), Ze(() => {
237
- const e = S.value.input, t = be(e);
238
- D = e.offsetHeight || t, at(e, Z);
239
- }), Pe({
236
+ D = Te(e) || D, Z();
237
+ }), x(R, _, { immediate: !0 }), _e(() => {
238
+ const e = S.value.input, t = Te(e);
239
+ D = e.offsetHeight || t, nt(e, Z);
240
+ }), De({
240
241
  /**
241
242
  * @description get an array of currently selected node,(leafOnly) whether only return the leaf checked nodes, default is `false`
242
243
  */
243
- getCheckedNodes: ke,
244
+ getCheckedNodes: Ce,
244
245
  /**
245
246
  * @description cascader panel ref
246
247
  */
@@ -252,67 +253,67 @@ const Et = { key: 0 }, wt = ["placeholder"], $t = ["onClick"], Vt = "VftCascader
252
253
  /**
253
254
  * @description cascader content ref
254
255
  */
255
- contentRef: ge,
256
+ contentRef: he,
256
257
  /**
257
258
  * @description selected content text
258
259
  */
259
- presentText: L
260
- }), (e, t) => (r(), E(s(Ee), {
260
+ presentText: R
261
+ }), (e, t) => (r(), E(l(we), {
261
262
  ref_key: "tooltipRef",
262
- ref: A,
263
+ ref: K,
263
264
  visible: g.value,
264
265
  teleported: e.teleported,
265
- "popper-class": [s(n).e("dropdown"), e.popperClass],
266
- "popper-options": Ie,
266
+ "popper-class": [l(n).e("dropdown"), e.popperClass],
267
+ "popper-options": xe,
267
268
  "fallback-placements": e.fallbackPlacements,
268
269
  "stop-popper-mouse-event": !1,
269
270
  "gpu-acceleration": !1,
270
271
  placement: e.placement,
271
- transition: `${s(n).namespace.value}-zoom-in-top`,
272
+ transition: `${l(n).namespace.value}-zoom-in-top`,
272
273
  effect: e.effect,
273
274
  pure: "",
274
275
  persistent: e.persistent,
275
276
  onHide: X
276
277
  }, {
277
278
  default: v(() => [
278
- q((r(), m("div", {
279
- class: d(He.value),
280
- style: _e(ze.value),
281
- onClick: t[8] || (t[8] = () => p(de.value ? void 0 : !0)),
282
- onKeydown: Ue,
283
- onMouseenter: t[9] || (t[9] = (l) => ue.value = !0),
284
- onMouseleave: t[10] || (t[10] = (l) => ue.value = !1)
279
+ U((r(), m("div", {
280
+ class: d(Me.value),
281
+ style: et(Ae.value),
282
+ onClick: t[8] || (t[8] = () => p(fe.value ? void 0 : !0)),
283
+ onKeydown: Ge,
284
+ onMouseenter: t[9] || (t[9] = (s) => ce.value = !0),
285
+ onMouseleave: t[10] || (t[10] = (s) => ce.value = !1)
285
286
  }, [
286
- te(s(mt), {
287
+ te(l(gt), {
287
288
  ref_key: "input",
288
289
  ref: S,
289
- modelValue: B.value,
290
- "onUpdate:modelValue": t[1] || (t[1] = (l) => B.value = l),
291
- placeholder: Ae.value,
292
- readonly: de.value,
290
+ modelValue: H.value,
291
+ "onUpdate:modelValue": t[1] || (t[1] = (s) => H.value = s),
292
+ placeholder: Ke.value,
293
+ readonly: fe.value,
293
294
  disabled: b.value,
294
295
  "validate-event": !1,
295
- size: s(M),
296
- class: d(Oe.value),
296
+ size: l(O),
297
+ class: d(Le.value),
297
298
  tabindex: T.value && e.filterable && !b.value ? -1 : void 0,
298
- onCompositionstart: s(k),
299
- onCompositionupdate: s(k),
300
- onCompositionend: s(k),
301
- onFocus: Ce,
302
- onBlur: ye,
299
+ onCompositionstart: l(k),
300
+ onCompositionupdate: l(k),
301
+ onCompositionend: l(k),
302
+ onFocus: ye,
303
+ onBlur: be,
303
304
  onInput: ee
304
- }, et({
305
+ }, tt({
305
306
  suffix: v(() => [
306
- Ke.value ? (r(), E(s(oe), {
307
+ Be.value ? (r(), E(l(oe), {
307
308
  key: "clear",
308
309
  icon: "icon-circle-close",
309
- class: d(["icon-circle-close", [s(j).e("icon")]]),
310
- onClick: F(Ge, ["stop"])
311
- }, null, 8, ["class"])) : (r(), E(s(oe), {
310
+ class: d(["icon-circle-close", [l(j).e("icon")]]),
311
+ onClick: F(je, ["stop"])
312
+ }, null, 8, ["class"])) : (r(), E(l(oe), {
312
313
  icon: "icon-arrow-down",
313
314
  key: "arrow-down",
314
- class: d(Me.value),
315
- onClick: t[0] || (t[0] = F((l) => p(), ["stop"]))
315
+ class: d(Oe.value),
316
+ onClick: t[0] || (t[0] = F((s) => p(), ["stop"]))
316
317
  }, null, 8, ["class"]))
317
318
  ]),
318
319
  _: 2
@@ -328,28 +329,28 @@ const Et = { key: 0 }, wt = ["placeholder"], $t = ["onClick"], Vt = "VftCascader
328
329
  T.value ? (r(), m("div", {
329
330
  key: 0,
330
331
  ref_key: "tagWrapper",
331
- ref: ie,
332
+ ref: ue,
332
333
  class: d([
333
- s(n).e("tags"),
334
- s(n).is("validate", !!Be.value)
334
+ l(n).e("tags"),
335
+ l(n).is("validate", !!He.value)
335
336
  ])
336
337
  }, [
337
338
  V(e.$slots, "tag", {
338
- data: H.value,
339
- deleteTag: R
339
+ data: M.value,
340
+ deleteTag: W
340
341
  }, () => [
341
- (r(!0), m(le, null, se($.value, (l) => (r(), E(s($e), {
342
- key: l.key,
342
+ (r(!0), m(se, null, le($.value, (s) => (r(), E(l(Ve), {
343
+ key: s.key,
343
344
  type: e.tagType,
344
- size: pe.value,
345
+ size: de.value,
345
346
  effect: e.tagEffect,
346
- hit: l.hitState,
347
- closable: l.closable,
347
+ hit: s.hitState,
348
+ closable: s.closable,
348
349
  "disable-transitions": "",
349
- onClose: (o) => R(l)
350
+ onClose: (o) => W(s)
350
351
  }, {
351
352
  default: v(() => [
352
- l.isCollapseTag === !1 ? (r(), m("span", Et, U(l.text), 1)) : (r(), E(s(Ee), {
353
+ s.isCollapseTag === !1 ? (r(), m("span", $t, A(s.text), 1)) : (r(), E(l(we), {
353
354
  key: 1,
354
355
  disabled: g.value || !e.collapseTagsTooltip,
355
356
  "fallback-placements": ["bottom", "top", "right", "left"],
@@ -357,33 +358,33 @@ const Et = { key: 0 }, wt = ["placeholder"], $t = ["onClick"], Vt = "VftCascader
357
358
  effect: e.effect
358
359
  }, {
359
360
  default: v(() => [
360
- z("span", null, U(l.text), 1)
361
+ z("span", null, A(s.text), 1)
361
362
  ]),
362
363
  content: v(() => [
363
- te(s(we), { "max-height": e.maxCollapseTagsTooltipHeight }, {
364
+ te(l($e), { "max-height": e.maxCollapseTagsTooltipHeight }, {
364
365
  default: v(() => [
365
366
  z("div", {
366
- class: d(s(n).e("collapse-tags"))
367
+ class: d(l(n).e("collapse-tags"))
367
368
  }, [
368
- (r(!0), m(le, null, se(H.value.slice(
369
+ (r(!0), m(se, null, le(M.value.slice(
369
370
  e.maxCollapseTags
370
371
  ), (o, u) => (r(), m("div", {
371
372
  key: u,
372
- class: d(s(n).e("collapse-tag"))
373
+ class: d(l(n).e("collapse-tag"))
373
374
  }, [
374
- (r(), E(s($e), {
375
+ (r(), E(l(Ve), {
375
376
  key: o.key,
376
377
  class: "in-tooltip",
377
378
  type: e.tagType,
378
- size: pe.value,
379
+ size: de.value,
379
380
  effect: e.tagEffect,
380
381
  hit: o.hitState,
381
382
  closable: o.closable,
382
383
  "disable-transitions": "",
383
- onClose: (W) => R(o)
384
+ onClose: (q) => W(o)
384
385
  }, {
385
386
  default: v(() => [
386
- z("span", null, U(o.text), 1)
387
+ z("span", null, A(o.text), 1)
387
388
  ]),
388
389
  _: 2
389
390
  }, 1032, ["type", "size", "effect", "hit", "closable", "onClose"]))
@@ -399,98 +400,98 @@ const Et = { key: 0 }, wt = ["placeholder"], $t = ["onClick"], Vt = "VftCascader
399
400
  _: 2
400
401
  }, 1032, ["type", "size", "effect", "hit", "closable", "onClose"]))), 128))
401
402
  ]),
402
- e.filterable && !b.value ? q((r(), m("input", {
403
+ e.filterable && !b.value ? U((r(), m("input", {
403
404
  key: 0,
404
- "onUpdate:modelValue": t[2] || (t[2] = (l) => w.value = l),
405
+ "onUpdate:modelValue": t[2] || (t[2] = (s) => w.value = s),
405
406
  type: "text",
406
- class: d(s(n).e("search-input")),
407
- placeholder: L.value ? "" : ce.value,
408
- onInput: t[3] || (t[3] = (l) => ee(w.value, l)),
409
- onClick: t[4] || (t[4] = F((l) => p(!0), ["stop"])),
410
- onKeydown: tt(Qe, ["delete"]),
407
+ class: d(l(n).e("search-input")),
408
+ placeholder: R.value ? "" : pe.value,
409
+ onInput: t[3] || (t[3] = (s) => ee(w.value, s)),
410
+ onClick: t[4] || (t[4] = F((s) => p(!0), ["stop"])),
411
+ onKeydown: st(Xe, ["delete"]),
411
412
  onCompositionstart: t[5] || (t[5] = //@ts-ignore
412
- (...l) => s(k) && s(k)(...l)),
413
+ (...s) => l(k) && l(k)(...s)),
413
414
  onCompositionupdate: t[6] || (t[6] = //@ts-ignore
414
- (...l) => s(k) && s(k)(...l)),
415
+ (...s) => l(k) && l(k)(...s)),
415
416
  onCompositionend: t[7] || (t[7] = //@ts-ignore
416
- (...l) => s(k) && s(k)(...l)),
417
- onFocus: Ce,
418
- onBlur: ye
419
- }, null, 42, wt)), [
417
+ (...s) => l(k) && l(k)(...s)),
418
+ onFocus: ye,
419
+ onBlur: be
420
+ }, null, 42, Vt)), [
420
421
  [lt, w.value]
421
422
  ]) : P("", !0)
422
423
  ], 2)) : P("", !0)
423
424
  ], 38)), [
424
- [s(gt), () => p(!1), ge.value]
425
+ [l(ht), () => p(!1), he.value]
425
426
  ])
426
427
  ]),
427
428
  content: v(() => [
428
429
  e.$slots.header ? (r(), m("div", {
429
430
  key: 0,
430
- class: d(s(n).e("header")),
431
+ class: d(l(n).e("header")),
431
432
  onClick: t[11] || (t[11] = F(() => {
432
433
  }, ["stop"]))
433
434
  }, [
434
435
  V(e.$slots, "header")
435
436
  ], 2)) : P("", !0),
436
- q(te(s(vt), {
437
+ U(te(l(mt), {
437
438
  ref_key: "cascaderPanelRef",
438
439
  ref: f,
439
- modelValue: me.value,
440
- "onUpdate:modelValue": t[12] || (t[12] = (l) => me.value = l),
440
+ modelValue: ge.value,
441
+ "onUpdate:modelValue": t[12] || (t[12] = (s) => ge.value = s),
441
442
  options: e.options,
442
443
  props: a.props,
443
444
  border: !1,
444
445
  "render-label": e.$slots.default,
445
- onExpandChange: qe,
446
- onClose: t[13] || (t[13] = (l) => e.$nextTick(() => p(!1)))
446
+ onExpandChange: Ue,
447
+ onClose: t[13] || (t[13] = (s) => e.$nextTick(() => p(!1)))
447
448
  }, {
448
449
  empty: v(() => [
449
450
  V(e.$slots, "empty")
450
451
  ]),
451
452
  _: 3
452
453
  }, 8, ["modelValue", "options", "props", "render-label"]), [
453
- [Te, !y.value]
454
+ [Ee, !y.value]
454
455
  ]),
455
- e.filterable ? q((r(), E(s(we), {
456
+ e.filterable ? U((r(), E(l($e), {
456
457
  key: 1,
457
458
  ref_key: "suggestionPanel",
458
- ref: K,
459
+ ref: B,
459
460
  tag: "ul",
460
- class: d(s(n).e("suggestion-panel")),
461
- "view-class": s(n).e("suggestion-list"),
462
- onKeydown: Je
461
+ class: d(l(n).e("suggestion-panel")),
462
+ "view-class": l(n).e("suggestion-list"),
463
+ onKeydown: Qe
463
464
  }, {
464
465
  default: v(() => [
465
- Q.value.length ? (r(!0), m(le, { key: 0 }, se(Q.value, (l) => (r(), m("li", {
466
- key: l.uid,
466
+ Q.value.length ? (r(!0), m(se, { key: 0 }, le(Q.value, (s) => (r(), m("li", {
467
+ key: s.uid,
467
468
  class: d([
468
- s(n).e("suggestion-item"),
469
- s(n).is("checked", l.checked)
469
+ l(n).e("suggestion-item"),
470
+ l(n).is("checked", s.checked)
470
471
  ]),
471
472
  tabindex: -1,
472
- onClick: (o) => je(l)
473
+ onClick: (o) => Je(s)
473
474
  }, [
474
- V(e.$slots, "suggestion-item", { item: l }, () => [
475
- z("span", null, U(l.text), 1),
476
- l.checked ? (r(), E(s(oe), {
475
+ V(e.$slots, "suggestion-item", { item: s }, () => [
476
+ z("span", null, A(s.text), 1),
477
+ s.checked ? (r(), E(l(oe), {
477
478
  key: 0,
478
479
  icon: "icon-check"
479
480
  })) : P("", !0)
480
481
  ])
481
- ], 10, $t))), 128)) : V(e.$slots, "empty", { key: 1 }, () => [
482
+ ], 10, St))), 128)) : V(e.$slots, "empty", { key: 1 }, () => [
482
483
  z("li", {
483
- class: d(s(n).e("empty-text"))
484
- }, "无匹配数据", 2)
484
+ class: d(l(n).e("empty-text"))
485
+ }, A(l(ne)("vft.cascader.noData")), 3)
485
486
  ])
486
487
  ]),
487
488
  _: 3
488
489
  }, 8, ["class", "view-class"])), [
489
- [Te, y.value]
490
+ [Ee, y.value]
490
491
  ]) : P("", !0),
491
492
  e.$slots.footer ? (r(), m("div", {
492
493
  key: 2,
493
- class: d(s(n).e("footer")),
494
+ class: d(l(n).e("footer")),
494
495
  onClick: t[14] || (t[14] = F(() => {
495
496
  }, ["stop"]))
496
497
  }, [
@@ -502,5 +503,5 @@ const Et = { key: 0 }, wt = ["placeholder"], $t = ["onClick"], Vt = "VftCascader
502
503
  }
503
504
  });
504
505
  export {
505
- el as default
506
+ ls as default
506
507
  };