vft 0.0.509 → 0.0.511

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 (285) hide show
  1. package/dist/index.css +1 -1
  2. package/es/components/affix/affix.vue2.js +2 -2
  3. package/es/components/alert/alert.vue2.js +1 -1
  4. package/es/components/autocomplete/autocomplete.vue2.js +1 -1
  5. package/es/components/avatar/avatar.vue2.js +2 -2
  6. package/es/components/avatar-stack/avatar-stack.vue2.js +7 -7
  7. package/es/components/backtop/backtop.vue2.js +1 -1
  8. package/es/components/breadcrumb/breadcrumb-item.vue2.js +3 -3
  9. package/es/components/breadcrumb/breadcrumb.vue2.js +2 -2
  10. package/es/components/button/button-group.vue2.js +2 -2
  11. package/es/components/button/button.vue2.js +7 -7
  12. package/es/components/button/use-button.js +3 -3
  13. package/es/components/card/card.vue2.js +6 -6
  14. package/es/components/carousel/carousel-item.vue2.js +3 -3
  15. package/es/components/carousel/carousel.vue2.js +1 -1
  16. package/es/components/cascader/cascader.vue2.js +2 -2
  17. package/es/components/cascader-panel/index.vue2.js +1 -1
  18. package/es/components/cascader-panel/menu.vue2.js +6 -6
  19. package/es/components/cascader-panel/node.vue2.js +8 -8
  20. package/es/components/check-tag/check-tag.vue2.js +2 -2
  21. package/es/components/checkbox/checkbox-button.vue2.js +13 -13
  22. package/es/components/checkbox/checkbox-group.vue2.js +3 -3
  23. package/es/components/checkbox/checkbox.vue2.js +1 -1
  24. package/es/components/clamp/clamp.vue2.js +2 -2
  25. package/es/components/clamp-toggle/clamp-toggle.vue2.js +4 -4
  26. package/es/components/clamp-tooltip/clamp-tooltip.vue2.js +6 -6
  27. package/es/components/col/col.vue2.js +2 -2
  28. package/es/components/collapse/collapse-item.vue2.js +2 -2
  29. package/es/components/collapse/collapse.vue2.js +2 -2
  30. package/es/components/collapse-transition/collapse-transition.vue2.js +2 -2
  31. package/es/components/color-picker/color-picker.vue2.js +2 -2
  32. package/es/components/color-picker/components/alpha-slider.vue2.js +2 -2
  33. package/es/components/color-picker/components/hue-slider.vue.js +2 -2
  34. package/es/components/color-picker/components/predefine.vue.js +3 -3
  35. package/es/components/color-picker/components/sv-panel.vue.js +2 -2
  36. package/es/components/config-provider/config-provider.vue2.js +2 -2
  37. package/es/components/config-provider/hooks/use-global-config.js +3 -3
  38. package/es/components/container/aside.vue2.js +2 -2
  39. package/es/components/container/container.vue2.js +2 -2
  40. package/es/components/container/footer.vue2.js +2 -2
  41. package/es/components/container/header.vue2.js +2 -2
  42. package/es/components/container/main.vue2.js +2 -2
  43. package/es/components/context-menu/context-menu.vue2.js +1 -1
  44. package/es/components/countdown/countdown.vue2.js +2 -2
  45. package/es/components/date-picker/composables/use-basic-date-table.d.ts +1 -1
  46. package/es/components/date-picker/composables/use-basic-date-table.js +115 -115
  47. package/es/components/date-picker/composables/use-month-range-header.js +1 -1
  48. package/es/components/date-picker/composables/use-panel-date-range.js +1 -1
  49. package/es/components/date-picker/date-picker-com/basic-date-table.vue2.js +6 -6
  50. package/es/components/date-picker/date-picker-com/basic-month-table.vue2.js +5 -5
  51. package/es/components/date-picker/date-picker-com/basic-year-table.vue2.js +5 -5
  52. package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +12 -12
  53. package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +3 -3
  54. package/es/components/date-picker/date-picker-com/panel-month-range.vue2.js +12 -12
  55. package/es/components/date-picker/date-picker-com/panel-year-range.vue2.js +12 -12
  56. package/es/components/date-picker/props/basic-date-table.js +3 -3
  57. package/es/components/date-picker/props/basic-month-table.js +3 -3
  58. package/es/components/date-picker/props/basic-year-table.js +3 -3
  59. package/es/components/date-time-select/date-time-select.vue2.js +1 -1
  60. package/es/components/descriptions/description.vue2.js +1 -1
  61. package/es/components/descriptions/descriptions-row.vue2.js +10 -10
  62. package/es/components/dialog/dialog-content.vue2.js +3 -3
  63. package/es/components/dialog/dialog.vue2.js +5 -5
  64. package/es/components/divider/divider.vue2.js +5 -5
  65. package/es/components/drawer/drawer.vue2.js +4 -4
  66. package/es/components/dropdown/dropdown-item-impl.vue.d.ts +1 -1
  67. package/es/components/dropdown/dropdown-item-impl.vue2.js +3 -3
  68. package/es/components/dropdown/dropdown-item.vue.d.ts +1 -1
  69. package/es/components/dropdown/dropdown-item.vue2.js +2 -2
  70. package/es/components/dropdown/dropdown-menu.vue2.js +2 -2
  71. package/es/components/dropdown/dropdown.vue.d.ts +1 -1
  72. package/es/components/dropdown/dropdown.vue2.js +5 -5
  73. package/es/components/dropdown/index.d.ts +33 -33
  74. package/es/components/empty/empty.vue2.js +6 -6
  75. package/es/components/footer-layout/footer-layout.vue2.js +2 -2
  76. package/es/components/form/form-item.vue2.js +16 -16
  77. package/es/components/form/form.vue2.js +2 -2
  78. package/es/components/full-screen/full-screen.vue2.js +3 -3
  79. package/es/components/header-layout/header-layout.vue2.js +1 -1
  80. package/es/components/horizontal-menu/horizontal-menu.vue2.js +3 -3
  81. package/es/components/icon/icon.vue2.js +3 -3
  82. package/es/components/icon-text/icon-text.vue2.js +1 -1
  83. package/es/components/iframe-layout/iframe-layout.vue2.js +4 -4
  84. package/es/components/iframe-layout/iframe-page.vue2.js +2 -2
  85. package/es/components/image/image.vue2.js +2 -2
  86. package/es/components/image-viewer/image-viewer.vue2.js +7 -7
  87. package/es/components/index.d.ts +1 -0
  88. package/es/components/index.js +206 -203
  89. package/es/components/input/input.vue2.js +6 -6
  90. package/es/components/input-number/input-number.vue2.js +4 -4
  91. package/es/components/input-tag/input-tag.vue2.js +7 -7
  92. package/es/components/link/link.vue2.js +1 -1
  93. package/es/components/list-cell/list-cell.vue2.js +1 -1
  94. package/es/components/logo/logo.vue2.js +10 -10
  95. package/es/components/md-comment/md-comment.vue2.js +2 -2
  96. package/es/components/md-container/md-container.vue2.js +2 -2
  97. package/es/components/md-container/toc.js +1 -1
  98. package/es/components/menu/menu-collapse-transition.vue.js +2 -2
  99. package/es/components/menu/menu-item-group.vue2.js +7 -7
  100. package/es/components/menu/menu-item.vue2.js +1 -1
  101. package/es/components/message/message.vue2.js +3 -3
  102. package/es/components/message-box/index.d.ts +4 -0
  103. package/es/components/message-box/index.js +14 -0
  104. package/es/components/message-box/message-box.vue.d.ts +103 -0
  105. package/es/components/message-box/message-box.vue.js +4 -0
  106. package/es/components/message-box/message-box.vue2.js +358 -0
  107. package/es/components/message-box/method.d.ts +3 -0
  108. package/es/components/message-box/method.js +101 -0
  109. package/es/components/message-box/style/css.d.ts +2 -0
  110. package/es/components/message-box/style/css.js +3 -0
  111. package/es/components/message-box/style/index.d.ts +2 -0
  112. package/es/components/message-box/style/index.js +3 -0
  113. package/es/components/message-box/types.d.ts +202 -0
  114. package/es/components/message-box/types.js +1 -0
  115. package/es/components/modal/index.d.ts +1 -0
  116. package/es/components/modal/modal-footer-action.vue2.js +11 -11
  117. package/es/components/modal/modal.vue.d.ts +1 -0
  118. package/es/components/modal/modal.vue2.js +30 -28
  119. package/es/components/multiple-tabs/multiple-tabs.vue2.js +1 -1
  120. package/es/components/multiple-tabs/tab-content.vue2.js +2 -2
  121. package/es/components/multiple-tabs/use/use-tab-dropdown.js +1 -1
  122. package/es/components/notification/notification.vue2.js +1 -1
  123. package/es/components/overlay/overlay.vue2.js +1 -1
  124. package/es/components/page-wrapper/page-wrapper.vue2.js +2 -2
  125. package/es/components/pagination/components/jumper.vue2.js +28 -29
  126. package/es/components/pagination/components/next.vue2.js +4 -4
  127. package/es/components/pagination/components/pager.vue2.js +1 -1
  128. package/es/components/pagination/components/prev.vue2.js +4 -4
  129. package/es/components/pagination/components/sizes.vue2.js +20 -21
  130. package/es/components/pagination/components/total.vue2.js +10 -11
  131. package/es/components/popconfirm/popconfirm.vue2.js +4 -4
  132. package/es/components/popover/popover.vue2.js +1 -1
  133. package/es/components/popper/arrow.vue2.js +2 -2
  134. package/es/components/popper/content.vue2.js +2 -2
  135. package/es/components/popper/trigger.vue2.js +4 -4
  136. package/es/components/progress/progress.vue2.js +1 -1
  137. package/es/components/progress-i/progress-i.vue2.js +2 -2
  138. package/es/components/qrcode/qrcode.vue2.js +1 -1
  139. package/es/components/radio/radio-button.vue2.js +2 -2
  140. package/es/components/radio/radio-group.vue2.js +3 -3
  141. package/es/components/radio/radio.vue2.js +2 -2
  142. package/es/components/rate/rate.vue2.js +6 -6
  143. package/es/components/router-view-content/router-view-content.vue2.js +7 -7
  144. package/es/components/roving-focus-group/roving-focus-group.vue2.js +2 -2
  145. package/es/components/roving-focus-group/roving-focus-item.vue2.js +2 -2
  146. package/es/components/row/row.vue2.js +2 -2
  147. package/es/components/scrollbar/bar.vue2.js +2 -2
  148. package/es/components/scrollbar/scrollbar.vue2.js +7 -7
  149. package/es/components/scrollbar/thumb.vue2.js +2 -2
  150. package/es/components/search/search.vue2.js +8 -8
  151. package/es/components/segmented/segmented.vue2.js +7 -7
  152. package/es/components/select/group-item.vue.js +2 -2
  153. package/es/components/select/option-item.vue.js +2 -2
  154. package/es/components/select/select.vue.js +1 -1
  155. package/es/components/select/useSelect.js +1 -1
  156. package/es/components/skeleton/skeleton-item.vue2.js +2 -2
  157. package/es/components/skeleton/skeleton.vue2.js +8 -8
  158. package/es/components/slider/button.vue2.js +2 -2
  159. package/es/components/slider/slider.vue2.js +1 -1
  160. package/es/components/space/space.js +1 -1
  161. package/es/components/statistic/statistic.vue2.js +17 -17
  162. package/es/components/steps/item.vue2.js +11 -11
  163. package/es/components/steps/steps.vue2.js +2 -2
  164. package/es/components/super-form/super-form-action.vue2.js +47 -48
  165. package/es/components/super-form/super-form-item.vue2.js +204 -206
  166. package/es/components/super-form/super-form.vue2.js +7 -7
  167. package/es/components/super-form/use/helper.d.ts +1 -1
  168. package/es/components/super-form/use/helper.js +63 -63
  169. package/es/components/super-form/use/use-form.js +8 -8
  170. package/es/components/switch/switch.vue2.js +1 -1
  171. package/es/components/table/field.js +111 -130
  172. package/es/components/table/table.vue2.js +128 -133
  173. package/es/components/table/use/use-columns.js +26 -29
  174. package/es/components/table/use/use-data-source.js +59 -60
  175. package/es/components/tabs/tab-bar.vue2.js +2 -2
  176. package/es/components/tabs/tab-pane.vue2.js +6 -6
  177. package/es/components/teleport/teleport.vue2.js +2 -2
  178. package/es/components/time-picker/common/picker-range-trigger.vue2.js +2 -2
  179. package/es/components/time-picker/common/picker.vue2.js +8 -8
  180. package/es/components/time-picker/time-picker-com/basic-time-spinner.vue2.js +1 -1
  181. package/es/components/time-picker/time-picker-com/panel-time-pick.vue2.js +4 -4
  182. package/es/components/time-picker/time-picker-com/panel-time-range.vue2.js +4 -4
  183. package/es/components/time-select/time-select.vue2.js +3 -3
  184. package/es/components/timeline/timeline-item.vue2.js +1 -1
  185. package/es/components/tooltip/content.vue2.js +6 -6
  186. package/es/components/tooltip/tooltip.vue2.js +1 -1
  187. package/es/components/tooltip/trigger.vue2.js +2 -2
  188. package/es/components/transfer/transfer-panel.vue2.js +8 -8
  189. package/es/components/transfer/transfer.vue2.js +5 -5
  190. package/es/components/tree/tree-node.vue.js +1 -1
  191. package/es/components/tree/tree.vue2.js +7 -7
  192. package/es/components/upload/upload-content.vue2.js +8 -8
  193. package/es/components/upload/upload-dragger.vue2.js +2 -2
  194. package/es/components/upload/upload-list.vue2.js +2 -2
  195. package/es/components/upload/upload.vue2.js +20 -20
  196. package/es/components/verify-code/verify-code.vue2.js +2 -2
  197. package/es/components/watermark/watermark.vue2.js +2 -2
  198. package/es/hooks/use-id/index.js +2 -2
  199. package/es/index.js +40 -39
  200. package/es/locale/index.js +6 -6
  201. package/es/package.json.d.ts +1 -1
  202. package/es/package.json.js +1 -1
  203. package/es/plugin.js +5 -3
  204. package/es/utils/helper.js +2 -2
  205. package/es/utils/ns-cover.js +1 -1
  206. package/es/utils/vue/vnode.js +3 -3
  207. package/lib/components/button/use-button.cjs +1 -1
  208. package/lib/components/cascader/cascader.vue2.cjs +1 -1
  209. package/lib/components/cascader-panel/menu.vue2.cjs +2 -2
  210. package/lib/components/clamp-toggle/clamp-toggle.vue2.cjs +1 -1
  211. package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
  212. package/lib/components/date-picker/composables/use-basic-date-table.cjs +1 -1
  213. package/lib/components/date-picker/composables/use-basic-date-table.d.ts +1 -1
  214. package/lib/components/date-picker/composables/use-month-range-header.cjs +1 -1
  215. package/lib/components/date-picker/composables/use-panel-date-range.cjs +1 -1
  216. package/lib/components/date-picker/date-picker-com/basic-month-table.vue2.cjs +1 -1
  217. package/lib/components/date-picker/date-picker-com/basic-year-table.vue2.cjs +1 -1
  218. package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
  219. package/lib/components/date-picker/date-picker-com/panel-date-range.vue2.cjs +1 -1
  220. package/lib/components/date-time-select/date-time-select.vue2.cjs +1 -1
  221. package/lib/components/dropdown/dropdown-item-impl.vue.d.ts +1 -1
  222. package/lib/components/dropdown/dropdown-item.vue.d.ts +1 -1
  223. package/lib/components/dropdown/dropdown.vue.d.ts +1 -1
  224. package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
  225. package/lib/components/dropdown/index.d.ts +33 -33
  226. package/lib/components/empty/empty.vue2.cjs +1 -1
  227. package/lib/components/full-screen/full-screen.vue2.cjs +1 -1
  228. package/lib/components/image/image.vue2.cjs +1 -1
  229. package/lib/components/image-viewer/image-viewer.vue2.cjs +1 -1
  230. package/lib/components/index.cjs +1 -1
  231. package/lib/components/index.d.ts +1 -0
  232. package/lib/components/input/input.vue2.cjs +1 -1
  233. package/lib/components/md-container/md-container.vue2.cjs +1 -1
  234. package/lib/components/md-container/toc.cjs +1 -1
  235. package/lib/components/message-box/index.cjs +1 -0
  236. package/lib/components/message-box/index.d.ts +4 -0
  237. package/lib/components/message-box/message-box.vue.cjs +1 -0
  238. package/lib/components/message-box/message-box.vue.d.ts +103 -0
  239. package/lib/components/message-box/message-box.vue2.cjs +1 -0
  240. package/lib/components/message-box/method.cjs +1 -0
  241. package/lib/components/message-box/method.d.ts +3 -0
  242. package/lib/components/message-box/style/css.cjs +1 -0
  243. package/lib/components/message-box/style/css.d.ts +2 -0
  244. package/lib/components/message-box/style/index.cjs +1 -0
  245. package/lib/components/message-box/style/index.d.ts +2 -0
  246. package/lib/components/message-box/types.cjs +1 -0
  247. package/lib/components/message-box/types.d.ts +202 -0
  248. package/lib/components/modal/index.d.ts +1 -0
  249. package/lib/components/modal/modal-footer-action.vue2.cjs +1 -1
  250. package/lib/components/modal/modal.vue.d.ts +1 -0
  251. package/lib/components/modal/modal.vue2.cjs +1 -1
  252. package/lib/components/multiple-tabs/use/use-tab-dropdown.cjs +1 -1
  253. package/lib/components/pagination/components/jumper.vue2.cjs +1 -1
  254. package/lib/components/pagination/components/sizes.vue2.cjs +1 -1
  255. package/lib/components/pagination/components/total.vue2.cjs +1 -1
  256. package/lib/components/popconfirm/popconfirm.vue2.cjs +1 -1
  257. package/lib/components/search/search.vue2.cjs +1 -1
  258. package/lib/components/select/useSelect.cjs +1 -1
  259. package/lib/components/super-form/super-form-action.vue2.cjs +1 -1
  260. package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
  261. package/lib/components/super-form/use/helper.cjs +1 -1
  262. package/lib/components/super-form/use/helper.d.ts +1 -1
  263. package/lib/components/super-form/use/use-form.cjs +1 -1
  264. package/lib/components/table/field.cjs +1 -1
  265. package/lib/components/table/table.vue2.cjs +1 -1
  266. package/lib/components/table/use/use-columns.cjs +1 -1
  267. package/lib/components/table/use/use-data-source.cjs +1 -1
  268. package/lib/components/time-picker/time-picker-com/panel-time-pick.vue2.cjs +1 -1
  269. package/lib/components/time-picker/time-picker-com/panel-time-range.vue2.cjs +1 -1
  270. package/lib/components/transfer/transfer-panel.vue2.cjs +1 -1
  271. package/lib/components/transfer/transfer.vue2.cjs +1 -1
  272. package/lib/components/tree/tree.vue2.cjs +1 -1
  273. package/lib/components/upload/upload-content.vue2.cjs +1 -1
  274. package/lib/components/upload/upload-list.vue2.cjs +1 -1
  275. package/lib/components/upload/upload.vue2.cjs +1 -1
  276. package/lib/index.cjs +1 -1
  277. package/lib/locale/index.cjs +1 -1
  278. package/lib/package.json.cjs +1 -1
  279. package/lib/package.json.d.ts +1 -1
  280. package/lib/plugin.cjs +1 -1
  281. package/package.json +2 -2
  282. package/theme-style/index.css +1 -1
  283. package/theme-style/src/table.scss +4 -0
  284. package/theme-style/vft-table.css +1 -1
  285. package/web-types.json +1 -1
