vft 0.0.97 → 0.0.98

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 (198) hide show
  1. package/es/components/affix/affix.vue2.js +25 -26
  2. package/es/components/alert/alert.vue2.js +17 -18
  3. package/es/components/backtop/backtop.vue2.js +14 -15
  4. package/es/components/button/button-group.vue2.js +14 -15
  5. package/es/components/button/button.vue2.js +24 -25
  6. package/es/components/card/card.vue2.js +10 -11
  7. package/es/components/check-tag/check-tag.vue2.js +10 -11
  8. package/es/components/checkbox/checkbox-button.vue2.js +13 -14
  9. package/es/components/checkbox/checkbox-group.vue2.js +15 -16
  10. package/es/components/checkbox/checkbox.vue2.js +24 -25
  11. package/es/components/clamp/clamp.vue2.js +16 -17
  12. package/es/components/clamp-toggle/clamp-toggle.vue2.js +13 -14
  13. package/es/components/col/col.vue2.js +20 -21
  14. package/es/components/collapse-transition/src/collapse-transition.vue2.js +12 -13
  15. package/es/components/collection/collection-item.vue2.js +6 -7
  16. package/es/components/collection/collection.vue2.js +5 -7
  17. package/es/components/color-picker/color-picker.vue2.js +45 -46
  18. package/es/components/color-picker/components/alpha-slider.vue2.js +20 -21
  19. package/es/components/config-provider/config-provider.vue2.js +22 -23
  20. package/es/components/container/aside.vue2.js +12 -13
  21. package/es/components/container/container.vue2.js +10 -11
  22. package/es/components/container/footer.vue2.js +11 -12
  23. package/es/components/container/header.vue2.js +10 -11
  24. package/es/components/container/main.vue2.js +12 -13
  25. package/es/components/context-menu/context-menu.vue2.js +18 -19
  26. package/es/components/date-picker/date-picker-com/basic-date-table.vue2.js +87 -87
  27. package/es/components/date-picker/date-picker-com/basic-month-table.vue2.js +1 -1
  28. package/es/components/date-picker/date-picker-com/basic-year-table.vue2.js +1 -1
  29. package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +2 -2
  30. package/es/components/date-picker/date-picker-com/panel-month-range.vue2.js +39 -40
  31. package/es/components/date-time-select/date-time-select.vue2.js +20 -21
  32. package/es/components/descriptions/description-item.vue2.js +9 -10
  33. package/es/components/descriptions/description.vue2.js +20 -21
  34. package/es/components/descriptions/descriptions-row.vue2.js +15 -16
  35. package/es/components/dialog/dialog-content.vue2.js +12 -13
  36. package/es/components/dialog/dialog.vue2.js +40 -41
  37. package/es/components/divider/divider.vue2.js +10 -11
  38. package/es/components/dropdown/dropdown.vue2.js +38 -39
  39. package/es/components/empty/empty.vue2.js +11 -12
  40. package/es/components/footer-layout/footer-layout.vue2.js +7 -8
  41. package/es/components/form/form-item.vue2.js +43 -44
  42. package/es/components/form/form.vue2.js +28 -29
  43. package/es/components/full-screen/full-screen.vue2.js +15 -16
  44. package/es/components/header-layout/header-layout.vue2.js +21 -22
  45. package/es/components/horizontal-menu/horizontal-menu.vue2.js +50 -51
  46. package/es/components/icon/icon.vue2.js +12 -13
  47. package/es/components/icon-text/icon-text.vue2.js +13 -14
  48. package/es/components/iframe-layout/iframe-layout.vue2.js +15 -16
  49. package/es/components/iframe-layout/iframe-page.vue2.js +12 -13
  50. package/es/components/image/image.vue2.js +25 -26
  51. package/es/components/image-viewer/image-viewer.vue2.js +54 -55
  52. package/es/components/index.js +90 -90
  53. package/es/components/link/link.vue2.js +11 -12
  54. package/es/components/list-cell/list-cell.vue2.js +21 -22
  55. package/es/components/logo/logo.vue2.js +12 -13
  56. package/es/components/md-comment/md-comment.vue2.js +12 -13
  57. package/es/components/md-container/md-container.vue2.js +33 -34
  58. package/es/components/md-vue-playground/md-vue-playground.vue2.js +18 -19
  59. package/es/components/menu/menu-item-group.vue2.js +13 -14
  60. package/es/components/menu/menu-item.vue2.js +12 -13
  61. package/es/components/menu/menu.vue2.js +44 -45
  62. package/es/components/menu/sub-menu.vue2.js +30 -31
  63. package/es/components/multiple-tabs/multiple-tabs.vue2.js +35 -38
  64. package/es/components/overlay/overlay.vue2.js +23 -24
  65. package/es/components/page-wrapper/page-wrapper.vue2.js +17 -18
  66. package/es/components/pagination/pagination.vue2.js +17 -18
  67. package/es/components/popconfirm/popconfirm.vue2.js +17 -18
  68. package/es/components/popover/popover.vue2.js +31 -32
  69. package/es/components/popper/arrow.vue2.js +15 -16
  70. package/es/components/popper/content.vue2.js +38 -39
  71. package/es/components/popper/popper.vue2.js +13 -14
  72. package/es/components/popper/trigger.vue2.js +11 -12
  73. package/es/components/qrcode/qrcode.vue2.js +21 -22
  74. package/es/components/radio/radio-button.vue2.js +16 -17
  75. package/es/components/radio/radio-group.vue2.js +16 -17
  76. package/es/components/radio/radio.vue2.js +15 -16
  77. package/es/components/result/result.vue2.js +12 -13
  78. package/es/components/router-view-content/router-view-content.vue2.js +10 -11
  79. package/es/components/row/row.vue2.js +17 -18
  80. package/es/components/scrollbar/scrollbar.vue2.js +30 -31
  81. package/es/components/search/search.vue2.js +39 -40
  82. package/es/components/side-menu/side-menu.vue2.js +43 -45
  83. package/es/components/skeleton/skeleton-item.vue2.js +9 -10
  84. package/es/components/skeleton/skeleton.vue2.js +11 -12
  85. package/es/components/switch/switch.vue2.js +27 -28
  86. package/es/components/table/table.vue2.js +36 -37
  87. package/es/components/tabs/tab-nav.vue2.js +28 -29
  88. package/es/components/tabs/tab-pane.vue2.js +23 -24
  89. package/es/components/tabs/tabs.vue2.js +30 -31
  90. package/es/components/time-picker/common/picker.vue2.js +48 -49
  91. package/es/components/time-select/time-select.vue2.js +28 -29
  92. package/es/components/tooltip/content.vue2.js +36 -37
  93. package/es/components/tooltip/tooltip.vue2.js +15 -16
  94. package/es/components/tooltip/trigger.vue2.js +37 -38
  95. package/es/components/verify-code/verify-code.vue2.js +19 -20
  96. package/es/constants/date.js +7 -7
  97. package/es/index.js +90 -90
  98. package/es/package.json.js +1 -1
  99. package/lib/components/affix/affix.vue2.cjs +1 -1
  100. package/lib/components/alert/alert.vue2.cjs +1 -1
  101. package/lib/components/backtop/backtop.vue2.cjs +1 -1
  102. package/lib/components/button/button-group.vue2.cjs +1 -1
  103. package/lib/components/button/button.vue2.cjs +1 -1
  104. package/lib/components/card/card.vue2.cjs +1 -1
  105. package/lib/components/check-tag/check-tag.vue2.cjs +1 -1
  106. package/lib/components/checkbox/checkbox-button.vue2.cjs +1 -1
  107. package/lib/components/checkbox/checkbox-group.vue2.cjs +1 -1
  108. package/lib/components/checkbox/checkbox.vue2.cjs +1 -1
  109. package/lib/components/clamp/clamp.vue2.cjs +1 -1
  110. package/lib/components/clamp-toggle/clamp-toggle.vue2.cjs +1 -1
  111. package/lib/components/col/col.vue2.cjs +1 -1
  112. package/lib/components/collapse-transition/src/collapse-transition.vue2.cjs +1 -1
  113. package/lib/components/collection/collection-item.vue2.cjs +1 -1
  114. package/lib/components/collection/collection.vue2.cjs +1 -1
  115. package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
  116. package/lib/components/color-picker/components/alpha-slider.vue2.cjs +1 -1
  117. package/lib/components/config-provider/config-provider.vue2.cjs +1 -1
  118. package/lib/components/container/aside.vue2.cjs +1 -1
  119. package/lib/components/container/container.vue2.cjs +1 -1
  120. package/lib/components/container/footer.vue2.cjs +1 -1
  121. package/lib/components/container/header.vue2.cjs +1 -1
  122. package/lib/components/container/main.vue2.cjs +1 -1
  123. package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
  124. package/lib/components/date-picker/date-picker-com/basic-date-table.vue2.cjs +1 -1
  125. package/lib/components/date-picker/date-picker-com/basic-month-table.vue2.cjs +1 -1
  126. package/lib/components/date-picker/date-picker-com/basic-year-table.vue2.cjs +1 -1
  127. package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
  128. package/lib/components/date-picker/date-picker-com/panel-month-range.vue2.cjs +1 -1
  129. package/lib/components/date-time-select/date-time-select.vue2.cjs +1 -1
  130. package/lib/components/descriptions/description-item.vue2.cjs +1 -1
  131. package/lib/components/descriptions/description.vue2.cjs +1 -1
  132. package/lib/components/descriptions/descriptions-row.vue2.cjs +1 -1
  133. package/lib/components/dialog/dialog-content.vue2.cjs +1 -1
  134. package/lib/components/dialog/dialog.vue2.cjs +1 -1
  135. package/lib/components/divider/divider.vue2.cjs +1 -1
  136. package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
  137. package/lib/components/empty/empty.vue2.cjs +1 -1
  138. package/lib/components/footer-layout/footer-layout.vue2.cjs +1 -1
  139. package/lib/components/form/form-item.vue2.cjs +1 -1
  140. package/lib/components/form/form.vue2.cjs +1 -1
  141. package/lib/components/full-screen/full-screen.vue2.cjs +1 -1
  142. package/lib/components/header-layout/header-layout.vue2.cjs +1 -1
  143. package/lib/components/horizontal-menu/horizontal-menu.vue2.cjs +1 -1
  144. package/lib/components/icon/icon.vue2.cjs +1 -1
  145. package/lib/components/icon-text/icon-text.vue2.cjs +1 -1
  146. package/lib/components/iframe-layout/iframe-layout.vue2.cjs +1 -1
  147. package/lib/components/iframe-layout/iframe-page.vue2.cjs +1 -1
  148. package/lib/components/image/image.vue2.cjs +1 -1
  149. package/lib/components/image-viewer/image-viewer.vue2.cjs +1 -1
  150. package/lib/components/index.cjs +1 -1
  151. package/lib/components/link/link.vue2.cjs +1 -1
  152. package/lib/components/list-cell/list-cell.vue2.cjs +1 -1
  153. package/lib/components/logo/logo.vue2.cjs +1 -1
  154. package/lib/components/md-comment/md-comment.vue2.cjs +1 -1
  155. package/lib/components/md-container/md-container.vue2.cjs +1 -1
  156. package/lib/components/md-vue-playground/md-vue-playground.vue2.cjs +1 -1
  157. package/lib/components/menu/menu-item-group.vue2.cjs +1 -1
  158. package/lib/components/menu/menu-item.vue2.cjs +1 -1
  159. package/lib/components/menu/menu.vue2.cjs +1 -1
  160. package/lib/components/menu/sub-menu.vue2.cjs +1 -1
  161. package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
  162. package/lib/components/overlay/overlay.vue2.cjs +1 -1
  163. package/lib/components/page-wrapper/page-wrapper.vue2.cjs +1 -1
  164. package/lib/components/pagination/pagination.vue2.cjs +1 -1
  165. package/lib/components/popconfirm/popconfirm.vue2.cjs +1 -1
  166. package/lib/components/popover/popover.vue2.cjs +1 -1
  167. package/lib/components/popper/arrow.vue2.cjs +1 -1
  168. package/lib/components/popper/content.vue2.cjs +1 -1
  169. package/lib/components/popper/popper.vue2.cjs +1 -1
  170. package/lib/components/popper/trigger.vue2.cjs +1 -1
  171. package/lib/components/qrcode/qrcode.vue2.cjs +1 -1
  172. package/lib/components/radio/radio-button.vue2.cjs +1 -1
  173. package/lib/components/radio/radio-group.vue2.cjs +1 -1
  174. package/lib/components/radio/radio.vue2.cjs +1 -1
  175. package/lib/components/result/result.vue2.cjs +1 -1
  176. package/lib/components/router-view-content/router-view-content.vue2.cjs +1 -1
  177. package/lib/components/row/row.vue2.cjs +1 -1
  178. package/lib/components/scrollbar/scrollbar.vue2.cjs +1 -1
  179. package/lib/components/search/search.vue2.cjs +1 -1
  180. package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
  181. package/lib/components/skeleton/skeleton-item.vue2.cjs +1 -1
  182. package/lib/components/skeleton/skeleton.vue2.cjs +1 -1
  183. package/lib/components/switch/switch.vue2.cjs +1 -1
  184. package/lib/components/table/table.vue2.cjs +1 -1
  185. package/lib/components/tabs/tab-nav.vue2.cjs +1 -1
  186. package/lib/components/tabs/tab-pane.vue2.cjs +1 -1
  187. package/lib/components/tabs/tabs.vue2.cjs +1 -1
  188. package/lib/components/time-picker/common/picker.vue2.cjs +1 -1
  189. package/lib/components/time-select/time-select.vue2.cjs +1 -1
  190. package/lib/components/tooltip/content.vue2.cjs +1 -1
  191. package/lib/components/tooltip/tooltip.vue2.cjs +1 -1
  192. package/lib/components/tooltip/trigger.vue2.cjs +1 -1
  193. package/lib/components/verify-code/verify-code.vue2.cjs +1 -1
  194. package/lib/constants/date.cjs +1 -1
  195. package/lib/index.cjs +1 -1
  196. package/lib/package.json.cjs +1 -1
  197. package/package.json +8 -8
  198. package/web-types.json +1 -1
