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,38 +1,38 @@
1
- import { defineComponent as f, getCurrentInstance as z, computed as d, openBlock as i, createElementBlock as n, normalizeClass as l, unref as e, createElementVNode as C, normalizeStyle as T, renderSlot as u, createVNode as A, createCommentVNode as N } from "vue";
2
- import { renderTNode as E, setSize as _, VNode as O } from "@vft/utils";
1
+ import { defineComponent as f, getCurrentInstance as z, computed as d, openBlock as s, createElementBlock as i, normalizeClass as n, unref as e, createElementVNode as C, normalizeStyle as T, renderSlot as u, createVNode as _, createCommentVNode as N } from "vue";
2
+ import { renderTNode as A, setSize as E, VNode as O } from "@vft/utils";
3
3
  import { useNamespace as k } from "../../hooks/use-namespace/index.js";
4
4
  import "@popperjs/core";
5
5
  import "lodash";
6
6
  import "../../hooks/use-z-index/index.js";
7
7
  import "@vueuse/core";
8
- import { getSizeType as S } from "../../utils/helper.js";
8
+ import { getSizeType as v } from "../../utils/helper.js";
9
9
  import "../../utils/ns-cover.js";
10
10
  import { EmptyEnum as o } from "./constants.js";
11
- import D from "./assets/no-collect.png.js";
12
- import x from "./assets/no-data.png.js";
11
+ import S from "./assets/no-collect.png.js";
12
+ import D from "./assets/no-data.png.js";
13
13
  import V from "./assets/no-filter.png.js";
14
14
  import $ from "./assets/no-page-data.png.js";
15
15
  import b from "./assets/no-search.png.js";