@@ -1,4 +1,4 @@
1
- import { defineComponent as J, useAttrs as le, reactive as ue, ref as m, computed as u, unref as n, watch as d, nextTick as ie, useSlots as me, createBlock as i, createCommentVNode as U, openBlock as l, mergeProps as B, withKeys as fe, withModifiers as ce, withCtx as h, renderSlot as O, normalizeProps as W, createElementBlock as pe, Fragment as de, renderList as j, createSlots as Be, resolveDynamicComponent as A, h as he } from "vue";
1
+ import { defineComponent as J, useAttrs as le, reactive as ue, ref as m, computed as u, unref as n, watch as d, nextTick as ie, useSlots as me, openBlock as l, createBlock as i, mergeProps as B, withKeys as fe, withModifiers as ce, withCtx as h, normalizeProps as U, renderSlot as O, createElementBlock as pe, Fragment as de, renderList as W, createSlots as Be, resolveDynamicComponent as A, createCommentVNode as j, h as he } from "vue";
2
2
  import { VftCol as ye } from "../col/index.js";
3
3
  import { VftForm as ve } from "../form/index.js";
4
4
  import { VftRow as be } from "../row/index.js";
@@ -314,10 +314,10 @@ const _e = J({
314
314
  }, ["prevent"])),
315
315
  onKeypress: fe(ne, ["enter"])