@@ -1,9 +1,9 @@
1
- import { defineComponent as H, computed as s, ref as T, watch as w, onMounted as Z, openBlock as n, createElementBlock as u, normalizeClass as r, normalizeStyle as M, withModifiers as ee, createElementVNode as B, unref as i, withKeys as ae, createBlock as V, normalizeProps as E, mergeProps as I, createCommentVNode as c, toDisplayString as N, nextTick as oe } from "vue";
1
+ import { defineComponent as Y, computed as s, ref as T, watch as w, onMounted as Z, openBlock as n, createElementBlock as u, normalizeClass as r, normalizeStyle as M, withModifiers as ee, createElementVNode as B, unref as i, withKeys as ae, createBlock as V, normalizeProps as E, mergeProps as I, createCommentVNode as c, toDisplayString as N, nextTick as oe } from "vue";
2
2
  import { singleAttrToObj as U, addUnit as ie, isPromise as j, isBoolean as le } from "@vft/utils";
3
3
  import { debugWarn as G, throwError as te } from "../../utils/error.js";
4
4
  import "lodash";
5
5
  import "@vueuse/core";
6
- import { UPDATE_MODEL_EVENT as P, CHANGE_EVENT as S, INPUT_EVENT as _ } from "../../constants/event.js";
6
+ import { UPDATE_MODEL_EVENT as P, CHANGE_EVENT as S, INPUT_EVENT as z } from "../../constants/event.js";
7
7
  import "../../utils/ns-cover.js";
