@aplus-frontend/ui 0.0.1-beta.7 → 0.0.1-beta.8

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 (351) hide show
  1. package/es/index.mjs +165 -160
  2. package/es/src/ap-action/group/index.vue.mjs +22 -18
  3. package/es/src/ap-action/index.mjs +7 -4
  4. package/es/src/ap-action/interface.mjs +1 -0
  5. package/es/src/ap-action/item/index.vue.mjs +2 -47
  6. package/es/src/ap-action/item/index.vue2.mjs +47 -2
  7. package/es/src/ap-action/item-dropdown/index.vue.mjs +14 -11
  8. package/es/src/ap-action/item-modal/index.vue.mjs +9 -8
  9. package/es/src/ap-action/item-popconfirm/index.vue.mjs +10 -8
  10. package/es/src/ap-field/checkbox/index.vue.mjs +32 -25
  11. package/es/src/ap-field/date/index.vue.mjs +19 -20
  12. package/es/src/ap-field/date-range/index.vue.mjs +9 -9
  13. package/es/src/ap-field/index.d.ts +12 -0
  14. package/es/src/ap-field/index.mjs +42 -0
  15. package/es/src/ap-field/interface.d.ts +3 -2
  16. package/es/src/ap-field/interface.mjs +1 -0
  17. package/es/src/ap-field/number/helper.mjs +2 -2
  18. package/es/src/ap-field/number/index.vue.mjs +30 -32
  19. package/es/src/ap-field/radio/index.vue.mjs +40 -34
  20. package/es/src/ap-field/select/index.vue.mjs +1 -1
  21. package/es/src/ap-field/switch/index.vue.mjs +6 -6
  22. package/es/src/ap-field/text/index.vue.mjs +29 -29
  23. package/es/src/ap-field/text-area/index.vue.mjs +5 -5
  24. package/es/src/ap-form/ap-form-item-group/index.vue.mjs +2 -56
  25. package/es/src/ap-form/ap-form-item-group/index.vue2.mjs +56 -2
  26. package/es/src/ap-form/ap-form-item.vue.mjs +2 -74
  27. package/es/src/ap-form/ap-form-item.vue2.mjs +74 -2
  28. package/es/src/ap-form/components/interface.d.ts +0 -0
  29. package/es/src/ap-form/index.d.ts +11 -1682
  30. package/es/src/ap-form/index.mjs +11 -7
  31. package/es/src/base-button/button.vue.mjs +2 -58
  32. package/es/src/base-button/button.vue2.mjs +59 -2
  33. package/es/src/base-button/index.mjs +8 -8
  34. package/es/src/base-button/interface.mjs +1 -0
  35. package/es/src/base-button/modal-button.vue.mjs +12 -11
  36. package/es/src/base-button/pop-confirm-button.vue.mjs +15 -14
  37. package/es/src/basic/arrow.vue.mjs +2 -38
  38. package/es/src/basic/arrow.vue2.mjs +38 -2
  39. package/es/src/basic/help.vue.mjs +2 -96
  40. package/es/src/basic/help.vue2.mjs +96 -2
  41. package/es/src/basic/index.mjs +11 -7
  42. package/es/src/basic/interface.mjs +1 -0
  43. package/es/src/basic/title.vue.mjs +2 -32
  44. package/es/src/basic/title.vue2.mjs +33 -2
  45. package/es/src/config-provider/config-provider.mjs +4 -4
  46. package/es/src/config-provider/hooks/use-locale.mjs +1 -0
  47. package/es/src/config-provider/index.mjs +26 -13
  48. package/es/src/container/collapse/header.vue.mjs +2 -49
  49. package/es/src/container/collapse/header.vue2.mjs +49 -2
  50. package/es/src/container/collapse/index.vue.mjs +2 -85
  51. package/es/src/container/collapse/index.vue2.mjs +86 -2
  52. package/es/src/container/index.mjs +8 -5
  53. package/es/src/container/interface.mjs +1 -0
  54. package/es/src/container/scroll-container.vue.mjs +2 -60
  55. package/es/src/container/scroll-container.vue2.mjs +60 -2
  56. package/es/src/count-down/button.vue.mjs +2 -44
  57. package/es/src/count-down/button.vue2.mjs +44 -2
  58. package/es/src/count-down/index.mjs +8 -5
  59. package/es/src/count-down/input.vue.mjs +2 -44
  60. package/es/src/count-down/input.vue2.mjs +45 -2
  61. package/es/src/count-down/interface.mjs +1 -0
  62. package/es/src/cropper/cropper-avatar.vue.mjs +2 -94
  63. package/es/src/cropper/cropper-avatar.vue2.mjs +96 -2
  64. package/es/src/cropper/cropper-image.vue.mjs +2 -129
  65. package/es/src/cropper/cropper-image.vue2.mjs +129 -2
  66. package/es/src/cropper/cropper-modal.vue.mjs +2 -270
  67. package/es/src/cropper/cropper-modal.vue2.mjs +271 -2
  68. package/es/src/cropper/index.mjs +8 -5
  69. package/es/src/cropper/interface.mjs +1 -0
  70. package/es/src/description/description.vue.mjs +2 -169
  71. package/es/src/description/description.vue2.mjs +169 -2
  72. package/es/src/description/index.mjs +8 -5
  73. package/es/src/description/interface.mjs +1 -0
  74. package/es/src/dropdown/dropdown.vue.mjs +2 -92
  75. package/es/src/dropdown/dropdown.vue2.mjs +92 -2
  76. package/es/src/dropdown/index.mjs +5 -3
  77. package/es/src/dropdown/interface.mjs +1 -0
  78. package/es/src/hooks/index.mjs +6 -0
  79. package/es/src/hooks/useMessage.mjs +1 -1
  80. package/es/src/icon/icon.vue.mjs +2 -66
  81. package/es/src/icon/icon.vue2.mjs +67 -2
  82. package/es/src/icon/index.mjs +8 -5
  83. package/es/src/icon/interface.mjs +1 -0
  84. package/es/src/icon/svg-icon.vue.mjs +2 -32
  85. package/es/src/icon/svg-icon.vue2.mjs +32 -2
  86. package/es/src/icon-picker/icon-picker.vue.mjs +2 -166
  87. package/es/src/icon-picker/icon-picker.vue2.mjs +168 -2
  88. package/es/src/icon-picker/index.mjs +7 -5
  89. package/es/src/icon-picker/interface.mjs +1 -0
  90. package/es/src/index.mjs +161 -155
  91. package/es/src/locale/index.mjs +7 -0
  92. package/es/src/locale/interface.mjs +1 -0
  93. package/es/src/modal/basic.vue.mjs +2 -195
  94. package/es/src/modal/basic.vue2.mjs +199 -2
  95. package/es/src/modal/components/modal-close.vue.mjs +2 -72
  96. package/es/src/modal/components/modal-close.vue2.mjs +72 -2
  97. package/es/src/modal/components/modal-footer.vue.mjs +2 -43
  98. package/es/src/modal/components/modal-footer.vue2.mjs +43 -2
  99. package/es/src/modal/components/modal-header.vue.mjs +1 -18
  100. package/es/src/modal/components/modal-header.vue2.mjs +18 -1
  101. package/es/src/modal/components/modal-wrapper.vue.mjs +2 -99
  102. package/es/src/modal/components/modal-wrapper.vue2.mjs +102 -2
  103. package/es/src/modal/components/modal.mjs +6 -6
  104. package/es/src/modal/hooks/use-modal-drag.mjs +1 -1
  105. package/es/src/modal/hooks/use-modal.mjs +8 -8
  106. package/es/src/modal/index.mjs +10 -7
  107. package/es/src/modal/interface.mjs +1 -0
  108. package/es/src/pro-form/component-map.mjs +56 -41
  109. package/es/src/pro-form/components/api-tree-select.vue.mjs +1 -1
  110. package/es/src/pro-form/components/form-action.vue.mjs +2 -105
  111. package/es/src/pro-form/components/form-action.vue2.mjs +105 -2
  112. package/es/src/pro-form/components/form-item.vue.mjs +2 -352
  113. package/es/src/pro-form/components/form-item.vue2.mjs +352 -2
  114. package/es/src/pro-form/components/interface.mjs +1 -0
  115. package/es/src/pro-form/hooks/use-break-point.mjs +21 -20
  116. package/es/src/pro-form/hooks/use-component-register.d.ts +4 -0
  117. package/es/src/pro-form/hooks/use-component-register.mjs +13 -0
  118. package/es/src/pro-form/hooks/use-form-events.mjs +1 -1
  119. package/es/src/pro-form/hooks/use-form-values.mjs +1 -1
  120. package/es/src/pro-form/hooks/use-form.mjs +4 -4
  121. package/es/src/pro-form/index.d.ts +1 -0
  122. package/es/src/pro-form/index.mjs +34 -34
  123. package/es/src/pro-form/pro-form.vue.d.ts +1 -1
  124. package/es/src/pro-form/pro-form.vue.mjs +39 -37
  125. package/es/src/pro-form/types/form-item.mjs +1 -0
  126. package/es/src/pro-form/types/form.d.ts +8 -8
  127. package/es/src/pro-table/component-map.mjs +29 -37
  128. package/es/src/pro-table/components/editable/editable-cell.vue.mjs +2 -378
  129. package/es/src/pro-table/components/editable/editable-cell.vue2.mjs +378 -2
  130. package/es/src/pro-table/components/editable/index.mjs +7 -6
  131. package/es/src/pro-table/components/header-cell.vue.mjs +2 -43
  132. package/es/src/pro-table/components/header-cell.vue2.mjs +44 -2
  133. package/es/src/pro-table/components/settings/column-setting.vue.mjs +2 -307
  134. package/es/src/pro-table/components/settings/column-setting.vue2.mjs +308 -2
  135. package/es/src/pro-table/components/settings/full-screen-setting.vue.mjs +2 -30
  136. package/es/src/pro-table/components/settings/full-screen-setting.vue2.mjs +30 -2
  137. package/es/src/pro-table/components/settings/index.vue.mjs +2 -59
  138. package/es/src/pro-table/components/settings/index.vue2.mjs +63 -2
  139. package/es/src/pro-table/components/settings/redo-setting.vue.mjs +2 -26
  140. package/es/src/pro-table/components/settings/redo-setting.vue2.mjs +26 -2
  141. package/es/src/pro-table/components/settings/size-setting.vue.mjs +2 -71
  142. package/es/src/pro-table/components/settings/size-setting.vue2.mjs +71 -2
  143. package/es/src/pro-table/components/table-action.vue.mjs +2 -2
  144. package/es/src/pro-table/components/table-footer.vue.mjs +2 -61
  145. package/es/src/pro-table/components/table-footer.vue2.mjs +61 -2
  146. package/es/src/pro-table/components/table-header.vue.mjs +2 -86
  147. package/es/src/pro-table/components/table-header.vue2.mjs +89 -2
  148. package/es/src/pro-table/components/table-selection-bar.vue.mjs +2 -40
  149. package/es/src/pro-table/components/table-selection-bar.vue2.mjs +40 -2
  150. package/es/src/pro-table/components/table-title.vue.mjs +2 -41
  151. package/es/src/pro-table/components/table-title.vue2.mjs +41 -2
  152. package/es/src/pro-table/hooks/use-columns.mjs +5 -5
  153. package/es/src/pro-table/hooks/use-data-source.mjs +1 -1
  154. package/es/src/pro-table/hooks/use-pagination.mjs +4 -4
  155. package/es/src/pro-table/hooks/use-scroll-to.mjs +1 -1
  156. package/es/src/pro-table/hooks/use-table-footer.mjs +8 -7
  157. package/es/src/pro-table/hooks/use-table-header.mjs +12 -11
  158. package/es/src/pro-table/index.mjs +12 -0
  159. package/es/src/pro-table/interface.mjs +1 -0
  160. package/es/src/pro-table/pro-table.vue.mjs +55 -56
  161. package/es/src/pro-table/types/pagination.mjs +1 -0
  162. package/es/src/pro-table/types/table-action.mjs +1 -0
  163. package/es/src/pro-table/types/table.mjs +1 -0
  164. package/es/src/prompt/dialog.vue.mjs +2 -61
  165. package/es/src/prompt/dialog.vue2.mjs +58 -2
  166. package/es/src/prompt/index.mjs +9 -8
  167. package/es/src/prompt/utils.d.ts +3 -3
  168. package/es/src/scroll-bar/bar-item.mjs +4 -4
  169. package/es/src/scroll-bar/index.mjs +5 -3
  170. package/es/src/scroll-bar/interface.mjs +1 -0
  171. package/es/src/scroll-bar/scroll-bar.vue.mjs +2 -84
  172. package/es/src/scroll-bar/scroll-bar.vue2.mjs +84 -2
  173. package/es/src/strength-meter/index.mjs +5 -3
  174. package/es/src/strength-meter/interface.mjs +1 -0
  175. package/es/src/strength-meter/strength-meter.vue.mjs +2 -61
  176. package/es/src/strength-meter/strength-meter.vue2.mjs +61 -2
  177. package/es/src/transition/index.mjs +21 -24
  178. package/es/src/type.d.ts +1 -0
  179. package/es/src/utils/index.d.ts +1 -0
  180. package/es/src/utils/index.mjs +21 -8
  181. package/es/src/utils/tree.mjs +103 -13
  182. package/es/src/utils/uuid.mjs +15 -9
  183. package/lib/index.js +1 -1
  184. package/lib/src/ap-action/group/index.vue.js +1 -1
  185. package/lib/src/ap-action/index.js +1 -1
  186. package/lib/src/ap-action/interface.js +1 -0
  187. package/lib/src/ap-action/item/index.vue.js +1 -1
  188. package/lib/src/ap-action/item/index.vue2.js +1 -1
  189. package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
  190. package/lib/src/ap-action/item-modal/index.vue.js +1 -1
  191. package/lib/src/ap-action/item-popconfirm/index.vue.js +1 -1
  192. package/lib/src/ap-field/checkbox/index.vue.js +1 -1
  193. package/lib/src/ap-field/date/index.vue.js +1 -1
  194. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  195. package/lib/src/ap-field/index.d.ts +12 -0
  196. package/lib/src/ap-field/index.js +1 -0
  197. package/lib/src/ap-field/interface.d.ts +3 -2
  198. package/lib/src/ap-field/interface.js +1 -0
  199. package/lib/src/ap-field/number/helper.js +1 -1
  200. package/lib/src/ap-field/number/index.vue.js +1 -1
  201. package/lib/src/ap-field/radio/index.vue.js +1 -1
  202. package/lib/src/ap-field/select/index.vue.js +1 -1
  203. package/lib/src/ap-field/switch/index.vue.js +1 -1
  204. package/lib/src/ap-field/text/index.vue.js +1 -1
  205. package/lib/src/ap-field/text-area/index.vue.js +1 -1
  206. package/lib/src/ap-form/ap-form-item-group/index.vue.js +1 -1
  207. package/lib/src/ap-form/ap-form-item-group/index.vue2.js +1 -1
  208. package/lib/src/ap-form/ap-form-item.vue.js +1 -1
  209. package/lib/src/ap-form/ap-form-item.vue2.js +1 -1
  210. package/lib/src/ap-form/components/interface.d.ts +0 -0
  211. package/lib/src/ap-form/index.d.ts +11 -1682
  212. package/lib/src/ap-form/index.js +1 -1
  213. package/lib/src/base-button/button.vue.js +1 -1
  214. package/lib/src/base-button/button.vue2.js +1 -1
  215. package/lib/src/base-button/index.js +1 -1
  216. package/lib/src/base-button/interface.js +1 -0
  217. package/lib/src/base-button/modal-button.vue.js +1 -1
  218. package/lib/src/base-button/pop-confirm-button.vue.js +1 -1
  219. package/lib/src/basic/arrow.vue.js +1 -1
  220. package/lib/src/basic/arrow.vue2.js +1 -1
  221. package/lib/src/basic/help.vue.js +1 -1
  222. package/lib/src/basic/help.vue2.js +1 -1
  223. package/lib/src/basic/index.js +1 -1
  224. package/lib/src/basic/interface.js +1 -0
  225. package/lib/src/basic/title.vue.js +1 -1
  226. package/lib/src/basic/title.vue2.js +1 -1
  227. package/lib/src/config-provider/hooks/use-locale.js +1 -1
  228. package/lib/src/config-provider/index.js +1 -1
  229. package/lib/src/container/collapse/header.vue.js +1 -1
  230. package/lib/src/container/collapse/header.vue2.js +1 -1
  231. package/lib/src/container/collapse/index.vue.js +1 -1
  232. package/lib/src/container/collapse/index.vue2.js +1 -1
  233. package/lib/src/container/index.js +1 -1
  234. package/lib/src/container/interface.js +1 -0
  235. package/lib/src/container/scroll-container.vue.js +1 -1
  236. package/lib/src/container/scroll-container.vue2.js +1 -1
  237. package/lib/src/count-down/button.vue.js +1 -1
  238. package/lib/src/count-down/button.vue2.js +1 -1
  239. package/lib/src/count-down/index.js +1 -1
  240. package/lib/src/count-down/input.vue.js +1 -1
  241. package/lib/src/count-down/input.vue2.js +1 -1
  242. package/lib/src/count-down/interface.js +1 -0
  243. package/lib/src/cropper/cropper-avatar.vue.js +1 -1
  244. package/lib/src/cropper/cropper-avatar.vue2.js +1 -1
  245. package/lib/src/cropper/cropper-image.vue.js +1 -1
  246. package/lib/src/cropper/cropper-image.vue2.js +1 -1
  247. package/lib/src/cropper/cropper-modal.vue.js +1 -1
  248. package/lib/src/cropper/cropper-modal.vue2.js +1 -1
  249. package/lib/src/cropper/index.js +1 -1
  250. package/lib/src/cropper/interface.js +1 -0
  251. package/lib/src/description/description.vue.js +1 -1
  252. package/lib/src/description/description.vue2.js +1 -1
  253. package/lib/src/description/index.js +1 -1
  254. package/lib/src/description/interface.js +1 -0
  255. package/lib/src/dropdown/dropdown.vue.js +1 -1
  256. package/lib/src/dropdown/dropdown.vue2.js +1 -1
  257. package/lib/src/dropdown/index.js +1 -1
  258. package/lib/src/dropdown/interface.js +1 -0
  259. package/lib/src/hooks/index.js +1 -0
  260. package/lib/src/icon/icon.vue.js +1 -1
  261. package/lib/src/icon/icon.vue2.js +1 -1
  262. package/lib/src/icon/index.js +1 -1
  263. package/lib/src/icon/interface.js +1 -0
  264. package/lib/src/icon/svg-icon.vue.js +1 -1
  265. package/lib/src/icon/svg-icon.vue2.js +1 -1
  266. package/lib/src/icon-picker/icon-picker.vue.js +1 -1
  267. package/lib/src/icon-picker/icon-picker.vue2.js +1 -1
  268. package/lib/src/icon-picker/index.js +1 -1
  269. package/lib/src/icon-picker/interface.js +1 -0
  270. package/lib/src/index.js +1 -1
  271. package/lib/src/locale/index.js +1 -0
  272. package/lib/src/locale/interface.js +1 -0
  273. package/lib/src/modal/basic.vue.js +1 -1
  274. package/lib/src/modal/basic.vue2.js +1 -1
  275. package/lib/src/modal/components/modal-close.vue.js +1 -1
  276. package/lib/src/modal/components/modal-close.vue2.js +1 -1
  277. package/lib/src/modal/components/modal-footer.vue.js +1 -1
  278. package/lib/src/modal/components/modal-footer.vue2.js +1 -1
  279. package/lib/src/modal/components/modal-header.vue.js +1 -1
  280. package/lib/src/modal/components/modal-header.vue2.js +1 -1
  281. package/lib/src/modal/components/modal-wrapper.vue.js +1 -1
  282. package/lib/src/modal/components/modal-wrapper.vue2.js +1 -1
  283. package/lib/src/modal/index.js +1 -1
  284. package/lib/src/modal/interface.js +1 -0
  285. package/lib/src/pro-form/component-map.js +1 -1
  286. package/lib/src/pro-form/components/form-action.vue.js +1 -1
  287. package/lib/src/pro-form/components/form-action.vue2.js +1 -1
  288. package/lib/src/pro-form/components/form-item.vue.js +1 -1
  289. package/lib/src/pro-form/components/form-item.vue2.js +1 -1
  290. package/lib/src/pro-form/components/interface.js +1 -0
  291. package/lib/src/pro-form/hooks/use-break-point.js +1 -1
  292. package/lib/src/pro-form/hooks/use-component-register.d.ts +4 -0
  293. package/lib/src/pro-form/hooks/use-component-register.js +1 -0
  294. package/lib/src/pro-form/index.d.ts +1 -0
  295. package/lib/src/pro-form/index.js +1 -1
  296. package/lib/src/pro-form/pro-form.vue.d.ts +1 -1
  297. package/lib/src/pro-form/pro-form.vue.js +1 -1
  298. package/lib/src/pro-form/types/form-item.js +1 -0
  299. package/lib/src/pro-form/types/form.d.ts +8 -8
  300. package/lib/src/pro-table/component-map.js +1 -1
  301. package/lib/src/pro-table/components/editable/editable-cell.vue.js +1 -1
  302. package/lib/src/pro-table/components/editable/editable-cell.vue2.js +1 -1
  303. package/lib/src/pro-table/components/editable/index.js +1 -1
  304. package/lib/src/pro-table/components/header-cell.vue.js +1 -1
  305. package/lib/src/pro-table/components/header-cell.vue2.js +1 -1
  306. package/lib/src/pro-table/components/settings/column-setting.vue.js +1 -1
  307. package/lib/src/pro-table/components/settings/column-setting.vue2.js +1 -1
  308. package/lib/src/pro-table/components/settings/full-screen-setting.vue.js +1 -1
  309. package/lib/src/pro-table/components/settings/full-screen-setting.vue2.js +1 -1
  310. package/lib/src/pro-table/components/settings/index.vue.js +1 -1
  311. package/lib/src/pro-table/components/settings/index.vue2.js +1 -1
  312. package/lib/src/pro-table/components/settings/redo-setting.vue.js +1 -1
  313. package/lib/src/pro-table/components/settings/redo-setting.vue2.js +1 -1
  314. package/lib/src/pro-table/components/settings/size-setting.vue.js +1 -1
  315. package/lib/src/pro-table/components/settings/size-setting.vue2.js +1 -1
  316. package/lib/src/pro-table/components/table-action.vue.js +1 -1
  317. package/lib/src/pro-table/components/table-footer.vue.js +1 -1
  318. package/lib/src/pro-table/components/table-footer.vue2.js +1 -1
  319. package/lib/src/pro-table/components/table-header.vue.js +1 -1
  320. package/lib/src/pro-table/components/table-header.vue2.js +1 -1
  321. package/lib/src/pro-table/components/table-selection-bar.vue.js +1 -1
  322. package/lib/src/pro-table/components/table-selection-bar.vue2.js +1 -1
  323. package/lib/src/pro-table/components/table-title.vue.js +1 -1
  324. package/lib/src/pro-table/components/table-title.vue2.js +1 -1
  325. package/lib/src/pro-table/hooks/use-table-footer.js +1 -1
  326. package/lib/src/pro-table/hooks/use-table-header.js +1 -1
  327. package/lib/src/pro-table/index.js +1 -0
  328. package/lib/src/pro-table/interface.js +1 -0
  329. package/lib/src/pro-table/pro-table.vue.js +1 -1
  330. package/lib/src/pro-table/types/pagination.js +1 -0
  331. package/lib/src/pro-table/types/table-action.js +1 -0
  332. package/lib/src/pro-table/types/table.js +1 -0
  333. package/lib/src/prompt/dialog.vue.js +1 -1
  334. package/lib/src/prompt/dialog.vue2.js +1 -1
  335. package/lib/src/prompt/index.js +1 -1
  336. package/lib/src/prompt/utils.d.ts +3 -3
  337. package/lib/src/scroll-bar/index.js +1 -1
  338. package/lib/src/scroll-bar/interface.js +1 -0
  339. package/lib/src/scroll-bar/scroll-bar.vue.js +1 -1
  340. package/lib/src/scroll-bar/scroll-bar.vue2.js +1 -1
  341. package/lib/src/strength-meter/index.js +1 -1
  342. package/lib/src/strength-meter/interface.js +1 -0
  343. package/lib/src/strength-meter/strength-meter.vue.js +1 -1
  344. package/lib/src/strength-meter/strength-meter.vue2.js +1 -1
  345. package/lib/src/transition/index.js +1 -1
  346. package/lib/src/type.d.ts +1 -0
  347. package/lib/src/utils/index.d.ts +1 -0
  348. package/lib/src/utils/index.js +1 -1
  349. package/lib/src/utils/tree.js +1 -1
  350. package/lib/src/utils/uuid.js +1 -1
  351. package/package.json +3 -3