16
16
  const h = ["src"], m = (
17
17
  /* hoist-static*/
18
18
  k("empty")
19
- ), v = f({
19
+ ), x = f({
20
20
  name: m.b()
21
21
  }), Y = /* @__PURE__ */ f({
22
- ...v,
22
+ ...x,
23
23
  props: {
24
- img: null,
24
+ img: {},
25
25
  type: { default: o.NO_DATA },
26
- size: null,
27
- desc: null
26
+ size: {},
27
+ desc: {}
28
28
  },
29
- setup(r) {
29
+ setup(a) {
30
30
  const g = z(), t = (/* @__PURE__ */ new Map([
31
31
  [
32
32
  o.NO_COLLECT,
33
33
  {
34
34
  text: "暂无收藏记录",
35
- img: D
35
+ img: S
36
36
  }
37
37
  ],
38
38
  [
@@ -47,7 +47,7 @@ const h = ["src"], m = (
47
47
  o.NO_DATA,
48
48
  {
49
49
  text: "暂无数据",
50
- img: x
50
+ img: D
51
51
  }
52
52
  ],
53
53
  [
@@ -64,33 +64,33 @@ const h = ["src"], m = (
64
64
  img: b
65
65
  }
66
66
  ]
67
- ])).get(r.type), y = d(() => r.img || (t == null ? void 0 : t.img)), c = d(() => E(g, "desc", { defaultNode: t == null ? void 0 : t.text })), a = S(r.size);
68
- return (s, M) => {
67
+ ])).get(a.type), y = d(() => a.img || (t == null ? void 0 : t.img)), c = d(() => A(g, "desc", { defaultNode: t == null ? void 0 : t.text })), l = v(a.size);
68
+ return (r, M) => {
69
69
  var p;
70
- return i(), n("div", {
71
- class: l([e(m).b(), e(a) ? e(m).m(e(a)) : ""])
70
+ return s(), i("div", {
71
+ class: n([e(m).b(), e(l) ? e(m).m(e(l)) : ""])
72
72
  }, [
73
73
  C("div", {
74
- class: l(e(m).e("image")),
75
- style: T(e(a) ? {} : e(_)(((p = e(t)) == null ? void 0 : p.size) || r.size))
74
+ class: n(e(m).e("image")),
75
+ style: T(e(l) ? {} : e(E)(((p = e(t)) == null ? void 0 : p.size) || r.size))
76
76
  }, [
77
- s.$slots.img ? u(s.$slots, "img", { key: 0 }) : (i(), n("img", {
77
+ r.$slots.img ? u(r.$slots, "img", { key: 0 }) : (s(), i("img", {
78
78
  key: 1,
79
- src: e(y),
79
+ src: y.value,
80
80
  alt: ""
81
81
  }, null, 8, h))
82
82
  ], 6),
83
- e(c) ? (i(), n("span", {
83
+ c.value ? (s(), i("span", {
84
84
  key: 0,
85
- class: l(e(m).e("desc"))
85
+ class: n(e(m).e("desc"))
86
86
  }, [
87
- A(e(O), { content: e(c) }, null, 8, ["content"])
87
+ _(e(O), { content: c.value }, null, 8, ["content"])
88
88
  ], 2)) : N("", !0),
89
- s.$slots.default ? (i(), n("div", {
89
+ r.$slots.default ? (s(), i("div", {
90
90
  key: 1,
91
- class: l(e(m).e("bottom"))
91
+ class: n(e(m).e("bottom"))
92
92
  }, [
93
- u(s.$slots, "default")
93
+ u(r.$slots, "default")
94
94
  ], 2)) : N("", !0)
95
95
  ], 2);
96
96
  };
@@ -1,49 +1,49 @@
1
- import { defineComponent as f, openBlock as i, createBlock as a, unref as t, withCtx as c, createElementBlock as s, createCommentVNode as p } from "vue";
1
+ import { defineComponent as f, openBlock as i, createBlock as a, unref as e, withCtx as c, createElementBlock as p, createCommentVNode as m } from "vue";
2
2
  import "@vft/utils";
3
3
  import "lodash";
4
4
  import "@vueuse/core";
5
5
  import { generateCssVars as y } from "../../utils/ns-cover.js";
6
6
  import { useRouter as k } from "vue-router";
7
- import { useRouterHelper as x } from "@vft/router";
8
- import { useTabs as C } from "@vft/store";
9
- import { VftResult as R } from "../result/index.js";
10
- import d from "./exception.png.js";
11
- const P = /* @__PURE__ */ f({
7
+ import { useRouterHelper as C } from "@vft/router";
8
+ import { useTabs as R } from "@vft/store";
9
+ import { VftResult as d } from "../result/index.js";
10
+ import h from "./exception.png.js";
11
+ const N = /* @__PURE__ */ f({
12
12
  __name: "exception",
13
13
  props: {
14
14
  title: { default: "页面打不开?刷新下试试" },
15
15
  showRefresh: { type: Boolean, default: !0 },
16
16
  showHome: { type: Boolean }
17
17
  },
18
- setup(o) {
19
- const l = k(), { goRoot: n } = x(l), { refreshPage: m } = C(), u = {
18
+ setup(w) {
19
+ const l = k(), { goRoot: n } = C(l), { refreshPage: s } = R(), u = {
20
20
  ...y({
21
21
  "title-font-size": "16px"
22
22
  }, "result")
23
23
  };
24
- return (h, e) => (i(), a(t(R), {
24
+ return (o, t) => (i(), a(e(d), {
25
25
  title: o.title,
26
- icon: { icon: t(d), size: 350 },
26
+ icon: { icon: e(h), size: 350 },
27
27
  style: u
28
28
  }, {
29
29
  extra: c(() => [
30
- o.showHome ? (i(), s("button", {
30
+ o.showHome ? (i(), p("button", {
31
31
  key: 0,
32
32
  type: "primary",
33
- onClick: e[0] || (e[0] = //@ts-ignore
34
- (...r) => t(n) && t(n)(...r))
35
- }, "返回主页")) : p("", !0),
36
- o.showRefresh ? (i(), s("button", {
33
+ onClick: t[0] || (t[0] = //@ts-ignore
34
+ (...r) => e(n) && e(n)(...r))
35
+ }, "返回主页")) : m("", !0),
36
+ o.showRefresh ? (i(), p("button", {
37
37
  key: 1,
38
38
  type: "primary",
39
- onClick: e[1] || (e[1] = //@ts-ignore
40
- (...r) => t(m) && t(m)(...r))
41
- }, "刷新页面")) : p("", !0)
39
+ onClick: t[1] || (t[1] = //@ts-ignore
40
+ (...r) => e(s) && e(s)(...r))
41
+ }, "刷新页面")) : m("", !0)
42
42
  ]),
43
43
  _: 1
44
44
  }, 8, ["title", "icon"]));
45
45
  }
46
46
  });
47
47
  export {
48
- P as default
48
+ N as default
49
49
  };
@@ -92,7 +92,7 @@ const o = (
92
92
  }), Xt = /* @__PURE__ */ s({
93
93
  ..._,
94
94
  props: {
95
- leftDistance: null
95
+ leftDistance: {}
96
96
  },
97
97
  setup(e) {
98
98
  return l(() => c(
@@ -1,4 +1,4 @@
1
- import { defineComponent as Y, useSlots as me, inject as D, ref as h, computed as o, watch as E, reactive as he, toRefs as ge, provide as ye, onMounted as be, onBeforeUnmount as Se, openBlock as L, createElementBlock as _e, normalizeClass as g, unref as i, createVNode as T, withCtx as F, createBlock as Ie, resolveDynamicComponent as Ve, normalizeStyle as G, renderSlot as M, createTextVNode as qe, toDisplayString as K, createCommentVNode as U, createElementVNode as O, TransitionGroup as we, nextTick as Fe } from "vue";
1
+ import { defineComponent as Y, useSlots as me, inject as D, ref as h, computed as a, watch as E, reactive as he, toRefs as ge, provide as ye, onMounted as be, onBeforeUnmount as Se, openBlock as L, createElementBlock as _e, normalizeClass as g, unref as c, createVNode as T, withCtx as F, createBlock as Ie, resolveDynamicComponent as Ve, normalizeStyle as G, renderSlot as M, createTextVNode as qe, toDisplayString as K, createCommentVNode as U, createElementVNode as O, TransitionGroup as we, nextTick as Fe } from "vue";
2
2
  import Me from "async-validator";
3
3
  import { castArray as H, clone as J } from "lodash";
4
4
  import { refDebounced as Re } from "@vueuse/core";
@@ -12,112 +12,112 @@ import { useId as Ne } from "../../hooks/use-id/index.js";
12
12
  import { useFormSize as Ae } from "./hooks/use-form-common-props.js";
13
13
  import { formContextKey as Pe, formItemContextKey as X } from "./constants.js";
14
14
  import je from "./form-label-wrap.js";
15
- const De = ["role", "aria-labelledby"], n = (
15
+ const De = ["role", "aria-labelledby"], o = (
16
16
  /* hoist-static*/
17
17
  $e("form-item")
18
18
  ), Ee = Y({
19
- name: n.b()
19
+ name: o.b()
20
20
  }), xe = /* @__PURE__ */ Y({
21
21
  ...Ee,
22
22
  props: {
23
- label: null,
23
+ label: {},
24
24
  labelWidth: { default: "" },
25
- prop: null,
25
+ prop: {},
26
26
  required: { type: Boolean, default: void 0 },
27
- rules: null,
28
- error: null,
29
- for: null,
30
- validateStatus: null,
27
+ rules: {},
28
+ error: {},
29
+ for: {},
30
+ validateStatus: {},
31
31
  inlineMessage: { type: [String, Boolean], default: "" },
32
32
  showMessage: { type: Boolean, default: !0 },
33
- size: null
33
+ size: {}
34
34
  },
35
35
  setup(Z, { expose: k }) {
36
- const s = Z, W = me(), e = D(Pe, void 0), C = D(X, void 0), y = Ae(void 0, { formItem: !1 }), b = Ne().value, d = h([]), p = h(""), x = Re(p, 100), c = h(""), z = h();
36
+ const s = Z, W = me(), e = D(Pe, void 0), C = D(X, void 0), y = Ae(void 0, { formItem: !1 }), b = Ne().value, n = h([]), d = h(""), x = Re(d, 100), p = h(""), z = h();
37
37
  let B, m = !1;
38
- const $ = o(() => {
38
+ const $ = a(() => {
39
39
  if ((e == null ? void 0 : e.labelPosition) === "top")
40
40
  return {};
41
41
  const r = Q(s.labelWidth || (e == null ? void 0 : e.labelWidth) || "");
42
42
  return r ? { width: r } : {};
43
- }), ee = o(() => {
43
+ }), ee = a(() => {
44
44
  if ((e == null ? void 0 : e.labelPosition) === "top" || e != null && e.inline)
45
45
  return {};
46
46
  if (!s.label && !s.labelWidth && le)
47
47
  return {};
48
48
  const r = Q(s.labelWidth || (e == null ? void 0 : e.labelWidth) || "");
49
49
  return !s.label && !W.label ? { marginLeft: r } : {};
50
- }), re = o(() => [
51
- n.b(),
52
- n.m(y.value),
53
- n.is("error", p.value === "error"),
54
- n.is("validating", p.value === "validating"),
55
- n.is("success", p.value === "success"),
56
- n.is("required", ne.value || s.required),
57
- n.is("no-asterisk", e == null ? void 0 : e.hideRequiredAsterisk),
50
+ }), re = a(() => [
51
+ o.b(),
52
+ o.m(y.value),
53
+ o.is("error", d.value === "error"),
54
+ o.is("validating", d.value === "validating"),
55
+ o.is("success", d.value === "success"),
56
+ o.is("required", ue.value || s.required),
57
+ o.is("no-asterisk", e == null ? void 0 : e.hideRequiredAsterisk),
58
58
  (e == null ? void 0 : e.requireAsteriskPosition) === "right" ? "asterisk-right" : "asterisk-left",
59
- { [n.m("feedback")]: e == null ? void 0 : e.statusIcon }
60
- ]), te = o(
59
+ { [o.m("feedback")]: e == null ? void 0 : e.statusIcon }
60
+ ]), te = a(
61
61
  () => We(s.inlineMessage) ? s.inlineMessage : (e == null ? void 0 : e.inlineMessage) || !1
62
- ), se = o(() => [
63
- n.e("error"),
64
- { [n.em("error", "inline")]: te.value }
65
- ]), ie = o(() => s.prop ? ze(s.prop) ? s.prop : s.prop.join(".") : ""), S = o(() => !!(s.label || W.label)), _ = o(() => s.for || d.value.length === 1 ? d.value[0] : void 0), I = o(() => !_.value && S.value), le = !!C, N = o(() => {
62
+ ), se = a(() => [
63
+ o.e("error"),
64
+ { [o.em("error", "inline")]: te.value }
65
+ ]), ie = a(() => s.prop ? ze(s.prop) ? s.prop : s.prop.join(".") : ""), S = a(() => !!(s.label || W.label)), _ = a(() => s.for || n.value.length === 1 ? n.value[0] : void 0), I = a(() => !_.value && S.value), le = !!C, N = a(() => {
66
66
  const r = e == null ? void 0 : e.model;
67
67
  if (!(!r || !s.prop))
68
68
  return R(r, s.prop).value;
69
- }), V = o(() => {
69
+ }), V = a(() => {
70
70
  const { required: r } = s, t = [];
71
71
  s.rules && t.push(...H(s.rules));
72
- const l = e == null ? void 0 : e.rules;
73
- if (l && s.prop) {
74
- const a = R(
75
- l,
72
+ const i = e == null ? void 0 : e.rules;
73
+ if (i && s.prop) {
74
+ const l = R(
75
+ i,
76
76
  s.prop
77
77
  ).value;
78
- a && t.push(...H(a));
78
+ l && t.push(...H(l));
79
79
  }
80
80
  if (r !== void 0) {
81
- const a = t.map((u, f) => [u, f]).filter(([u]) => Object.keys(u).includes("required"));
82
- if (a.length > 0)
83
- for (const [u, f] of a)
81
+ const l = t.map((u, f) => [u, f]).filter(([u]) => Object.keys(u).includes("required"));
82
+ if (l.length > 0)
83
+ for (const [u, f] of l)
84
84
  u.required !== r && (t[f] = { ...u, required: r });
85
85
  else
86
86
  t.push({ required: r });
87
87
  }
88
88
  return t;
89
- }), ae = o(() => V.value.length > 0), oe = (r) => V.value.filter((l) => !l.trigger || !r ? !0 : Array.isArray(l.trigger) ? l.trigger.includes(r) : l.trigger === r).map(({ trigger: l, ...a }) => a), ne = o(
89
+ }), ae = a(() => V.value.length > 0), oe = (r) => V.value.filter((i) => !i.trigger || !r ? !0 : Array.isArray(i.trigger) ? i.trigger.includes(r) : i.trigger === r).map(({ trigger: i, ...l }) => l), ue = a(
90
90
  () => V.value.some((r) => r.required)
91
- ), ue = o(
91
+ ), ne = a(
92
92
  () => x.value === "error" && s.showMessage && ((e == null ? void 0 : e.showMessage) ?? !0)
93
- ), A = o(
93
+ ), A = a(
94
94
  () => `${s.label || ""}${(e == null ? void 0 : e.labelSuffix) || ""}`
95
95
  ), v = (r) => {
96
- p.value = r;
96
+ d.value = r;
97
97
  }, de = (r) => {
98
- var a;
99
- const { errors: t, fields: l } = r;
100
- (!t || !l) && console.error(r), v("error"), c.value = t ? ((a = t == null ? void 0 : t[0]) == null ? void 0 : a.message) ?? `${s.prop} is required` : "", e == null || e.emit("validate", s.prop, !1, c.value);
98
+ var l;
99
+ const { errors: t, fields: i } = r;
100
+ (!t || !i) && console.error(r), v("error"), p.value = t ? ((l = t == null ? void 0 : t[0]) == null ? void 0 : l.message) ?? `${s.prop} is required` : "", e == null || e.emit("validate", s.prop, !1, p.value);
101
101
  }, pe = () => {
102
102
  v("success"), e == null || e.emit("validate", s.prop, !0, "");
103
103
  }, ce = async (r) => {
104
104
  const t = ie.value;
105
105
  return new Me({
106
106
  [t]: r
107
- }).validate({ [t]: N.value }, { firstFields: !0 }).then(() => (pe(), !0)).catch((a) => (de(a), Promise.reject(a)));
107
+ }).validate({ [t]: N.value }, { firstFields: !0 }).then(() => (pe(), !0)).catch((l) => (de(l), Promise.reject(l)));
108
108
  }, P = async (r, t) => {
109
109
  if (m || !s.prop)
110
110
  return !1;
111
- const l = Be(t);
111
+ const i = Be(t);
112
112
  if (!ae.value)
113
113
  return t == null || t(!1), !1;
114
- const a = oe(r);
115
- return a.length === 0 ? (t == null || t(!0), !0) : (v("validating"), ce(a).then(() => (t == null || t(!0), !0)).catch((u) => {
114
+ const l = oe(r);
115
+ return l.length === 0 ? (t == null || t(!0), !0) : (v("validating"), ce(l).then(() => (t == null || t(!0), !0)).catch((u) => {
116
116
  const { fields: f } = u;
117
- return t == null || t(!1, f), l ? !1 : Promise.reject(f);
117
+ return t == null || t(!1, f), i ? !1 : Promise.reject(f);
118
118
  }));
119
119
  }, q = () => {
120
- v(""), c.value = "", m = !1;
120
+ v(""), p.value = "", m = !1;
121
121
  }, j = async () => {
122
122
  const r = e == null ? void 0 : e.model;
123
123
  if (!r || !s.prop)
@@ -125,14 +125,14 @@ const De = ["role", "aria-labelledby"], n = (
125
125
  const t = R(r, s.prop);
126
126
  m = !0, t.value = J(B), await Fe(), q(), m = !1;
127
127
  }, ve = (r) => {
128
- d.value.includes(r) || d.value.push(r);
128
+ n.value.includes(r) || n.value.push(r);
129
129
  }, fe = (r) => {
130
- d.value = d.value.filter((t) => t !== r);
130
+ n.value = n.value.filter((t) => t !== r);
131
131
  };
132
132
  E(
133
133
  () => s.error,
134
134
  (r) => {
135
- c.value = r || "", v(r ? "error" : "");
135
+ p.value = r || "", v(r ? "error" : "");
136
136
  },
137
137
  { immediate: !0 }
138
138
  ), E(
@@ -143,9 +143,9 @@ const De = ["role", "aria-labelledby"], n = (
143
143
  ...ge(s),
144
144
  $el: z,
145
145
  size: y,
146
- validateState: p,
146
+ validateState: d,
147
147
  labelId: b,
148
- inputIds: d,
148
+ inputIds: n,
149
149
  isGroup: I,
150
150
  hasLabel: S,
151
151
  addInputId: ve,
@@ -166,11 +166,11 @@ const De = ["role", "aria-labelledby"], n = (
166
166
  /**
167
167
  * @description Validation message.
168
168
  */
169
- validateMessage: c,
169
+ validateMessage: p,
170
170
  /**
171
171
  * @description Validation state.
172
172
  */
173
- validateState: p,
173
+ validateState: d,
174
174
  /**
175
175
  * @description Validate form item.
176
176
  */
@@ -184,29 +184,29 @@ const De = ["role", "aria-labelledby"], n = (
184
184
  */
185
185
  resetField: j
186
186
  }), (r, t) => {
187
- var l;
187
+ var i;
188
188
  return L(), _e("div", {
189
189
  ref_key: "formItemRef",
190
190
  ref: z,
191
- class: g(i(re)),
192
- role: i(I) ? "group" : void 0,
193
- "aria-labelledby": i(I) ? i(b) : void 0
191
+ class: g(re.value),
192
+ role: I.value ? "group" : void 0,
193
+ "aria-labelledby": I.value ? c(b) : void 0
194
194
  }, [
195
- T(i(je), {
196
- "is-auto-width": i($).width === "auto",
197
- "update-all": ((l = i(e)) == null ? void 0 : l.labelWidth) === "auto"
195
+ T(c(je), {
196
+ "is-auto-width": $.value.width === "auto",
197
+ "update-all": ((i = c(e)) == null ? void 0 : i.labelWidth) === "auto"
198
198
  }, {
199
199
  default: F(() => [
200
- i(S) ? (L(), Ie(Ve(i(_) ? "label" : "div"), {
200
+ S.value ? (L(), Ie(Ve(_.value ? "label" : "div"), {
201
201
  key: 0,
202
- id: i(b),
203
- for: i(_),
204
- class: g(i(n).e("label")),
205
- style: G(i($))
202
+ id: c(b),
203
+ for: _.value,
204
+ class: g(c(o).e("label")),
205
+ style: G($.value)
206
206
  }, {
207
207
  default: F(() => [
208
- M(r.$slots, "label", { label: i(A) }, () => [
209
- qe(K(i(A)), 1)
208
+ M(r.$slots, "label", { label: A.value }, () => [
209
+ qe(K(A.value), 1)
210
210
  ])
211
211
  ]),
212
212
  _: 3
@@ -215,21 +215,21 @@ const De = ["role", "aria-labelledby"], n = (
215
215
  _: 3
216
216
  }, 8, ["is-auto-width", "update-all"]),
217
217
  O("div", {
218
- class: g(i(n).e("content")),
219
- style: G(i(ee))
218
+ class: g(c(o).e("content")),
219
+ style: G(ee.value)
220
220
  }, [
221
221
  M(r.$slots, "default"),
222
222
  T(we, {
223
- name: `${i(n).namespace.value}-zoom-in-top`
223
+ name: `${c(o).namespace.value}-zoom-in-top`
224
224
  }, {
225
225
  default: F(() => [
226
- i(ue) ? M(r.$slots, "error", {
226
+ ne.value ? M(r.$slots, "error", {
227
227
  key: 0,
228
- error: c.value
228
+ error: p.value
229
229
  }, () => [
230
230
  O("div", {
231
- class: g(i(se))
232
- }, K(c.value), 3)
231
+ class: g(se.value)
232
+ }, K(p.value), 3)
233
233
  ]) : U("", !0)
234
234
  ]),
235
235
  _: 3
@@ -1,27 +1,27 @@
1
- import { defineComponent as y, computed as h, watch as O, getCurrentInstance as j, provide as q, reactive as x, openBlock as z, createElementBlock as S, normalizeClass as T, unref as I, renderSlot as M } from "vue";
2
- import { isFunction as R } from "@vft/utils";
1
+ import { defineComponent as v, computed as h, watch as x, getCurrentInstance as O, provide as j, reactive as q, openBlock as z, createElementBlock as S, normalizeClass as T, renderSlot as I } from "vue";
2
+ import { isFunction as M } from "@vft/utils";
3
3
  import { debugWarn as a } from "../../utils/error.js";
4
4
  import "lodash";
5
5
  import "@vueuse/core";
6
6
  import "../../utils/ns-cover.js";
7
- import { useNamespace as W } from "../../hooks/use-namespace/index.js";
7
+ import { useNamespace as R } from "../../hooks/use-namespace/index.js";
8
8
  import "@popperjs/core";
9
9
  import "../../hooks/use-z-index/index.js";
10
- import { useFormSize as $ } from "./hooks/use-form-common-props.js";
11
- import { formContextKey as A } from "./constants.js";
12
- import { useFormLabelWidth as K, filterFields as d } from "./utils.js";
10
+ import { useFormSize as W } from "./hooks/use-form-common-props.js";
11
+ import { formContextKey as $ } from "./constants.js";
12
+ import { useFormLabelWidth as A, filterFields as d } from "./utils.js";
13
13
  const n = (
14
14
  /* hoist-static*/
15
- W("form")
16
- ), L = y({
15
+ R("form")
16
+ ), K = v({
17
17
  name: n.b()
18
- }), ee = /* @__PURE__ */ y({
19
- ...L,
18
+ }), _ = /* @__PURE__ */ v({
19
+ ...K,
20
20
  props: {
21
- size: null,
21
+ size: {},
22
22
  disabled: { type: Boolean },
23
- model: null,
24
- rules: null,
23
+ model: {},
24
+ rules: {},
25
25
  labelPosition: { default: "right" },
26
26
  requireAsteriskPosition: { default: "left" },
27
27
  labelWidth: { default: "" },
@@ -35,8 +35,8 @@ const n = (
35
35
  scrollToError: { type: Boolean }
36
36
  },
37
37
  emits: ["validate"],
38
- setup(i, { expose: v, emit: F }) {
39
- const l = [], g = $(), B = h(() => [
38
+ setup(i, { expose: y, emit: F }) {
39
+ const s = [], g = W(), B = h(() => [
40
40
  n.b(),
41
41
  // todo: in v2.2.0, we can remove default
42
42
  // in fact, remove it doesn't affect the final style
@@ -46,24 +46,24 @@ const n = (
46
46
  [n.m("inline")]: i.inline
47
47
  }
48
48
  ]), w = (e) => {
49
- l.push(e);
49
+ s.push(e);
50
50
  }, b = (e) => {
51
- e.prop && l.splice(l.indexOf(e), 1);
51
+ e.prop && s.splice(s.indexOf(e), 1);
52
52
  }, u = (e = []) => {
53
53
  if (!i.model) {
54
54
  a(n.b(), "model is required for resetFields to work.");
55
55
  return;
56
56
  }
57
- d(l, e).forEach((t) => t.resetField());
57
+ d(s, e).forEach((t) => t.resetField());
58
58
  }, c = (e = []) => {
59
- d(l, e).forEach((t) => t.clearValidate());
59
+ d(s, e).forEach((t) => t.clearValidate());
60
60
  }, C = h(() => {
61
61
  const e = !!i.model;
62
62
  return e || a(n.b(), "model is required for validate to work."), e;
63
63
  }), E = (e) => {
64
- if (l.length === 0)
64
+ if (s.length === 0)
65
65
  return [];
66
- const t = d(l, e);
66
+ const t = d(s, e);
67
67
  return t.length ? t : (a(n.b(), "please pass correct props!"), []);
68
68
  }, m = async (e) => f(void 0, e), P = async (e = []) => {
69
69
  if (!C.value)
@@ -75,40 +75,40 @@ const n = (
75
75
  for (const r of t)
76
76
  try {
77
77
  await r.validate("");
78
- } catch (s) {
78
+ } catch (l) {
79
79
  o = {
80
80
  ...o,
81
- ...s
81
+ ...l
82
82
  };
83
83
  }
84
84
  return Object.keys(o).length === 0 ? !0 : Promise.reject(o);
85
85
  }, f = async (e = [], t) => {
86
- const o = !R(t);
86
+ const o = !M(t);
87
87
  try {
88
88
  const r = await P(e);
89
89
  return r === !0 && (t == null || t(r)), r;
90
90
  } catch (r) {
91
91
  if (r instanceof Error)
92
92
  throw r;
93
- const s = r;
94
- return i.scrollToError && p(Object.keys(s)[0]), t == null || t(!1, s), o && Promise.reject(s);
93
+ const l = r;
94
+ return i.scrollToError && p(Object.keys(l)[0]), t == null || t(!1, l), o && Promise.reject(l);
95
95
  }
96
96
  }, p = (e) => {
97
97
  var o;
98
- const t = d(l, e)[0];
98
+ const t = d(s, e)[0];
99
99
  t && ((o = t.$el) == null || o.scrollIntoView());
100
100
  };
101
- O(
101
+ x(
102
102
  () => i.rules,
103
103
  () => {
104
104
  i.validateOnRuleChange && m().catch((e) => a(e));
105
105
  },
106
106
  { deep: !0 }
107
107
  );
108
- const V = j();
109
- return q(
110
- A,
111
- x({
108
+ const V = O();
109
+ return j(
110
+ $,
111
+ q({
112
112
  ...V.props,
113
113
  emit: F,
114
114
  resetFields: u,
@@ -116,9 +116,9 @@ const n = (
116
116
  validateField: f,
117
117
  addField: w,
118
118
  removeField: b,
119
- ...K()
119
+ ...A()
120
120
  })
121
- ), v({
121
+ ), y({
122
122
  /**
123
123
  * @description Validate the whole form. Receives a callback or returns `Promise`.
124
124
  */
@@ -140,12 +140,12 @@ const n = (
140
140
  */
141
141
  scrollToField: p
142
142
  }), (e, t) => (z(), S("form", {
143
- class: T(I(B))
143
+ class: T(B.value)
144
144
  }, [
145
- M(e.$slots, "default")
145
+ I(e.$slots, "default")
146
146
  ], 2));
147
147
  }
148
148
  });
149
149
  export {
150
- ee as default
150
+ _ as default
151
151
  };