8
8
  import { VftIcon as C } from "../icon/index.js";
9
9
  import "../form/index.js";
@@ -15,10 +15,9 @@ import { useFormSize as se, useFormDisabled as ue } from "../form/hooks/use-form
15
15
  const de = ["onClick"], ve = ["id", "aria-checked", "aria-disabled", "name", "true-value", "false-value", "disabled", "tabindex", "onKeydown"], me = ["aria-hidden"], pe = ["aria-hidden"], fe = ["aria-hidden"], o = (
16
16
  /* hoist-static*/
17
17
  ne("switch")
18
- ), he = H({
19
- name: o.b()
20
- }), _e = /* @__PURE__ */ H({
21
- ...he,
18
+ ), Se = /* @__PURE__ */ Y({
19
+ name: o.b(),
20
+ __name: "switch",
22
21
  props: {
23
22
  modelValue: { type: [Boolean, String, Number], default: !1 },
24
23
  value: { type: [Boolean, String, Number], default: !1 },
@@ -42,16 +41,16 @@ const de = ["onClick"], ve = ["id", "aria-checked", "aria-disabled", "name", "tr
42
41
  size: {},
43
42
  tabindex: {}
44
43
  },
45
- emits: [P, S, _],
46
- setup(L, { expose: W, emit: d }) {
47
- const a = L, { formItem: v } = re(), $ = se(), { inputId: q } = ce(a, {
44
+ emits: [P, S, z],
45
+ setup(H, { expose: L, emit: d }) {
46
+ const a = H, { formItem: v } = re(), W = se(), { inputId: $ } = ce(a, {
48
47
  formItemContext: v
49
- }), m = s(() => U(a.activeIcon, "icon")), f = s(() => U(a.inactiveIcon, "icon")), y = ue(s(() => a.loading)), g = T(a.modelValue !== !1), h = T(), J = T(), Q = s(() => [
48
+ }), m = s(() => U(a.activeIcon, "icon")), f = s(() => U(a.inactiveIcon, "icon")), y = ue(s(() => a.loading)), g = T(a.modelValue !== !1), h = T(), q = T(), J = s(() => [
50
49
  o.b(),
51
- o.m($.value),
50
+ o.m(W.value),
52
51
  o.is("disabled", y.value),
53
52
  o.is("checked", l.value)
54
- ]), R = s(() => ({
53
+ ]), Q = s(() => ({
55
54
  width: ie(a.width)
56
55
  }));
57
56
  w(
@@ -65,17 +64,17 @@ const de = ["onClick"], ve = ["id", "aria-checked", "aria-disabled", "name", "tr
65
64
  g.value = !1;
66
65
  }
67
66
  );
68
- const z = s(() => g.value ? a.modelValue : a.value), l = s(() => z.value === a.activeValue);
69
- [a.activeValue, a.inactiveValue].includes(z.value) || (d(P, a.inactiveValue), d(S, a.inactiveValue), d(_, a.inactiveValue)), w(l, (e) => {
67
+ const D = s(() => g.value ? a.modelValue : a.value), l = s(() => D.value === a.activeValue);
68
+ [a.activeValue, a.inactiveValue].includes(D.value) || (d(P, a.inactiveValue), d(S, a.inactiveValue), d(z, a.inactiveValue)), w(l, (e) => {
70
69
  var t;
71
70
  h.value.checked = e, a.validateEvent && ((t = v == null ? void 0 : v.validate) == null || t.call(v, "change").catch((b) => G(b)));
72
71
  });
73
72
  const k = () => {
74
73
  const e = l.value ? a.inactiveValue : a.activeValue;
75
- d(P, e), d(S, e), d(_, e), oe(() => {
74
+ d(P, e), d(S, e), d(z, e), oe(() => {
76
75
  h.value.checked = l.value;
77
76
  });
78
- }, D = () => {
77
+ }, _ = () => {
79
78
  if (y.value)
80
79
  return;
81
80
  const { beforeChange: e } = a;
@@ -95,21 +94,21 @@ const de = ["onClick"], ve = ["id", "aria-checked", "aria-disabled", "name", "tr
95
94
  }).catch((p) => {
96
95
  G(o.b(), `some error occurred: ${p}`);
97
96
  }) : t && k();
98
- }, X = s(() => o.cssVarBlock({
97
+ }, R = s(() => o.cssVarBlock({
99
98
  ...a.activeColor ? { "on-color": a.activeColor } : null,
100
99
  ...a.inactiveColor ? { "off-color": a.inactiveColor } : null,
101
100
  ...a.borderColor ? { "border-color": a.borderColor } : null
102
- })), Y = () => {
101
+ })), X = () => {
103
102
  var e, t;
104
103
  (t = (e = h.value) == null ? void 0 : e.focus) == null || t.call(e);
105
104
  };
106
105
  return Z(() => {
107
106
  h.value.checked = l.value;
108
- }), W({
107
+ }), L({
109
108
  /**
110
109
  * @description manual focus to the switch component
111
110
  **/
112
- focus: Y,
111
+ focus: X,
113
112
  /**
114
113
  * @description whether Switch is checked
115
114
  */
@@ -117,12 +116,12 @@ const de = ["onClick"], ve = ["id", "aria-checked", "aria-disabled", "name", "tr
117
116
  }), (e, t) => {
118
117
  var b, p, x, F, K, O, A;
119
118
  return n(), u("div", {
120
- class: r(Q.value),
121
- style: M(X.value),
122
- onClick: ee(D, ["prevent"])
119
+ class: r(J.value),
120
+ style: M(R.value),
121
+ onClick: ee(_, ["prevent"])
123
122
  }, [
124
123
  B("input", {
125
- id: i(q),
124
+ id: i($),
126
125
  ref_key: "input",
127
126
  ref: h,
128
127
  class: r(i(o).e("input")),
@@ -136,7 +135,7 @@ const de = ["onClick"], ve = ["id", "aria-checked", "aria-disabled", "name", "tr
136
135
  disabled: i(y),
137
136
  tabindex: e.tabindex,
138
137
  onChange: k,
139
- onKeydown: ae(D, ["enter"])
138
+ onKeydown: ae(_, ["enter"])
140
139
  }, null, 42, ve),
141
140
  !e.inlinePrompt && (e.inactiveIcon || e.inactiveText) ? (n(), u("span", {
142
141
  key: 0,
@@ -154,9 +153,9 @@ const de = ["onClick"], ve = ["id", "aria-checked", "aria-disabled", "name", "tr
154
153
  ], 2)) : c("", !0),
155
154
  B("span", {
156
155
  ref_key: "core",
157
- ref: J,
156
+ ref: q,
158
157
  class: r(i(o).e("core")),
159
- style: M(R.value)
158
+ style: M(Q.value)
160
159
  }, [
161
160
  e.inlinePrompt ? (n(), u("div", {
162
161
  key: 0,
@@ -198,5 +197,5 @@ const de = ["onClick"], ve = ["id", "aria-checked", "aria-disabled", "name", "tr
198
197
  }
199
198
  });
200
199
  export {
201
- _e as default
200
+ Se as default
202
201
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as q, useAttrs as J, ref as s, computed as h, watch as y, createVNode as C, reactive as K, onMounted as Q, resolveComponent as U, openBlock as b, createElementBlock as Z, normalizeClass as S, unref as n, createBlock as L, mergeProps as w, createCommentVNode as R, createSlots as _, withCtx as P, withDirectives as ee, createElementVNode as O, vShow as te } from "vue";
1
+ import { defineComponent as Y, useAttrs as J, ref as s, computed as h, watch as y, createVNode as b, reactive as K, onMounted as Q, resolveComponent as U, openBlock as C, createElementBlock as Z, normalizeClass as S, unref as n, createBlock as L, mergeProps as w, createCommentVNode as R, createSlots as _, withCtx as P, withDirectives as ee, createElementVNode as O, vShow as te } from "vue";
2
2
  import { VftEmpty as ae } from "../empty/index.js";
3
3
  import { VftPagination as W } from "../pagination/index.js";
4
4
  import { useNamespace as le } from "../../hooks/use-namespace/index.js";
@@ -13,10 +13,9 @@ import { EmptyEnum as re } from "../empty/constants.js";
13
13
  const r = (
14
14
  /* hoist-static*/
15
15
  le("table")
16
- ), ie = q({
17
- name: r.b()
18
- }), be = /* @__PURE__ */ q({
19
- ...ie,
16
+ ), be = /* @__PURE__ */ Y({
17
+ name: r.b(),
18
+ __name: "table",
20
19
  props: {
21
20
  maxHeight: {},
22
21
  columns: {},
@@ -51,18 +50,18 @@ const r = (
51
50
  },
52
51
  emits: ["page-change", "sort-change", "update:pageNum"],
53
52
  setup(l, {
54
- expose: T,
53
+ expose: q,
55
54
  emit: d
56
55
  }) {
57
- const V = J(), $ = s(0), i = s(), A = ne(() => G(), 120), k = h(() => l.pagePlacement.startsWith("bottom")), D = h(() => l.columns.map((e) => (e.align || (e.align = "center"), !e.formatter && !e.slots && !e.cellRender && (e.formatter = ({
56
+ const T = J(), V = s(0), i = s(), $ = ne(() => D(), 120), k = h(() => l.pagePlacement.startsWith("bottom")), A = h(() => l.columns.map((e) => (e.align || (e.align = "center"), !e.formatter && !e.slots && !e.cellRender && (e.formatter = ({
58
57
  cellValue: t
59
58
  }) => t || "-"), e)));
60
59
  y([() => l.loading, () => l.data, () => l.columns], () => {
61
- A();
60
+ $();
62
61
  }, {
63
62
  immediate: !0
64
63
  });
65
- function G() {
64
+ function D() {
66
65
  g.data = l.data, N(l.pageNum);
67
66
  }
68
67
  I.renderer.add("Encrypt", {
@@ -70,11 +69,11 @@ const r = (
70
69
  renderDefault(e, t) {
71
70
  const {
72
71
  row: a,
73
- column: f
72
+ column: p
74
73
  } = t;
75
- return C("span", {
74
+ return b("span", {
76
75
  class: "line-clamp",
77
- innerHTML: a[f.field] || "-"
76
+ innerHTML: a[p.field] || "-"
78
77
  }, null);
79
78
  }
80
79
  }), I.formats.mixin({
@@ -84,13 +83,13 @@ const r = (
84
83
  return e || "-";
85
84
  }
86
85
  });
87
- function M(e) {
86
+ function G(e) {
88
87
  d("page-change", e), d("update:pageNum", e);
89
88
  }
90
- const X = () => ({
89
+ const M = () => ({
91
90
  maxHeight: "88px",
92
91
  height: "44px"
93
- }), j = (e) => {
92
+ }), X = (e) => {
94
93
  var a;
95
94
  const {
96
95
  column: t
@@ -111,12 +110,12 @@ const r = (
111
110
  orders: ["desc", "asc", null]
112
111
  },
113
112
  seqConfig: {
114
- startIndex: $.value
113
+ startIndex: V.value
115
114
  },
116
115
  cellClassName: "cellClass",
117
116
  rowClassName: "rowClass",
118
- cellStyle: j,
119
- rowStyle: X,
117
+ cellStyle: X,
118
+ rowStyle: M,
120
119
  headerRowClassName: "headerRowClass",
121
120
  headerAlign: "center",
122
121
  columnConfig: {
@@ -133,8 +132,8 @@ const r = (
133
132
  enabled: !1
134
133
  },
135
134
  ...l.tableConfig,
136
- ...V
137
- }), F = (e) => {
135
+ ...T
136
+ }), j = (e) => {
138
137
  d("sort-change", e);
139
138
  };
140
139
  y(() => l.pageNum, (e) => {
@@ -143,7 +142,7 @@ const r = (
143
142
  const N = (e) => {
144
143
  g.seqConfig && (g.seqConfig.startIndex = (e - 1) * l.pageSize);
145
144
  }, u = s(), z = s();
146
- let p = s(!1), o = s(null), m = s(null);
145
+ let f = s(!1), o = s(null), m = s(null);
147
146
  const c = h(() => {
148
147
  var e;
149
148
  return ((e = l.sticky) == null ? void 0 : e.getContainer) || document.documentElement || document.body;
@@ -158,7 +157,7 @@ const r = (
158
157
  deep: !0
159
158
  });
160
159
  function E() {
161
- if (!o.value || !m.value || (v(), !p.value))
160
+ if (!o.value || !m.value || (v(), !f.value))
162
161
  return;
163
162
  const e = o.value.clientWidth, t = m.value.offsetWidth;
164
163
  u.value.style.width = e - 1 + "px", z.value.style.width = t + "px";
@@ -170,10 +169,10 @@ const r = (
170
169
  const e = ((B = c.value) == null ? void 0 : B.clientHeight) || window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight, {
171
170
  top: t,
172
171
  bottom: a
173
- } = o.value.getBoundingClientRect(), f = ((H = c.value) == null ? void 0 : H.getBoundingClientRect().top) || document.body.getBoundingClientRect().top;
174
- p.value = t < e && a > e && a - f > e, u.value.scrollLeft = o.value.scrollLeft;
172
+ } = o.value.getBoundingClientRect(), p = ((H = c.value) == null ? void 0 : H.getBoundingClientRect().top) || document.body.getBoundingClientRect().top;
173
+ f.value = t < e && a > e && a - p > e, u.value.scrollLeft = o.value.scrollLeft;
175
174
  }
176
- const Y = () => {
175
+ const F = () => {
177
176
  var t;
178
177
  const e = (t = i.value) == null ? void 0 : t.$el;
179
178
  e && (o.value = e.querySelector(".vxe-table--body-wrapper"), m.value = e.querySelector(".vxe-table--body"), !(!o.value && !m.value) && (o.value.addEventListener("scroll", function(a) {
@@ -183,36 +182,36 @@ const r = (
183
182
  })));
184
183
  };
185
184
  return Q(() => {
186
- l.sticky && (Y(), oe(i, () => E()));
187
- }), T({
185
+ l.sticky && (F(), oe(i, () => E()));
186
+ }), q({
188
187
  table: i
189
188
  }), (e, t) => {
190
189
  const a = U("vxe-grid");
191
- return b(), Z("div", {
190
+ return C(), Z("div", {
192
191
  class: S(n(r).b())
193
- }, [k.value ? R("", !0) : (b(), L(n(W), w({
192
+ }, [k.value ? R("", !0) : (C(), L(n(W), w({
194
193
  key: 0,
195
194
  class: [n(r).e("pager"), n(r).m("pager-" + e.pagePlacement)],
196
195
  layout: "prev, pager, next"
197
196
  }, e.pageOptions, {
198
197
  total: e.total,
199
198
  "page-size": e.pageSize,
200
- onCurrentChange: t[0] || (t[0] = (f) => d("page-change", e.pageNum)),
199
+ onCurrentChange: t[0] || (t[0] = (p) => d("page-change", e.pageNum)),
201
200
  "current-page": e.pageNum
202
- }), null, 16, ["class", "total", "page-size", "current-page"])), C(a, w({
201
+ }), null, 16, ["class", "total", "page-size", "current-page"])), b(a, w({
203
202
  ref_key: "xGrid",
204
203
  ref: i
205
204
  }, g, {
206
205
  height: e.height,
207
206
  "max-height": e.maxHeight,
208
- columns: D.value,
207
+ columns: A.value,
209
208
  data: e.data,
210
209
  "auto-resize": "",
211
210
  loading: e.loading,
212
211
  resizable: "",
213
- onSortChange: F
212
+ onSortChange: j
214
213
  }), _({
215
- empty: P(() => [C(n(ae), {
214
+ empty: P(() => [b(n(ae), {
216
215
  type: n(re).NO_DATA
217
216
  }, null, 8, ["type"])]),
218
217
  _: 2
@@ -226,16 +225,16 @@ const r = (
226
225
  ref_key: "stickyScrollBar",
227
226
  ref: z,
228
227
  class: S(n(r).e("sticky-scroll-bar"))
229
- }, null, 2)], 2), [[te, n(p)]])]),
228
+ }, null, 2)], 2), [[te, n(f)]])]),
230
229
  key: "0"
231
- } : void 0]), 1040, ["height", "max-height", "columns", "data", "loading"]), k.value ? (b(), L(n(W), w({
230
+ } : void 0]), 1040, ["height", "max-height", "columns", "data", "loading"]), k.value ? (C(), L(n(W), w({
232
231
  key: 1,
233
232
  class: [n(r).e("pager"), n(r).m("pager-" + e.pagePlacement)],
234
233
  layout: "prev, pager, next"
235
234
  }, e.pageOptions, {
236
235
  total: e.total,
237
236
  "page-size": e.pageSize,
238
- onCurrentChange: M,
237
+ onCurrentChange: G,
239
238
  "current-page": e.pageNum
240
239
  }), null, 16, ["class", "total", "page-size", "current-page"])) : R("", !0)], 2);
241
240
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as E, getCurrentInstance as Z, inject as _, ref as g, computed as I, watch as O, onMounted as tt, onUpdated as ot, createVNode as l, nextTick as et } from "vue";
1
+ import { defineComponent as Q, getCurrentInstance as Z, inject as _, ref as g, computed as I, watch as O, onMounted as tt, onUpdated as ot, createVNode as l, nextTick as et } from "vue";
2
2
  import { capitalize as $ } from "@vft/utils";
3
3
  import { throwError as it } from "../../utils/error.js";
4
4
  import "lodash";
@@ -88,13 +88,12 @@ import "../../hooks/use-z-index/index.js";
88
88
  import { EVENT_CODE as T } from "@vft/constants";
89
89
  import { TabsRootContextKey as st } from "./types.js";
90
90
  import lt from "./tab-bar.vue2.js";
91
- const V = (
91
+ const E = (
92
92
  /* hoist-static*/
93
93
  K("tab-nav")
94
- ), ct = E({
95
- name: V.b()
96
- }), Xo = /* @__PURE__ */ E({
97
- ...ct,
94
+ ), Uo = /* @__PURE__ */ Q({
95
+ name: E.b(),
96
+ __name: "tab-nav",
98
97
  props: {
99
98
  panes: {},
100
99
  editable: {
@@ -117,20 +116,20 @@ const V = (
117
116
  },
118
117
  emits: ["tabClick", "tabRemove", "tabAdd", "tabContextmenu"],
119
118
  setup(n, {
120
- expose: D,
119
+ expose: V,
121
120
  emit: h
122
121
  }) {
123
122
  var A;
124
- const M = Z(), d = _(st);
125
- d || it(V.b(), "<vft-tabs><tab-nav /></vft-tabs>");
126
- const e = K("tabs"), q = nt(), H = rt(), y = g(), v = g(), C = g(), m = g(!1), f = g(0), k = g(!1), x = g(!0), w = I(() => ["top", "bottom"].includes(d.props.tabPosition) ? "width" : "height"), W = I(() => ({
123
+ const D = Z(), d = _(st);
124
+ d || it(E.b(), "<vft-tabs><tab-nav /></vft-tabs>");
125
+ const e = K("tabs"), M = nt(), q = rt(), y = g(), v = g(), C = g(), m = g(!1), f = g(0), k = g(!1), x = g(!0), w = I(() => ["top", "bottom"].includes(d.props.tabPosition) ? "width" : "height"), H = I(() => ({
127
126
  transform: `translate${w.value === "width" ? "X" : "Y"}(-${f.value}px)`
128
- })), j = () => {
127
+ })), W = () => {
129
128
  if (!v.value)
130
129
  return;
131
130
  const o = v.value[`offset${$(w.value)}`], t = f.value;
132
131
  t && (f.value = t > o ? t - o : 0);
133
- }, U = () => {
132
+ }, j = () => {
134
133
  if (!v.value || !C.value)
135
134
  return;
136
135
  const o = C.value[`offset${$(w.value)}`], t = v.value[`offset${$(w.value)}`], i = f.value;
@@ -151,7 +150,7 @@ const V = (
151
150
  return;
152
151
  const o = C.value[`offset${$(w.value)}`], t = v.value[`offset${$(w.value)}`], i = f.value;
153
152
  t < o ? (m.value = m.value || {}, m.value.prev = i, m.value.next = i + t < o, o - i < t && (f.value = o - t)) : (m.value = !1, i > 0 && (f.value = 0));
154
- }, X = (o) => {
153
+ }, U = (o) => {
155
154
  const t = o.code, {
156
155
  up: i,
157
156
  down: b,
@@ -166,26 +165,26 @@ const V = (
166
165
  }, P = () => {
167
166
  x.value && (k.value = !0);
168
167
  }, S = () => k.value = !1;
169
- O(q, (o) => {
168
+ O(M, (o) => {
170
169
  o === "hidden" ? x.value = !1 : o === "visible" && setTimeout(() => x.value = !0, 50);
171
- }), O(H, (o) => {
170
+ }), O(q, (o) => {
172
171
  o ? setTimeout(() => x.value = !0, 50) : x.value = !1;
173
- }), at(y, z), tt(() => setTimeout(() => R(), 0)), ot(() => z()), D({
172
+ }), at(y, z), tt(() => setTimeout(() => R(), 0)), ot(() => z()), V({
174
173
  scrollToActiveTab: R,
175
174
  removeFocus: S
176
- }), O(() => n.panes, () => M.update(), {
175
+ }), O(() => n.panes, () => D.update(), {
177
176
  flush: "post"
178
177
  });
179
- const Y = I(() => {
178
+ const X = I(() => {
180
179
  var o, t;
181
180
  return m.value ? [l("span", {
182
181
  class: [e.e("nav-prev"), e.is("disabled", !m.value.prev)],
183
- onClick: j
182
+ onClick: W
184
183
  }, [(o = n.arrowLeftIconCfg) != null && o.icon ? l(B, n.arrowLeftIconCfg, null) : null]), l("span", {
185
184
  class: [e.e("nav-next"), e.is("disabled", !m.value.next)],
186
- onClick: U
185
+ onClick: j
187
186
  }, [(t = n.arrowRightIconCfg) != null && t.icon ? l(B, n.arrowRightIconCfg, null) : null])] : null;
188
- }), G = I(() => {
187
+ }), Y = I(() => {
189
188
  var o;
190
189
  return (o = n.panes) == null ? void 0 : o.map((t, i) => {
191
190
  var N, F, L;
@@ -194,7 +193,7 @@ const V = (
194
193
  const c = u ? l("span", {
195
194
  class: "is-icon-close",
196
195
  onClick: (p) => h("tabRemove", t, p)
197
- }, [(N = n.closeIconCfg) != null && N.icon ? l(B, n.closeIconCfg, null) : null]) : null, a = ((L = (F = t.slots).label) == null ? void 0 : L.call(F)) || t.props.label, Q = !s && t.active ? 0 : -1;
196
+ }, [(N = n.closeIconCfg) != null && N.icon ? l(B, n.closeIconCfg, null) : null]) : null, a = ((L = (F = t.slots).label) == null ? void 0 : L.call(F)) || t.props.label, J = !s && t.active ? 0 : -1;
198
197
  return l("div", {
199
198
  ref: `tab-${b}`,
200
199
  class: [e.e("item"), e.is(d.props.tabPosition), e.is("active", t.active), e.is("disabled", s), e.is("closable", u), e.is("focus", k.value)],
@@ -203,7 +202,7 @@ const V = (
203
202
  "aria-controls": `pane-${r}`,
204
203
  role: "tab",
205
204
  "aria-selected": t.active,
206
- tabindex: Q,
205
+ tabindex: J,
207
206
  onFocus: () => P(),
208
207
  onBlur: () => S(),
209
208
  onClick: (p) => {
@@ -221,7 +220,7 @@ const V = (
221
220
  }
222
221
  }, [a, c]);
223
222
  });
224
- }), J = n.editable || n.addable ? l("span", {
223
+ }), G = n.editable || n.addable ? l("span", {
225
224
  class: e.e("new-tab"),
226
225
  tabindex: "0",
227
226
  onClick: () => h("tabAdd"),
@@ -232,20 +231,20 @@ const V = (
232
231
  return () => l("div", {
233
232
  ref: y,
234
233
  class: [e.e("nav-wrap"), e.is("scrollable", !!m.value), e.is(d.props.tabPosition)]
235
- }, [Y.value, l("div", {
234
+ }, [X.value, l("div", {
236
235
  class: e.e("nav-scroll"),
237
236
  ref: v
238
237
  }, [l("div", {
239
238
  class: [e.e("nav"), e.is(d.props.tabPosition), e.is("stretch", n.stretch && ["top", "bottom"].includes(d.props.tabPosition))],
240
239
  ref: C,
241
- style: W.value,
240
+ style: H.value,
242
241
  role: "tablist",
243
- onKeydown: X
242
+ onKeydown: U
244
243
  }, [n.showBar ? l(lt, {
245
244
  tabs: [...n.panes]
246
- }, null) : null, G.value]), J])]);
245
+ }, null) : null, Y.value]), G])]);
247
246
  }
248
247
  });
249
248
  export {
250
- Xo as default
249
+ Uo as default
251
250
  };
@@ -1,20 +1,19 @@
1
- import { defineComponent as b, getCurrentInstance as y, useSlots as C, inject as B, ref as m, computed as d, watch as g, reactive as w, onMounted as N, onUnmounted as k, unref as o, withDirectives as x, openBlock as z, createElementBlock as R, normalizeClass as S, renderSlot as _, vShow as $, createCommentVNode as E } from "vue";
1
+ import { defineComponent as h, getCurrentInstance as y, useSlots as C, inject as B, ref as u, computed as d, watch as g, reactive as w, onMounted as N, onUnmounted as k, unref as o, withDirectives as x, openBlock as z, createElementBlock as R, normalizeClass as S, renderSlot as $, vShow as E, createCommentVNode as P } from "vue";
2
2
  import "@vft/utils";
3
- import { throwError as P } from "../../utils/error.js";
3
+ import { throwError as j } from "../../utils/error.js";
4
4
  import "lodash";
5
5
  import { eagerComputed as p } from "@vueuse/core";
6
6
  import "../../utils/ns-cover.js";
7
- import { TabsRootContextKey as j } from "./types.js";
8
- import { useNamespace as D } from "../../hooks/use-namespace/index.js";
7
+ import { TabsRootContextKey as D } from "./types.js";
8
+ import { useNamespace as I } from "../../hooks/use-namespace/index.js";
9
9
  import "@popperjs/core";
10
10
  import "../../hooks/use-z-index/index.js";
11
- const I = ["id", "aria-hidden", "aria-labelledby"], i = (
11
+ const K = ["id", "aria-hidden", "aria-labelledby"], i = (
12
12
  /* hoist-static*/
13
- D("tab-pane")
14
- ), K = b({
15
- name: i.b()
16
- }), O = /* @__PURE__ */ b({
17
- ...K,
13
+ I("tab-pane")
14
+ ), L = /* @__PURE__ */ h({
15
+ name: i.b(),
16
+ __name: "tab-pane",
18
17
  props: {
19
18
  label: {},
20
19
  name: {},
@@ -23,27 +22,27 @@ const I = ["id", "aria-hidden", "aria-labelledby"], i = (
23
22
  lazy: { type: Boolean }
24
23
  },
25
24
  setup(a) {
26
- const n = y(), v = C(), t = B(j);
27
- t || P(i.b(), "usage: <vft-tabs><vft-tab-pane /></vft-tabs/>");
28
- const r = m(), f = d(() => a.closable || t.props.closable), e = p(() => t.currentName.value === (a.name ?? r.value)), c = m(e.value), s = d(() => a.name ?? r.value), h = p(() => !a.lazy || c.value || e.value);
25
+ const n = y(), b = C(), t = B(D);
26
+ t || j(i.b(), "usage: <vft-tabs><vft-tab-pane /></vft-tabs/>");
27
+ const r = u(), v = d(() => a.closable || t.props.closable), e = p(() => t.currentName.value === (a.name ?? r.value)), c = u(e.value), s = d(() => a.name ?? r.value), f = p(() => !a.lazy || c.value || e.value);
29
28
  g(e, (l) => {
30
29
  l && (c.value = !0);
31
30
  });
32
- const u = w({
31
+ const m = w({
33
32
  uid: n.uid,
34
- slots: v,
33
+ slots: b,
35
34
  props: n.props,
36
35
  paneName: s,
37
36
  active: e,
38
37
  index: r,
39
- isClosable: f,
38
+ isClosable: v,
40
39
  attrs: n.attrs
41
40
  });
42
41
  return N(() => {
43
- t.registerPane(u);
42
+ t.registerPane(m);
44
43
  }), k(() => {
45
- t.unregisterPane(u.uid);
46
- }), (l, M) => o(h) ? x((z(), R("div", {
44
+ t.unregisterPane(m.uid);
45
+ }), (l, M) => o(f) ? x((z(), R("div", {
47
46
  key: 0,
48
47
  id: `pane-${s.value}`,
49
48
  class: S(o(i).b()),
@@ -51,12 +50,12 @@ const I = ["id", "aria-hidden", "aria-labelledby"], i = (
51
50
  "aria-hidden": !o(e),
52
51
  "aria-labelledby": `tab-${s.value}`
53
52
  }, [
54
- _(l.$slots, "default")
55
- ], 10, I)), [
56
- [$, o(e)]
57
- ]) : E("", !0);
53
+ $(l.$slots, "default")
54
+ ], 10, K)), [
55
+ [E, o(e)]
56
+ ]) : P("", !0);
58
57
  }
59
58
  });
60
59
  export {
61
- O as default
60
+ L as default
62
61
  };