@@ -1,8 +1,9 @@
1
- import { defineComponent as i, openBlock as c, createBlock as m, mergeProps as d, unref as f } from "vue";
2
- import { Modal as p } from "ant-design-vue";
3
- import s from "../item/index.vue.mjs";
4
- import { omit as u } from "lodash-unified";
5
- const B = /* @__PURE__ */ i({
1
+ import { defineComponent as i, openBlock as m, createBlock as c, mergeProps as p, unref as d } from "vue";
2
+ import { Modal as f } from "ant-design-vue";
3
+ import "../item/index.vue.mjs";
4
+ import { omit as s } from "lodash-unified";
5
+ import u from "../item/index.vue2.mjs";
6
+ const P = /* @__PURE__ */ i({
6
7
  name: "ApActionItemModal",
7
8
  __name: "index",
8
9
  props: {
@@ -18,7 +19,7 @@ const B = /* @__PURE__ */ i({
18
19
  setup(l) {
19
20
  const o = l;
20
21
  async function r(e) {
21
- p.confirm({
22
+ f.confirm({
22
23
  ...o.modalProps,
23
24
  onOk: async () => {
24
25
  var n, t, a;
@@ -26,9 +27,9 @@ const B = /* @__PURE__ */ i({
26
27
  }
27
28
  });
28
29
  }
29
- return (e, n) => (c(), m(s, d(f(u)(o, ["modalProps", "onAction"]), { onAction: r }), null, 16));
30
+ return (e, n) => (m(), c(u, p(d(s)(o, ["modalProps", "onAction"]), { onAction: r }), null, 16));
30
31
  }
31
32
  });
32
33
  export {
33
- B as default
34
+ P as default
34
35
  };
@@ -1,8 +1,9 @@
1
- import { defineComponent as f, openBlock as m, createBlock as c, unref as i, mergeProps as l, withCtx as s, createVNode as d, normalizeProps as u, guardReactiveProps as P } from "vue";
1
+ import { defineComponent as m, openBlock as f, createBlock as c, unref as i, mergeProps as l, withCtx as s, createVNode as d, normalizeProps as u, guardReactiveProps as P } from "vue";
2
2
  import { Popconfirm as _ } from "ant-design-vue";
3
- import C from "../item/index.vue.mjs";
4
- import { omit as x } from "lodash-unified";
5
- const g = /* @__PURE__ */ f({
3
+ import "../item/index.vue.mjs";
4
+ import { omit as y } from "lodash-unified";
5
+ import x from "../item/index.vue2.mjs";
6
+ const h = /* @__PURE__ */ m({
6
7
  name: "ApActionItemPopconfirm",
7
8
  __name: "index",
8
9
  props: {
@@ -21,17 +22,18 @@ const g = /* @__PURE__ */ f({
21
22
  var n, r, t;
22
23
  (r = (n = o.popconfirmProps).onConfirm) == null || r.call(n, e), await ((t = o.onAction) == null ? void 0 : t.call(o, e));
23
24
  }
24
- return (e, n) => (m(), c(i(_), l(o.popconfirmProps, {
25
+ return (e, n) => (f(), c(i(_), l(o.popconfirmProps, {
25
26
  onConfirm: a,
26
- disabled: !o.popconfirmProps
27
+ disabled: !o.popconfirmProps,
28
+ "overlay-style": { zIndex: 1060 }
27
29
  }), {
28
30
  default: s(() => [
29
- d(C, u(P(i(x)(o, ["popconfirmProps", "onAction"]))), null, 16)
31
+ d(x, u(P(i(y)(o, ["popconfirmProps", "onAction"]))), null, 16)
30
32
  ]),
31
33
  _: 1
32
34
  }, 16, ["disabled"]));
33
35
  }
34
36
  });
35
37
  export {
36
- g as default
38
+ h as default
37
39
  };
@@ -1,10 +1,10 @@
1
- import { defineComponent as x, ref as k, onMounted as y, openBlock as o, createElementBlock as i, Fragment as p, unref as e, createTextVNode as m, toDisplayString as s, createBlock as g, mergeProps as h } from "vue";
2
- import { isFunction as C, isNil as V } from "lodash-unified";
3
- import { CheckboxGroup as b } from "ant-design-vue";
4
- import "../../hooks/useMessage.mjs";
5
- import { useControllableValue as _ } from "../../hooks/useControllableValue.mjs";
6
- import { getOptionValue as B, getOptionLabel as T } from "./helper.mjs";
7
- const D = /* @__PURE__ */ x({
1
+ import { defineComponent as g, ref as m, onMounted as h, openBlock as o, createElementBlock as a, Fragment as l, unref as e, createTextVNode as d, toDisplayString as f, createBlock as c, mergeProps as C } from "vue";
2
+ import { isFunction as V, isNil as b } from "lodash-unified";
3
+ import { Spin as _, CheckboxGroup as B } from "ant-design-vue";
4
+ import "../../hooks/index.mjs";
5
+ import { getOptionValue as T, getOptionLabel as q } from "./helper.mjs";
6
+ import { useControllableValue as F } from "../../hooks/useControllableValue.mjs";
7
+ const D = /* @__PURE__ */ g({
8
8
  name: "ApFieldCheckbox",
9
9
  inheritAttrs: !1,
10
10
  __name: "index",
@@ -23,31 +23,38 @@ const D = /* @__PURE__ */ x({
23
23
  request: {}
24
24
  },
25
25
  emits: ["update:value"],
26
- setup(d, { emit: f }) {
27
- const c = f, t = d, a = k(t.options);
28
- y(() => {
29
- C(t.request) && t.request().then((l) => a.value = l);
26
+ setup(v, { emit: y }) {
27
+ const k = y, t = v, n = m(t.options), i = m(!1);
28
+ h(() => {
29
+ V(t.request) && (i.value = !0, t.request().then((r) => n.value = r).finally(() => {
30
+ i.value = !1;
31
+ }));
30
32
  });
31
- const { value: n, updateValue: v } = _(
33
+ const { value: u, updateValue: x } = F(
32
34
  t,
33
- c,
35
+ k,
34
36
  {
35
37
  defaultValue: []
36
38
  }
37
39
  );
38
- return (l, q) => {
39
- var u;
40
- return l.mode === "read" ? (o(), i(p, { key: 0 }, [
41
- e(V)(e(n)) ? (o(), i(p, { key: 0 }, [
42
- m(s(t.emptyText), 1)
43
- ], 64)) : (o(), i(p, { key: 1 }, [
44
- m(s(((u = a.value) == null ? void 0 : u.filter((r) => e(n).indexOf(e(B)(r)) > -1).map((r) => e(T)(r)).join("、")) || t.emptyText), 1)
40
+ return (r, O) => {
41
+ var s;
42
+ return r.mode === "read" ? (o(), a(l, { key: 0 }, [
43
+ e(b)(e(u)) ? (o(), a(l, { key: 0 }, [
44
+ d(f(t.emptyText), 1)
45
+ ], 64)) : (o(), a(l, { key: 1 }, [
46
+ d(f(((s = n.value) == null ? void 0 : s.filter((p) => e(u).indexOf(e(T)(p)) > -1).map((p) => e(q)(p)).join("、")) || t.emptyText), 1)
45
47
  ], 64))
46
- ], 64)) : (o(), g(e(b), h({ key: 1 }, t, {
47
- options: a.value,
48
- value: e(n),
49
- "onUpdate:value": e(v)
50
- }), null, 16, ["options", "value", "onUpdate:value"]));
48
+ ], 64)) : (o(), a(l, { key: 1 }, [
49
+ i.value ? (o(), c(e(_), {
50
+ key: 0,
51
+ size: "small"
52
+ })) : (o(), c(e(B), C({ key: 1 }, t, {
53
+ options: n.value,
54
+ value: e(u),
55
+ "onUpdate:value": e(x)
56
+ }), null, 16, ["options", "value", "onUpdate:value"]))
57
+ ], 64));
51
58
  };
52
59
  }
53
60
  });
@@ -2,13 +2,12 @@ import { defineComponent as C, computed as s, unref as o, openBlock as p, create
2
2
  import i from "dayjs";
3
3
  import { DatePicker as U } from "ant-design-vue";
4
4
  import { ApFieldDatePresetFormats as $, PRESET_FORMAT_MAP as b, PRESET_FORMAT_PICK_MAP as w, PRESET_FORMAT_TIME_MAP as z } from "./constant.mjs";
5
- import "../../hooks/useMessage.mjs";
6
- import { useControllableValue as K } from "../../hooks/useControllableValue.mjs";
5
+ import "../../hooks/index.mjs";
7
6
  import { isNil as P } from "lodash-unified";
8
7
  import { formatDay as d } from "./helper.mjs";
8
+ import { useControllableValue as K } from "../../hooks/useControllableValue.mjs";
9
9
  const X = /* @__PURE__ */ C({
10
10
  name: "ApFieldDate",
11
- inheritAttrs: !1,
12
11
  __name: "index",
13
12
  props: {
14
13
  mode: { default: "edit" },
@@ -26,45 +25,45 @@ const X = /* @__PURE__ */ C({
26
25
  () => $.indexOf(e.format) > -1
27
26
  ), l = s(
28
27
  () => n.value ? b[e.format] : e.format
29
- ), O = s(() => P(o(u)) ? void 0 : i(o(u))), g = s(() => o(n) ? e.fieldProps.picker ?? w[e.format] : e.fieldProps.picker), h = s(() => {
28
+ ), O = s(() => P(o(u)) ? void 0 : i(o(u))), g = s(() => o(n) ? e.fieldProps.picker ?? w[e.format] : e.fieldProps.picker), y = s(() => {
30
29
  const t = o(n) ? z[e.format] : {};
31
30
  return {
32
31
  ...e.fieldProps,
33
32
  ...t
34
33
  };
35
34
  });
36
- function y(t) {
35
+ function T(t) {
37
36
  if (P(t)) {
38
37
  c(null);
39
38
  return;
40
39
  }
41
- const r = i(t);
42
- o(n) ? c(d(r, o(l))) : c(r.valueOf());
40
+ const a = i(t);
41
+ o(n) ? c(d(a, o(l))) : c(a.valueOf());
43
42
  }
44
- function T(t, r) {
43
+ function h(t, a) {
45
44
  var f;
46
- const m = i(t), a = o(n) ? d(m, o(l)) : t ? m.valueOf() : null;
47
- (f = e.onChange) == null || f.call(e, a, r);
45
+ const m = i(t), r = o(n) ? d(m, o(l)) : t ? m.valueOf() : null;
46
+ (f = e.onChange) == null || f.call(e, r, a);
48
47
  }
49
48
  function A(t) {
50
- var a;
51
- const r = i(t), m = o(n) ? d(r, o(l)) : t ? r.valueOf() : null;
52
- (a = e.onOk) == null || a.call(e, m);
49
+ var r;
50
+ const a = i(t), m = o(n) ? d(a, o(l)) : t ? a.valueOf() : null;
51
+ (r = e.onOk) == null || r.call(e, m);
53
52
  }
54
- return (t, r) => t.mode === "read" ? (p(), E(F, { key: 0 }, [
53
+ return (t, a) => t.mode === "read" ? (p(), E(F, { key: 0 }, [
55
54
  R(M(o(u) ? o(i)(o(u)).format(l.value) : t.emptyText), 1)
56
- ], 64)) : (p(), D(o(U), S({ key: 1 }, h.value, {
55
+ ], 64)) : (p(), D(o(U), S({ key: 1 }, y.value, {
57
56
  value: O.value,
58
57
  format: l.value,
59
- "onUpdate:value": y,
60
- onChange: T,
58
+ "onUpdate:value": T,
59
+ onChange: h,
61
60
  onOk: A,
62
61
  picker: g.value
63
62
  }), V({ _: 2 }, [
64
- x(t.$slots, (m, a) => ({
65
- name: a,
63
+ x(t.$slots, (m, r) => ({
64
+ name: r,
66
65
  fn: j((f) => [
67
- B(t.$slots, a, I(N(f || {})))
66
+ B(t.$slots, r, I(N(f || {})))
68
67
  ])
69
68
  }))
70
69
  ]), 1040, ["value", "format", "picker"]));
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as V, computed as m, unref as t, openBlock as p, createElementBlock as k, Fragment as _, createTextVNode as T, toDisplayString as O, createVNode as C, createBlock as x, mergeProps as B, createSlots as N, renderList as w, withCtx as I, renderSlot as U, normalizeProps as $, guardReactiveProps as b } from "vue";
2
2
  import { ApFieldDatePresetFormats as j, PRESET_FORMAT_MAP as z, PRESET_FORMAT_PICK_MAP as K, PRESET_FORMAT_TIME_MAP as L } from "../date/constant.mjs";
3
- import "../../hooks/useMessage.mjs";
4
- import { useControllableValue as Y } from "../../hooks/useControllableValue.mjs";
5
- import { isNil as q, isString as c } from "lodash-unified";
3
+ import "../../hooks/index.mjs";
4
+ import { isNil as Y, isString as c } from "lodash-unified";
6
5
  import u from "dayjs";
7
- import { DatePicker as G } from "ant-design-vue";
6
+ import { DatePicker as q } from "ant-design-vue";
8
7
  import { formatDay as d, formatValue as R } from "../date/helper.mjs";
9
- import { SwapRightOutlined as H } from "@ant-design/icons-vue";
8
+ import { SwapRightOutlined as G } from "@ant-design/icons-vue";
9
+ import { useControllableValue as H } from "../../hooks/useControllableValue.mjs";
10
10
  const ae = /* @__PURE__ */ V({
11
11
  __name: "index",
12
12
  props: {
@@ -25,12 +25,12 @@ const ae = /* @__PURE__ */ V({
25
25
  () => j.indexOf(o.format) > -1
26
26
  ), n = m(
27
27
  () => l.value ? z[o.format] : o.format
28
- ), { value: P, updateValue: v } = Y(
28
+ ), { value: P, updateValue: v } = H(
29
29
  o,
30
30
  E
31
31
  ), s = m(() => {
32
32
  var e, r;
33
- if (!q(t(P)))
33
+ if (!Y(t(P)))
34
34
  return [
35
35
  u((e = t(P)) == null ? void 0 : e[0]),
36
36
  u((r = t(P)) == null ? void 0 : r[1])
@@ -60,12 +60,12 @@ const ae = /* @__PURE__ */ V({
60
60
  return e.mode === "read" ? (p(), k(_, { key: 0 }, [
61
61
  s.value ? (p(), k(_, { key: 0 }, [
62
62
  T(O((a = s.value[0]) == null ? void 0 : a.format(n.value)) + " ", 1),
63
- C(t(H)),
63
+ C(t(G)),
64
64
  T(" " + O((f = s.value[1]) == null ? void 0 : f.format(n.value)), 1)
65
65
  ], 64)) : (p(), k(_, { key: 1 }, [
66
66
  T(O(e.emptyText), 1)
67
67
  ], 64))
68
- ], 64)) : (p(), x(t(G).RangePicker, B({ key: 1 }, A.value, {
68
+ ], 64)) : (p(), x(t(q).RangePicker, B({ key: 1 }, A.value, {
69
69
  value: s.value,
70
70
  "onUpdate:value": F,
71
71
  picker: S.value,
@@ -8,5 +8,17 @@ import { default as ApFieldTextArea } from './text-area/index.vue';
8
8
  import { default as ApFieldDateRange } from './date-range/index.vue';
9
9
  import { default as ApFieldSelect } from './select/index.vue';
10
10
 
11
+ export type FieldType = {
12
+ Text: typeof ApFieldText;
13
+ TextArea: typeof ApFieldTextArea;
14
+ Number: typeof ApFieldNumber;
15
+ Date: typeof ApFieldDate;
16
+ DateRange: typeof ApFieldDateRange;
17
+ Radio: typeof ApFieldRadio;
18
+ Checkbox: typeof ApFieldCheckbox;
19
+ Select: typeof ApFieldSelect;
20
+ Switch: typeof ApFieldSwitch;
21
+ };
22
+ export declare const ApField: FieldType;
11
23
  export * from './interface';
12
24
  export { ApFieldText, ApFieldCheckbox, ApFieldDate, ApFieldNumber, ApFieldRadio, ApFieldSwitch, ApFieldTextArea, ApFieldDateRange, ApFieldSelect };
@@ -0,0 +1,42 @@
1
+ import "./text/index.vue2.mjs";
2
+ import "./checkbox/index.vue2.mjs";
3
+ import "./date/index.vue2.mjs";
4
+ import "./number/index.vue2.mjs";
5
+ import "./radio/index.vue2.mjs";
6
+ import "./switch/index.vue2.mjs";
7
+ import "./text-area/index.vue2.mjs";
8
+ import "./date-range/index.vue2.mjs";
9
+ import "./select/index.vue2.mjs";
10
+ import "./interface.mjs";
11
+ import i from "./text/index.vue.mjs";
12
+ import m from "./text-area/index.vue.mjs";
13
+ import o from "./number/index.vue.mjs";
14
+ import r from "./date/index.vue.mjs";
15
+ import t from "./date-range/index.vue.mjs";
16
+ import e from "./radio/index.vue.mjs";
17
+ import p from "./checkbox/index.vue.mjs";
18
+ import a from "./select/index.vue.mjs";
19
+ import s from "./switch/index.vue.mjs";
20
+ const w = {
21
+ Text: i,
22
+ TextArea: m,
23
+ Number: o,
24
+ Date: r,
25
+ DateRange: t,
26
+ Radio: e,
27
+ Checkbox: p,
28
+ Select: a,
29
+ Switch: s
30
+ };
31
+ export {
32
+ w as ApField,
33
+ p as ApFieldCheckbox,
34
+ r as ApFieldDate,
35
+ t as ApFieldDateRange,
36
+ o as ApFieldNumber,
37
+ e as ApFieldRadio,
38
+ a as ApFieldSelect,
39
+ s as ApFieldSwitch,
40
+ i as ApFieldText,
41
+ m as ApFieldTextArea
42
+ };
@@ -3,6 +3,7 @@ import { InputFocusOptions } from 'ant-design-vue/es/vc-input/utils/commonUtils'
3
3
  import { ApFormatPresetType } from './date/interface';
4
4
  import { RangeValue } from 'ant-design-vue/es/vc-picker/interface';
5
5
  import { RangePickerProps } from 'ant-design-vue/es/date-picker/dayjs';
6
+ import { LiteralUnion } from '../type';
6
7
 
7
8
  export type FieldMode = 'read' | 'edit';
8
9
  export type BasicApFieldProps<FieldPropsType = any> = {
@@ -32,7 +33,7 @@ export type ApFieldDateProps = ApFieldComposedProps<Omit<DatePickerProps, 'mode'
32
33
  defaultValue?: number;
33
34
  onChange?: (ts: number | null, dayStr: string) => void;
34
35
  onOk?: (ts: number | null) => void;
35
- format?: ApFormatPresetType | string;
36
+ format?: LiteralUnion<ApFormatPresetType, string>;
36
37
  };
37
38
  export type ApFieldNumberProps = BasicApFieldProps<InputNumberProps> & {
38
39
  emptyText?: string;
@@ -76,7 +77,7 @@ export type ApFieldDateRangeProps = ApFieldComposedProps<Omit<RangePickerProps,
76
77
  defaultValue?: RangeValue<number>;
77
78
  onChange?: (ts: RangeValue<number>, dayStr: string) => void;
78
79
  onOk?: (ts: RangeValue<number>) => void;
79
- format?: ApFormatPresetType | string;
80
+ format?: LiteralUnion<ApFormatPresetType, string>;
80
81
  };
81
82
  export type ApFieldSelectProps = ApFieldComposedProps<Omit<SelectProps, 'mode' | 'value' | 'onUpdate:value' | 'onSearch'>> & {
82
83
  emptyText?: string;
@@ -0,0 +1 @@
1
+
@@ -2,8 +2,8 @@ import { isNil as i } from "lodash-unified";
2
2
  function a(t, r) {
3
3
  if (i(r))
4
4
  return t;
5
- let [f, e] = t.split(".");
6
- if (!e || e.length >= r)
5
+ let [f, e = ""] = t.split(".");
6
+ if (e.length >= r)
7
7
  return t;
8
8
  for (let l = e.length; l < r; l++)
9
9
  e += "0";
@@ -1,16 +1,15 @@
1
- import { defineComponent as C, ref as S, computed as N, unref as o, openBlock as r, createElementBlock as n, Fragment as V, normalizeClass as m, renderSlot as i, createCommentVNode as d, createElementVNode as $, toDisplayString as x, createBlock as A, mergeProps as D, createSlots as P, renderList as R, withCtx as I, normalizeProps as z, guardReactiveProps as E } from "vue";
1
+ import { defineComponent as h, ref as C, computed as x, unref as o, openBlock as r, createElementBlock as n, Fragment as N, normalizeClass as d, renderSlot as s, createCommentVNode as m, createElementVNode as V, toDisplayString as $, createBlock as D, mergeProps as P, createSlots as R, renderList as A, withCtx as I, normalizeProps as z, guardReactiveProps as E } from "vue";
2
2
  import { InputNumber as F } from "ant-design-vue";
3
- import "../../hooks/useMessage.mjs";
4
- import { useControllableValue as M } from "../../hooks/useControllableValue.mjs";
5
- import { isNil as T, omit as U } from "lodash-unified";
6
- import { toDecimalMark as w } from "@fruits-chain/utils";
7
- import { addZeroToDecimalPlaces as L } from "./helper.mjs";
3
+ import "../../hooks/index.mjs";
4
+ import { isNil as M, omit as T } from "lodash-unified";
5
+ import { toDecimalMark as U } from "@fruits-chain/utils";
6
+ import { addZeroToDecimalPlaces as _ } from "./helper.mjs";
8
7
  import "../../config-provider/index.mjs";
9
8
  import "./style.css";
10
- import { useNamespace as Z } from "../../config-provider/hooks/use-namespace.mjs";
11
- const Y = /* @__PURE__ */ C({
9
+ import { useNamespace as w } from "../../config-provider/hooks/use-namespace.mjs";
10
+ import { useControllableValue as L } from "../../hooks/useControllableValue.mjs";
11
+ const Y = /* @__PURE__ */ h({
12
12
  name: "ApFieldNumber",
13
- inheritAttrs: !1,
14
13
  __name: "index",
15
14
  props: {
16
15
  mode: {},
@@ -55,15 +54,15 @@ const Y = /* @__PURE__ */ C({
55
54
  },
56
55
  emits: ["update:value"],
57
56
  setup(f, { expose: c, emit: y }) {
58
- const v = y, { b: s } = Z("field-number"), t = f, l = S(), { value: p, updateValue: B } = M(
57
+ const v = y, { b: i } = w("field-number"), t = f, l = C(), { value: u, updateValue: B } = L(
59
58
  t,
60
59
  v
61
- ), b = N(() => {
62
- let e = o(p);
63
- if (T(e))
60
+ ), b = x(() => {
61
+ let e = o(u);
62
+ if (M(e))
64
63
  return t.emptyText;
65
- let a = w(e, t.precision);
66
- return t.precision && t.limitDecimalsRetain && (a = L(a, t.precision)), a;
64
+ let a = t.thousands ? U(e, t.precision) : String(e);
65
+ return t.precision && t.limitDecimalsRetain && (a = _(a, t.precision)), a;
67
66
  });
68
67
  function k() {
69
68
  var e;
@@ -73,34 +72,33 @@ const Y = /* @__PURE__ */ C({
73
72
  var e;
74
73
  (e = l.value) == null || e.blur();
75
74
  }
76
- return c({ focus: k, blur: g }), (e, a) => e.mode === "read" ? (r(), n(V, { key: 0 }, [
75
+ return c({ focus: k, blur: g }), (e, a) => e.mode === "read" ? (r(), n(N, { key: 0 }, [
77
76
  e.$slots.prefix ? (r(), n("span", {
78
77
  key: 0,
79
- class: m(o(s)("label-left"))
78
+ class: d(o(i)("label-left"))
80
79
  }, [
81
- i(e.$slots, "prefix")
82
- ], 2)) : d("", !0),
83
- $("span", null, x(b.value), 1),
80
+ s(e.$slots, "prefix")
81
+ ], 2)) : m("", !0),
82
+ V("span", null, $(b.value), 1),
84
83
  e.$slots.addonAfter ? (r(), n("span", {
85
84
  key: 1,
86
- class: m(o(s)("label-right"))
85
+ class: d(o(i)("label-right"))
87
86
  }, [
88
- i(e.$slots, "addonAfter")
89
- ], 2)) : d("", !0)
90
- ], 64)) : (r(), A(o(F), D({ key: 1 }, o(U)(t, ["precision", "value", "update:value"]), {
91
- value: o(p),
87
+ s(e.$slots, "addonAfter")
88
+ ], 2)) : m("", !0)
89
+ ], 64)) : (r(), D(o(F), P({ key: 1 }, o(T)(t, ["value", "update:value"]), {
90
+ value: o(u),
92
91
  "onUpdate:value": o(B),
93
- precision: e.precision,
94
92
  ref_key: "inputRef",
95
93
  ref: l
96
- }), P({ _: 2 }, [
97
- R(e.$slots, (_, u) => ({
98
- name: u,
99
- fn: I((h) => [
100
- i(e.$slots, u, z(E(h || {})))
94
+ }), R({ _: 2 }, [
95
+ A(e.$slots, (Z, p) => ({
96
+ name: p,
97
+ fn: I((S) => [
98
+ s(e.$slots, p, z(E(S || {})))
101
99
  ])
102
100
  }))
103
- ]), 1040, ["value", "onUpdate:value", "precision"]));
101
+ ]), 1040, ["value", "onUpdate:value"]));
104
102
  }
105
103
  });
106
104
  export {
@@ -1,12 +1,11 @@
1
- import { defineComponent as b, ref as i, onMounted as k, computed as T, unref as o, openBlock as p, createElementBlock as _, Fragment as V, createTextVNode as h, toDisplayString as B, createBlock as C, mergeProps as R } from "vue";
2
- import { RadioGroup as G } from "ant-design-vue";
3
- import "../../hooks/useMessage.mjs";
4
- import { useControllableValue as U } from "../../hooks/useControllableValue.mjs";
5
- import { isNil as q, omit as A } from "lodash-unified";
1
+ import { defineComponent as V, ref as i, onMounted as q, computed as B, unref as o, openBlock as n, createElementBlock as m, Fragment as d, createTextVNode as C, toDisplayString as R, createBlock as f, mergeProps as h } from "vue";
2
+ import { Spin as G, RadioGroup as S } from "ant-design-vue";
3
+ import "../../hooks/index.mjs";
4
+ import { isNil as U, omit as z } from "lodash-unified";
6
5
  import { getOptionValue as F, getOptionLabel as N } from "./helper.mjs";
7
- const M = /* @__PURE__ */ b({
6
+ import { useControllableValue as O } from "../../hooks/useControllableValue.mjs";
7
+ const j = /* @__PURE__ */ V({
8
8
  name: "ApFieldRadio",
9
- inheritAttrs: !1,
10
9
  __name: "index",
11
10
  props: {
12
11
  mode: { default: "edit" },
@@ -25,44 +24,51 @@ const M = /* @__PURE__ */ b({
25
24
  request: {}
26
25
  },
27
26
  emits: ["update:value"],
28
- setup(s, { expose: m, emit: d }) {
29
- const t = s, f = d, n = i(), u = i((t == null ? void 0 : t.options) || []), { value: l, updateValue: c } = U(t, f);
30
- k(() => {
27
+ setup(c, { expose: v, emit: y }) {
28
+ const t = c, g = y, u = i(), l = i((t == null ? void 0 : t.options) || []), { value: s, updateValue: x } = O(t, g), r = i(!1);
29
+ q(() => {
31
30
  var e;
32
- (e = t.request) == null || e.call(t).then((a) => u.value = a);
31
+ t.request && (r.value = !0, (e = t.request) == null || e.call(t).then((a) => l.value = a).finally(() => {
32
+ r.value = !1;
33
+ }));
33
34
  });
34
- const v = T(() => {
35
- var r;
36
- const e = o(l);
37
- if (q(e))
35
+ const k = B(() => {
36
+ var p;
37
+ const e = o(s);
38
+ if (U(e))
38
39
  return t.emptyText;
39
- const a = (r = u.value) == null ? void 0 : r.find(
40
- (g) => e === F(g)
40
+ const a = (p = l.value) == null ? void 0 : p.find(
41
+ (_) => e === F(_)
41
42
  );
42
43
  return N(a) || t.emptyText;
43
44
  });
44
- function y() {
45
+ function b() {
45
46
  var e;
46
- (e = n.value) == null || e.focus();
47
+ (e = u.value) == null || e.focus();
47
48
  }
48
- function x() {
49
+ function T() {
49
50
  var e;
50
- (e = n.value) == null || e.blur();
51
+ (e = u.value) == null || e.blur();
51
52
  }
52
- return m({
53
- focus: y,
54
- blur: x
55
- }), (e, a) => e.mode === "read" ? (p(), _(V, { key: 0 }, [
56
- h(B(v.value), 1)
57
- ], 64)) : (p(), C(o(G), R({ key: 1 }, o(A)(t, ["value", "update:value", "options"]), {
58
- value: o(l),
59
- "onUpdate:value": o(c),
60
- options: u.value,
61
- ref_key: "radioGroupRef",
62
- ref: n
63
- }), null, 16, ["value", "onUpdate:value", "options"]));
53
+ return v({
54
+ focus: b,
55
+ blur: T
56
+ }), (e, a) => e.mode === "read" ? (n(), m(d, { key: 0 }, [
57
+ C(R(k.value), 1)
58
+ ], 64)) : (n(), m(d, { key: 1 }, [
59
+ r.value ? (n(), f(o(G), {
60
+ key: 0,
61
+ size: "small"
62
+ })) : (n(), f(o(S), h({ key: 1 }, o(z)(t, ["value", "update:value", "options", "request"]), {
63
+ value: o(s),
64
+ "onUpdate:value": o(x),
65
+ options: l.value,
66
+ ref_key: "radioGroupRef",
67
+ ref: u
68
+ }), null, 16, ["value", "onUpdate:value", "options"]))
69
+ ], 64));
64
70
  }
65
71
  });
66
72
  export {
67
- M as default
73
+ j as default
68
74
  };
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as B, ref as d, onMounted as C, computed as v, unref as a, openBlock as h, createElementBlock as V, toDisplayString as T, createBlock as I, mergeProps as M, createSlots as R, renderList as U, withCtx as y, renderSlot as z, normalizeProps as N, guardReactiveProps as $, createVNode as j } from "vue";
2
2
  import { debounce as D, isFunction as P, isArray as E, isNil as L } from "lodash-unified";
3
3
  import { Select as G, Spin as H } from "ant-design-vue";
4
- import "../../hooks/useMessage.mjs";
4
+ import "../../hooks/index.mjs";
5
5
  import { useControllableValue as J } from "../../hooks/useControllableValue.mjs";
6
6
  const K = { key: 0 }, ee = /* @__PURE__ */ B({
7
7
  name: "ApFieldSelect",
@@ -1,9 +1,9 @@
1
- import { defineComponent as U, useSlots as _, ref as z, computed as D, unref as o, createVNode as u, Fragment as s, openBlock as h, createBlock as k, resolveDynamicComponent as T, createElementBlock as E, mergeProps as p, createSlots as g, renderList as V, withCtx as C, renderSlot as v, normalizeProps as B, guardReactiveProps as w } from "vue";
1
+ import { defineComponent as U, useSlots as _, ref as z, unref as o, computed as D, createVNode as u, Fragment as s, openBlock as h, createBlock as k, resolveDynamicComponent as T, createElementBlock as E, mergeProps as p, createSlots as g, renderList as V, withCtx as C, renderSlot as v, normalizeProps as B, guardReactiveProps as w } from "vue";
2
2
  import { Switch as A, Popconfirm as K } from "ant-design-vue";
3
- import "../../hooks/useMessage.mjs";
4
- import { useControllableValue as L } from "../../hooks/useControllableValue.mjs";
5
- import { isNil as M, omit as P } from "lodash-unified";
3
+ import "../../hooks/index.mjs";
4
+ import { isNil as L, omit as P } from "lodash-unified";
6
5
  import { isDef as f } from "@fruits-chain/utils";
6
+ import { useControllableValue as M } from "../../hooks/useControllableValue.mjs";
7
7
  const J = /* @__PURE__ */ U({
8
8
  name: "ApFieldSwitch",
9
9
  __name: "index",
@@ -53,7 +53,7 @@ const J = /* @__PURE__ */ U({
53
53
  const t = _(), n = S, $ = N, {
54
54
  value: d,
55
55
  updateValue: a
56
- } = L(n, $, {
56
+ } = M(n, $, {
57
57
  valuePropName: "checked"
58
58
  }), i = z(!1);
59
59
  async function y(e, r) {
@@ -81,7 +81,7 @@ const J = /* @__PURE__ */ U({
81
81
  const F = D(() => {
82
82
  var l, c;
83
83
  const e = o(d);
84
- return M(e) ? u(s, null, [n.emptyText]) : e === n.checkedValue ? u(s, null, [n.checkedChildren || ((l = t.checkedChildren) == null ? void 0 : l.call(t)) || n.checkedValue]) : u(s, null, [n.unCheckedChildren || ((c = t.unCheckedChildren) == null ? void 0 : c.call(t)) || n.unCheckedValue]);
84
+ return L(e) ? u(s, null, [n.emptyText]) : e === n.checkedValue ? u(s, null, [n.checkedChildren || ((l = t.checkedChildren) == null ? void 0 : l.call(t)) || n.checkedValue]) : u(s, null, [n.unCheckedChildren || ((c = t.unCheckedChildren) == null ? void 0 : c.call(t)) || n.unCheckedValue]);
85
85
  });
86
86
  return (e, r) => e.mode === "read" ? (h(), k(T(F.value), {
87
87
  key: 0