316
316
  }), {
317
- default: h(() => [a.value?.length ? (l(), i(n(be), W(B({
317
+ default: h(() => [a.value?.length ? (l(), i(n(be), U(B({
318
318
  key: 0
319
319
  }, f.value?.rowProps)), {
320
- default: h(() => [O(e.$slots, "formHeader"), (l(!0), pe(de, null, j(a.value, (s) => (l(), i(Oe, {
320
+ default: h(() => [O(e.$slots, "formHeader"), (l(!0), pe(de, null, W(a.value, (s) => (l(), i(Oe, {
321
321
  key: s.field,
322
322
  "form-action-type": H,
323
323
  schema: s,
@@ -328,14 +328,14 @@ const _e = J({
328
328
  "update-schema": n(R)
329
329
  }, Be({
330
330
  _: 2
331
- }, [j(Object.keys(e.$slots), (K) => ({
331
+ }, [W(Object.keys(e.$slots), (K) => ({
332
332
  name: K,
333
333
  fn: h((re) => [O(e.$slots, K, B({
334
334
  ref_for: !0
335
335
  }, re || {}))])
336
336
  }))]), 1032, ["schema", "form-props", "all-default-values", "form-model", "update-schema"]))), 128)), t.value?.customLayout ? (l(), i(A(E(t.value?.showActionButtonGroup && t.value?.actionInline)), {
337
337
  key: 1
338
- })) : (l(), i(n(ye), W(B({
338
+ })) : (l(), i(n(ye), U(B({
339
339
  key: 0
340
340
  }, f.value?.quickColSpan ? {
341
341
  span: Math.ceil(24 / f.value?.quickColSpan),
@@ -345,9 +345,9 @@ const _e = J({
345
345
  _: 1
346
346
  }, 16))]),
347
347
  _: 3
348
- }, 16)) : U("", !0), (l(), i(A(E(t.value?.showActionButtonGroup && !t.value?.actionInline)))), O(e.$slots, "formFooter")]),
348
+ }, 16)) : j("", !0), (l(), i(A(E(t.value?.showActionButtonGroup && !t.value?.actionInline)))), O(e.$slots, "formFooter")]),
349
349
  _: 3
350
- }, 16, ["class", "model"])) : U("", !0);
350
+ }, 16, ["class", "model"])) : j("", !0);
351
351
  }
352
352
  });
353
353
  export {
@@ -7,7 +7,7 @@ import { type FormCompEnumType } from 'vft/es/utils';
7
7
  * @param type 组件类型
8
8
  * @param label
9
9
  */
10
- export declare function createPlaceholderMessage(type: FormCompEnumType, label?: string): "" | "vft.superFormPlaceholder.input" | "vft.superFormPlaceholder.password" | "vft.superFormPlaceholder.select" | "vft.superFormPlaceholder.checkbox" | "vft.superFormPlaceholder.search" | "vft.superFormPlaceholder.tag" | "vft.superFormPlaceholder.upload" | "vft.superFormPlaceholder.slider" | "vft.superFormPlaceholder.time";
10
+ export declare function createPlaceholderMessage(type: FormCompEnumType, label?: string): string;
11
11
  /**
12
12
  * @description 处理 input 输入为数值的 val
13
13
  * @example
@@ -1,91 +1,91 @@
1
- import { isBoolean as l, isFunction as a, isNumber as h } from "@vft/utils";
2
- import { isInput as m } from "../component-map.js";
3
- import { FormCompEnum as e } from "../../../utils/form-register.js";
1
+ import { isBoolean as a, isFunction as d, isNumber as S } from "@vft/utils";
2
+ import { isInput as h } from "../component-map.js";
3
+ import { FormCompEnum as i } from "../../../utils/form-register.js";
4
4
  import "@vueuse/core";
5
5
  import "../../config-provider/hooks/use-global-config.js";
6
6
  import "vue";
7
7
  import "lodash-es";
8
8
  import "../../form/index.js";
9
- function v(i, t = "") {
10
- return t = (t || "").replace(":", "") || "", [
11
- e.Input,
12
- e.InputNumber,
13
- e.Textarea,
14
- e.AutoComplete
15
- ].includes(i) ? "vft.superFormPlaceholder.input" : [e.Password].includes(i) ? "vft.superFormPlaceholder.password" : [
16
- e.Select,
17
- e.Radio,
18
- e.RadioSingle,
19
- e.RadioButton,
20
- e.Cascader,
21
- e.TreeSelect,
22
- e.ColorPicker,
23
- e.Checkbox,
24
- e.CheckboxButton
25
- ].includes(i) ? "vft.superFormPlaceholder.select" : [e.CheckboxSingle].includes(i) ? "vft.superFormPlaceholder.checkbox" : [e.Search].includes(i) ? "vft.superFormPlaceholder.search" : [e.InputTag].includes(i) ? "vft.superFormPlaceholder.tag" : [e.Upload].includes(i) ? "vft.superFormPlaceholder.upload" : [e.Slider].includes(i) ? "vft.superFormPlaceholder.slider" : [
26
- e.TimePicker,
27
- e.YearPicker,
28
- e.MonthPicker,
29
- e.DatePicker,
30
- e.DatesPicker,
31
- e.DateTimePicker,
32
- e.WeekPicker,
33
- e.DateTimeRangePicker,
34
- e.DateRangePicker,
35
- e.MonthRangePicker
36
- ].includes(i) ? "vft.superFormPlaceholder.time" : "";
9
+ function R(t, e = "") {
10
+ return e = (e || "").replace(":", "") || "", [
11
+ i.Input,
12
+ i.InputNumber,
13
+ i.Textarea,
14
+ i.AutoComplete
15
+ ].includes(t) ? `请输入${e}` : [i.Password].includes(t) ? `请输入${e || "密码"}` : [
16
+ i.Select,
17
+ i.Radio,
18
+ i.RadioSingle,
19
+ i.RadioButton,
20
+ i.Cascader,
21
+ i.TreeSelect,
22
+ i.ColorPicker,
23
+ i.Checkbox,
24
+ i.CheckboxButton
25
+ ].includes(t) ? `请选择${e}` : [i.CheckboxSingle].includes(t) ? `请勾选${e}` : [i.Search].includes(t) ? `请输入要搜索的内容${e ? "" + e : ""}` : [i.InputTag].includes(t) ? `请输入标签内容${e ? "" + e : ""}` : [i.Upload].includes(t) ? `请选择上传文件${e ? "" + e : ""}` : [i.Slider].includes(t) ? `请拖动滑块${e ? "" + e : ""}` : [
26
+ i.TimePicker,
27
+ i.YearPicker,
28
+ i.MonthPicker,
29
+ i.DatePicker,
30
+ i.DatesPicker,
31
+ i.DateTimePicker,
32
+ i.WeekPicker,
33
+ i.DateTimeRangePicker,
34
+ i.DateRangePicker,
35
+ i.MonthRangePicker
36
+ ].includes(t) ? `请选择时间${e ? "" + e : ""}` : "";
37
37
  }
38
- function x(i, t) {
39
- return i && m(i) && t && h(t) ? `${t}` : t;
38
+ function P(t, e) {
39
+ return t && h(t) && e && S(e) ? `${e}` : e;
40
40
  }
41
- function S(i, t) {
42
- const { show: n, ifShow: r } = i;
43
- let u = !0, o = !0;
44
- return l(n) ? u = n : a(n) && t && (u = n(t)), l(r) ? o = r : a(r) && t && (o = r(t)), { isShow: u, isIfShow: o };
41
+ function k(t, e) {
42
+ const { show: n, ifShow: o } = t;
43
+ let u = !0, c = !0;
44
+ return a(n) ? u = n : d(n) && e && (u = n(e)), a(o) ? c = o : d(o) && e && (c = o(e)), { isShow: u, isIfShow: c };
45
45
  }
46
- function k(i, t) {
47
- const { baseColProps: n = {}, quickColSpan: r } = t;
48
- return i.type === e.Divider ? 24 : i.colProps?.span !== void 0 ? i.colProps.span : i.quickColSpan ? Math.ceil(24 / i.quickColSpan) : n.span !== void 0 ? n.span : r ? Math.ceil(24 / r) : 24;
46
+ function m(t, e) {
47
+ const { baseColProps: n = {}, quickColSpan: o } = e;
48
+ return t.type === i.Divider ? 24 : t.colProps?.span !== void 0 ? t.colProps.span : t.quickColSpan ? Math.ceil(24 / t.quickColSpan) : n.span !== void 0 ? n.span : o ? Math.ceil(24 / o) : 24;
49
49
  }
50
- function B(i, t, n, r) {
51
- if (t.customLayout)
50
+ function q(t, e, n, o) {
51
+ if (e.customLayout)
52
52
  return {
53
53
  willExceed: !1,
54
54
  totalSpan: 0,
55
55
  visibleItems: []
56
56
  };
57
57
  const u = [];
58
- let o = 0;
59
- for (const c of i) {
60
- const p = n && r ? {
61
- field: c.field,
58
+ let c = 0;
59
+ for (const r of t) {
60
+ const f = n && o ? {
61
+ field: r.field,
62
62
  model: n,
63
63
  values: {
64
- ...r,
64
+ ...o,
65
65
  ...n
66
66
  },
67
- schema: c
68
- } : void 0, { isIfShow: f } = S(c, p);
69
- if (!f)
67
+ schema: r
68
+ } : void 0, { isIfShow: l } = k(r, f);
69
+ if (!l)
70
70
  continue;
71
- const s = k(c, t);
72
- u.push({ field: c.field, span: s }), o += s;
71
+ const s = m(r, e);
72
+ u.push({ field: r.field, span: s }), c += s;
73
73
  }
74
- const d = t.showCommonButton || t.showResetButton || t.showSubmitButton;
75
- if (t.actionInline && t.showActionButtonGroup && d && !t.customLayout) {
76
- const c = t.quickColSpan ? Math.ceil(24 / t.quickColSpan) : t.baseColProps?.span || 24;
77
- o += c;
74
+ const p = e.showCommonButton || e.showResetButton || e.showSubmitButton;
75
+ if (e.actionInline && e.showActionButtonGroup && p && !e.customLayout) {
76
+ const r = e.quickColSpan ? Math.ceil(24 / e.quickColSpan) : e.baseColProps?.span || 24;
77
+ c += r;
78
78
  }
79
79
  return {
80
- willExceed: o > 24,
81
- totalSpan: o,
80
+ willExceed: c > 24,
81
+ totalSpan: c,
82
82
  visibleItems: u
83
83
  };
84
84
  }
85
85
  export {
86
- k as calculateSchemaSpan,
87
- v as createPlaceholderMessage,
88
- S as getSchemaShowState,
89
- x as handleInputNumberValue,
90
- B as willFormExceedOneRow
86
+ m as calculateSchemaSpan,
87
+ R as createPlaceholderMessage,
88
+ k as getSchemaShowState,
89
+ P as handleInputNumberValue,
90
+ q as willFormExceedOneRow
91
91
  };
@@ -1,6 +1,6 @@
1
1
  import "../../form/index.js";
2
- import { tryOnBeforeUnmount as l } from "@vueuse/core";
3
- import { ref as m, unref as o, watch as u, nextTick as f } from "vue";
2
+ import { tryOnBeforeUnmount as u } from "@vueuse/core";
3
+ import { ref as m, unref as o, watch as f, nextTick as c } from "vue";
4
4
  function d(s) {
5
5
  const r = {};
6
6
  return Object.keys(s).map((i) => {
@@ -13,12 +13,12 @@ function v(s) {
13
13
  const e = o(r);
14
14
  return e || console.error(
15
15
  "The form instance has not been obtained, please make sure that the form has been rendered when performing the form operation!"
16
- ), await f(), e;
16
+ ), await c(), e;
17
17
  }
18
- function c(e) {
19
- l(() => {
18
+ function l(e) {
19
+ u(() => {
20
20
  r.value = null, i.value = null;
21
- }), !(o(i) && e === o(r)) && (r.value = e, i.value = !0, u(
21
+ }), !(o(i) && e === o(r)) && (r.value = e, i.value = !0, f(
22
22
  () => s,
23
23
  () => {
24
24
  s && e && e.setProps(d(s));
@@ -29,7 +29,7 @@ function v(s) {
29
29
  }
30
30
  ));
31
31
  }
32
- return [c, {
32
+ return [l, {
33
33
  scrollToField: async (e, t) => {
34
34
  (await a()).scrollToField(e, t);
35
35
  },
@@ -66,7 +66,7 @@ function v(s) {
66
66
  getFieldValue: (e) => o(r)?.getFieldValue(e),
67
67
  getFieldsValue: () => o(r)?.getFieldsValue(),
68
68
  setFieldsValue: async (e, t = !0) => {
69
- (await a()).setFieldsValue(e, t);
69
+ await c(), await (await a()).setFieldsValue(e, t);
70
70
  },
71
71
  appendSchemaByField: async (e, t, n) => {
72
72
  await (await a()).appendSchemaByField(e, t, n);
@@ -1,4 +1,4 @@
1
- import { defineComponent as M, computed as s, ref as g, watch as T, onMounted as Q, createElementBlock as v, openBlock as o, withModifiers as R, normalizeStyle as F, normalizeClass as c, createElementVNode as p, createCommentVNode as r, withKeys as X, unref as i, createBlock as k, normalizeProps as I, mergeProps as w, toDisplayString as B, nextTick as Y } from "vue";
1
+ import { defineComponent as M, computed as s, ref as g, watch as T, onMounted as Q, openBlock as o, createElementBlock as v, withModifiers as R, normalizeStyle as F, normalizeClass as c, createElementVNode as p, withKeys as X, unref as i, createBlock as k, normalizeProps as I, mergeProps as w, createCommentVNode as r, toDisplayString as B, nextTick as Y } from "vue";
2
2
  import { singleAttrToObj as O, isPromise as A, isBoolean as Z } from "@vft/utils";
3
3
  import "../form/index.js";
4
4
  import { VftIcon as V } from "../icon/index.js";
@@ -1,174 +1,155 @@
1
- import { createVNode as r, Fragment as v, isVNode as h } from "vue";
2
- import { useLoadingDelay as L } from "@vft/use";
3
- import { formatToDateTime as p } from "@vft/utils/date";
4
- import { isNullOrUndefined as M } from "@vft/utils";
5
- import { VftButton as d } from "../button/index.js";
6
- import { VftPopconfirm as F } from "../popconfirm/index.js";
7
- import { VftTag as D } from "../tag/index.js";
8
- import { useLocale as E } from "../../locale/use-locale.js";
9
- function f(t) {
10
- return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !h(t);
1
+ import { createVNode as r, Fragment as _, isVNode as g } from "vue";
2
+ import { useLoadingDelay as h } from "@vft/use";
3
+ import { formatToDateTime as d } from "@vft/utils/date";
4
+ import { isNullOrUndefined as L } from "@vft/utils";
5
+ import { VftButton as u } from "../button/index.js";
6
+ import { VftPopconfirm as M } from "../popconfirm/index.js";
7
+ import { VftTag as c } from "../tag/index.js";
8
+ function m(t) {
9
+ return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !g(t);
11
10
  }
12
- const S = {
11
+ const N = {
13
12
  type: "seq",
14
- title: "vft.table.seq",
13
+ title: "序号",
15
14
  fixed: "left",
16
15
  width: 53
17
- }, k = {
16
+ }, V = {
18
17
  type: "checkbox",
19
18
  title: "",
20
19
  minWidth: 60,
21
20
  fixed: "left"
22
- }, O = {
21
+ }, S = {
23
22
  field: "id",
24
23
  title: "Id",
25
24
  minWidth: 100
26
- }, P = {
25
+ }, k = {
27
26
  field: "name",
28
- title: "vft.table.name",
27
+ title: "名称",
29
28
  minWidth: 100
30
- }, j = ({
29
+ }, O = ({
31
30
  format: t = "YYYY-MM-DD",
32
31
  field: e = "date",
33
- title: l = "vft.table.time"
32
+ title: i = "时间"
34
33
  } = {}) => ({
35
34
  minWidth: 100,
36
35
  field: e,
37
- title: l,
36
+ title: i,
38
37
  formatter: ({
39
38
  row: o
40
- }) => o[e] ? p(o[e], t) : "-"
41
- }), b = ({
39
+ }) => o[e] ? d(o[e], t) : "-"
40
+ }), D = ({
42
41
  format: t = "YYYY-MM-DD HH:mm:ss",
43
42
  field: e = "date",
44
- title: l = "vft.table.time"
43
+ title: i = "时间"
45
44
  } = {}) => ({
46
45
  minWidth: 190,
47
46
  field: e,
48
- title: l,
47
+ title: i,
49
48
  formatter: ({
50
49
  row: o
51
- }) => o[e] ? p(o[e], t) : "-"
52
- }), U = ({
50
+ }) => o[e] ? d(o[e], t) : "-"
51
+ }), P = ({
53
52
  format: t = "YYYY-MM-DD HH:mm:ss",
54
53
  field: e = "createTime",
55
- title: l = "vft.table.createTime"
56
- } = {}) => b({
54
+ title: i = "创建时间"
55
+ } = {}) => D({
57
56
  format: t,
58
57
  field: e,
59
- title: l
60
- }), q = ({
58
+ title: i
59
+ }), b = ({
61
60
  format: t = "YYYY-MM-DD HH:mm:ss",
62
61
  field: e = "updateTime",
63
- title: l = "vft.table.updateTime"
64
- } = {}) => b({
62
+ title: i = "更新时间"
63
+ } = {}) => D({
65
64
  format: t,
66
65
  field: e,
67
- title: l
68
- }), z = ({
66
+ title: i
67
+ }), j = ({
69
68
  field: t = "status",
70
- title: e = "vft.table.status",
71
- normalText: l = "vft.table.statusNormal",
72
- disabledText: o = "vft.table.statusDisabled",
73
- strToNumber: u = !0
74
- } = {}) => {
75
- const {
76
- t: m
77
- } = E();
78
- return {
79
- field: t,
80
- title: e,
81
- minWidth: 100,
82
- slots: {
83
- default: ({
84
- row: c
85
- }) => {
86
- let i = c?.[t];
87
- if (M(i))
88
- return "-";
89
- {
90
- let n, a;
91
- return u && Number(i) === 0 && (i = !1), i ? r(D, null, f(n = m(l)) ? n : {
92
- default: () => [n]
93
- }) : r(D, {
94
- type: "danger"
95
- }, f(a = m(o)) ? a : {
96
- default: () => [a]
97
- });
98
- }
99
- }
69
+ title: e = "状态",
70
+ normalText: i = "正常",
71
+ disabledText: o = "禁用",
72
+ strToNumber: l = !0
73
+ } = {}) => ({
74
+ field: t,
75
+ title: e,
76
+ minWidth: 100,
77
+ slots: {
78
+ default: ({
79
+ row: a
80
+ }) => {
81
+ let n = a?.[t];
82
+ return L(n) ? "-" : (l && Number(n) === 0 && (n = !1), n ? r(c, null, m(i) ? i : {
83
+ default: () => [i]
84
+ }) : r(c, {
85
+ type: "danger"
86
+ }, m(o) ? o : {
87
+ default: () => [o]
88
+ }));
100
89
  }
101
- };
102
- }, R = ({
103
- confirmText: t = "vft.table.confirmDelete",
90
+ }
91
+ }), U = ({
92
+ confirmText: t = "确认删除?",
104
93
  leftCallback: e,
105
- rightCallback: l,
106
- leftText: o = "vft.table.edit",
107
- rightText: u = "vft.table.delete",
108
- showLeft: m = !0,
109
- showRight: c = !0
110
- } = {}) => {
111
- const {
112
- t: i
113
- } = E();
114
- return {
115
- title: "vft.table.actionColumn",
116
- field: "custom-action",
117
- fixed: "right",
118
- slots: {
119
- default: ({
120
- row: n
121
- }) => {
122
- let a;
123
- const {
124
- loading: _,
125
- start: T,
126
- cancel: I
127
- } = L(), Y = () => {
128
- T(), l?.(n)?.finally(() => {
129
- I();
130
- });
131
- };
132
- return r(v, null, [m ? r(d, {
94
+ rightCallback: i,
95
+ leftText: o = "编辑",
96
+ rightText: l = "删除",
97
+ showLeft: a = !0,
98
+ showRight: n = !0
99
+ } = {}) => ({
100
+ title: "操作",
101
+ field: "custom-action",
102
+ fixed: "right",
103
+ minWidth: 180,
104
+ slots: {
105
+ default: ({
106
+ row: f
107
+ }) => {
108
+ const {
109
+ loading: p,
110
+ start: E,
111
+ cancel: I
112
+ } = h(), Y = () => {
113
+ E(), i?.(f)?.finally(() => {
114
+ I();
115
+ });
116
+ };
117
+ return r(_, null, [a ? r(u, {
118
+ size: "small",
119
+ type: "primary",
120
+ onClick: (s) => {
121
+ s.stopPropagation(), e?.(f);
122
+ }
123
+ }, m(o) ? o : {
124
+ default: () => [o]
125
+ }) : null, n ? r(M, {
126
+ width: "150",
127
+ onConfirm: Y,
128
+ title: t
129
+ }, {
130
+ reference: () => r(u, {
131
+ loading: p.value,
133
132
  size: "small",
134
- type: "primary",
133
+ type: "danger",
135
134
  onClick: (s) => {
136
- s.stopPropagation(), e?.(n);
137
- }
138
- }, f(a = i(o)) ? a : {
139
- default: () => [a]
140
- }) : null, c ? r(F, {
141
- width: "150",
142
- onConfirm: Y,
143
- title: i(t)
144
- }, {
145
- reference: () => {
146
- let s;
147
- return r(d, {
148
- loading: _.value,
149
- size: "small",
150
- type: "danger",
151
- onClick: (g) => {
152
- g.stopPropagation();
153
- }
154
- }, f(s = i(u)) ? s : {
155
- default: () => [s]
156
- });
135
+ s.stopPropagation();
157
136
  }
158
- }) : null]);
159
- }
137
+ }, m(l) ? l : {
138
+ default: () => [l]
139
+ })
140
+ }) : null]);
160
141
  }
161
- };
162
- };
142
+ }
143
+ });
163
144
  export {
164
- R as ACTION_FIELD,
165
- k as CHECKED_FIELD,
166
- U as CREATE_TIME_FIELD,
167
- j as DATE_FIELD,
168
- b as DATE_TIME_FIELD,
169
- O as ID_FIELD,
170
- P as NAME_FIELD,
171
- S as SEQ_FIELD,
172
- z as STATUS_FIELD,
173
- q as UPDATE_TIME_FIELD
145
+ U as ACTION_FIELD,
146
+ V as CHECKED_FIELD,
147
+ P as CREATE_TIME_FIELD,
148
+ O as DATE_FIELD,
149
+ D as DATE_TIME_FIELD,
150
+ S as ID_FIELD,
151
+ k as NAME_FIELD,
152
+ N as SEQ_FIELD,
153
+ j as STATUS_FIELD,
154
+ b as UPDATE_TIME_FIELD
174
155
  };