vft 0.0.89 → 0.0.91

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