v-nuxt-ui 0.1.0

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 (398) hide show
  1. package/README.md +153 -0
  2. package/dist/module.d.mts +13 -0
  3. package/dist/module.json +15 -0
  4. package/dist/module.mjs +45 -0
  5. package/dist/runtime/assets/css/main.css +1 -0
  6. package/dist/runtime/assets/css/transition.css +1 -0
  7. package/dist/runtime/components/CircleProgress.d.vue.ts +17 -0
  8. package/dist/runtime/components/CircleProgress.vue +75 -0
  9. package/dist/runtime/components/CircleProgress.vue.d.ts +17 -0
  10. package/dist/runtime/components/DeleteModal.d.vue.ts +14 -0
  11. package/dist/runtime/components/DeleteModal.vue +57 -0
  12. package/dist/runtime/components/DeleteModal.vue.d.ts +14 -0
  13. package/dist/runtime/components/Dnd.client.d.vue.ts +25 -0
  14. package/dist/runtime/components/Dnd.client.vue +47 -0
  15. package/dist/runtime/components/Dnd.client.vue.d.ts +25 -0
  16. package/dist/runtime/components/EChart.client.d.vue.ts +19 -0
  17. package/dist/runtime/components/EChart.client.vue +72 -0
  18. package/dist/runtime/components/EChart.client.vue.d.ts +19 -0
  19. package/dist/runtime/components/Empty.d.vue.ts +12 -0
  20. package/dist/runtime/components/Empty.vue +26 -0
  21. package/dist/runtime/components/Empty.vue.d.ts +12 -0
  22. package/dist/runtime/components/PermissionWrapper.d.vue.ts +23 -0
  23. package/dist/runtime/components/PermissionWrapper.vue +51 -0
  24. package/dist/runtime/components/PermissionWrapper.vue.d.ts +23 -0
  25. package/dist/runtime/components/ScrollArea.d.vue.ts +26 -0
  26. package/dist/runtime/components/ScrollArea.vue +201 -0
  27. package/dist/runtime/components/ScrollArea.vue.d.ts +26 -0
  28. package/dist/runtime/components/Spin.d.vue.ts +16 -0
  29. package/dist/runtime/components/Spin.vue +22 -0
  30. package/dist/runtime/components/Spin.vue.d.ts +16 -0
  31. package/dist/runtime/components/SqlEditor.d.vue.ts +23 -0
  32. package/dist/runtime/components/SqlEditor.vue +255 -0
  33. package/dist/runtime/components/SqlEditor.vue.d.ts +23 -0
  34. package/dist/runtime/components/Watermark.d.vue.ts +44 -0
  35. package/dist/runtime/components/Watermark.vue +162 -0
  36. package/dist/runtime/components/Watermark.vue.d.ts +44 -0
  37. package/dist/runtime/components/badge/CodeModal.client.d.vue.ts +11 -0
  38. package/dist/runtime/components/badge/CodeModal.client.vue +77 -0
  39. package/dist/runtime/components/badge/CodeModal.client.vue.d.ts +11 -0
  40. package/dist/runtime/components/badge/CodeTooltip.client.d.vue.ts +9 -0
  41. package/dist/runtime/components/badge/CodeTooltip.client.vue +57 -0
  42. package/dist/runtime/components/badge/CodeTooltip.client.vue.d.ts +9 -0
  43. package/dist/runtime/components/button/Dropdown.d.vue.ts +31 -0
  44. package/dist/runtime/components/button/Dropdown.vue +123 -0
  45. package/dist/runtime/components/button/Dropdown.vue.d.ts +31 -0
  46. package/dist/runtime/components/button/Theme.d.vue.ts +19 -0
  47. package/dist/runtime/components/button/Theme.vue +45 -0
  48. package/dist/runtime/components/button/Theme.vue.d.ts +19 -0
  49. package/dist/runtime/components/date-picker/Input.d.vue.ts +18 -0
  50. package/dist/runtime/components/date-picker/Input.vue +39 -0
  51. package/dist/runtime/components/date-picker/Input.vue.d.ts +18 -0
  52. package/dist/runtime/components/date-picker/index.d.vue.ts +26 -0
  53. package/dist/runtime/components/date-picker/index.vue +223 -0
  54. package/dist/runtime/components/date-picker/index.vue.d.ts +26 -0
  55. package/dist/runtime/components/flow/FlowEdge.client.d.vue.ts +5 -0
  56. package/dist/runtime/components/flow/FlowEdge.client.vue +110 -0
  57. package/dist/runtime/components/flow/FlowEdge.client.vue.d.ts +5 -0
  58. package/dist/runtime/components/flow/FlowNode.client.d.vue.ts +8 -0
  59. package/dist/runtime/components/flow/FlowNode.client.vue +79 -0
  60. package/dist/runtime/components/flow/FlowNode.client.vue.d.ts +8 -0
  61. package/dist/runtime/components/flow/FlowStats.d.vue.ts +7 -0
  62. package/dist/runtime/components/flow/FlowStats.vue +17 -0
  63. package/dist/runtime/components/flow/FlowStats.vue.d.ts +7 -0
  64. package/dist/runtime/components/flow/FlowToolbar.d.vue.ts +14 -0
  65. package/dist/runtime/components/flow/FlowToolbar.vue +113 -0
  66. package/dist/runtime/components/flow/FlowToolbar.vue.d.ts +14 -0
  67. package/dist/runtime/components/form/create-modal-template/WithApi.d.vue.ts +19 -0
  68. package/dist/runtime/components/form/create-modal-template/WithApi.vue +36 -0
  69. package/dist/runtime/components/form/create-modal-template/WithApi.vue.d.ts +19 -0
  70. package/dist/runtime/components/form/create-modal-template/index.d.vue.ts +19 -0
  71. package/dist/runtime/components/form/create-modal-template/index.vue +75 -0
  72. package/dist/runtime/components/form/create-modal-template/index.vue.d.ts +19 -0
  73. package/dist/runtime/components/form/field/AsyncObjectSelect.d.vue.ts +23 -0
  74. package/dist/runtime/components/form/field/AsyncObjectSelect.vue +46 -0
  75. package/dist/runtime/components/form/field/AsyncObjectSelect.vue.d.ts +23 -0
  76. package/dist/runtime/components/form/field/AsyncSelect.d.vue.ts +26 -0
  77. package/dist/runtime/components/form/field/AsyncSelect.vue +140 -0
  78. package/dist/runtime/components/form/field/AsyncSelect.vue.d.ts +26 -0
  79. package/dist/runtime/components/form/field/AsyncTreeSelect.d.vue.ts +27 -0
  80. package/dist/runtime/components/form/field/AsyncTreeSelect.vue +130 -0
  81. package/dist/runtime/components/form/field/AsyncTreeSelect.vue.d.ts +27 -0
  82. package/dist/runtime/components/form/field/ButtonSwitch.d.vue.ts +19 -0
  83. package/dist/runtime/components/form/field/ButtonSwitch.vue +29 -0
  84. package/dist/runtime/components/form/field/ButtonSwitch.vue.d.ts +19 -0
  85. package/dist/runtime/components/form/field/DatePicker.d.vue.ts +26 -0
  86. package/dist/runtime/components/form/field/DatePicker.vue +89 -0
  87. package/dist/runtime/components/form/field/DatePicker.vue.d.ts +26 -0
  88. package/dist/runtime/components/form/field/DynamicInput.d.vue.ts +14 -0
  89. package/dist/runtime/components/form/field/DynamicInput.vue +52 -0
  90. package/dist/runtime/components/form/field/DynamicInput.vue.d.ts +14 -0
  91. package/dist/runtime/components/form/field/DynamicObjectInput.d.vue.ts +20 -0
  92. package/dist/runtime/components/form/field/DynamicObjectInput.vue +82 -0
  93. package/dist/runtime/components/form/field/DynamicObjectInput.vue.d.ts +20 -0
  94. package/dist/runtime/components/form/field/Input.d.vue.ts +17 -0
  95. package/dist/runtime/components/form/field/Input.vue +41 -0
  96. package/dist/runtime/components/form/field/Input.vue.d.ts +17 -0
  97. package/dist/runtime/components/form/field/InputPassword.d.vue.ts +17 -0
  98. package/dist/runtime/components/form/field/InputPassword.vue +40 -0
  99. package/dist/runtime/components/form/field/InputPassword.vue.d.ts +17 -0
  100. package/dist/runtime/components/form/field/InputStringNumber.d.vue.ts +16 -0
  101. package/dist/runtime/components/form/field/InputStringNumber.vue +56 -0
  102. package/dist/runtime/components/form/field/InputStringNumber.vue.d.ts +16 -0
  103. package/dist/runtime/components/form/field/Select.d.vue.ts +16 -0
  104. package/dist/runtime/components/form/field/Select.vue +29 -0
  105. package/dist/runtime/components/form/field/Select.vue.d.ts +16 -0
  106. package/dist/runtime/components/form/field/SqlEditor.d.vue.ts +10 -0
  107. package/dist/runtime/components/form/field/SqlEditor.vue +28 -0
  108. package/dist/runtime/components/form/field/SqlEditor.vue.d.ts +10 -0
  109. package/dist/runtime/components/form/field/TreeSelectTransfer.d.vue.ts +4 -0
  110. package/dist/runtime/components/form/field/TreeSelectTransfer.vue +89 -0
  111. package/dist/runtime/components/form/field/TreeSelectTransfer.vue.d.ts +4 -0
  112. package/dist/runtime/components/form/field/index.d.vue.ts +26 -0
  113. package/dist/runtime/components/form/field/index.vue +212 -0
  114. package/dist/runtime/components/form/field/index.vue.d.ts +26 -0
  115. package/dist/runtime/components/form/index.d.vue.ts +21 -0
  116. package/dist/runtime/components/form/index.vue +77 -0
  117. package/dist/runtime/components/form/index.vue.d.ts +21 -0
  118. package/dist/runtime/components/layout/ModuleMenu.d.vue.ts +6 -0
  119. package/dist/runtime/components/layout/ModuleMenu.vue +48 -0
  120. package/dist/runtime/components/layout/ModuleMenu.vue.d.ts +6 -0
  121. package/dist/runtime/components/layout/ThemePicker.d.vue.ts +3 -0
  122. package/dist/runtime/components/layout/ThemePicker.vue +100 -0
  123. package/dist/runtime/components/layout/ThemePicker.vue.d.ts +3 -0
  124. package/dist/runtime/components/layout/UserMenu.d.vue.ts +7 -0
  125. package/dist/runtime/components/layout/UserMenu.vue +77 -0
  126. package/dist/runtime/components/layout/UserMenu.vue.d.ts +7 -0
  127. package/dist/runtime/components/layout/default.d.vue.ts +13 -0
  128. package/dist/runtime/components/layout/default.vue +82 -0
  129. package/dist/runtime/components/layout/default.vue.d.ts +13 -0
  130. package/dist/runtime/components/placeholder/Svg.d.vue.ts +3 -0
  131. package/dist/runtime/components/placeholder/Svg.vue +22 -0
  132. package/dist/runtime/components/placeholder/Svg.vue.d.ts +3 -0
  133. package/dist/runtime/components/simple-table/index.d.vue.ts +21 -0
  134. package/dist/runtime/components/simple-table/index.vue +159 -0
  135. package/dist/runtime/components/simple-table/index.vue.d.ts +21 -0
  136. package/dist/runtime/components/table/ExcelExportModal.d.vue.ts +28 -0
  137. package/dist/runtime/components/table/ExcelExportModal.vue +82 -0
  138. package/dist/runtime/components/table/ExcelExportModal.vue.d.ts +28 -0
  139. package/dist/runtime/components/table/Page.d.vue.ts +26 -0
  140. package/dist/runtime/components/table/Page.vue +130 -0
  141. package/dist/runtime/components/table/Page.vue.d.ts +26 -0
  142. package/dist/runtime/components/table/Pagination.d.vue.ts +19 -0
  143. package/dist/runtime/components/table/Pagination.vue +51 -0
  144. package/dist/runtime/components/table/Pagination.vue.d.ts +19 -0
  145. package/dist/runtime/components/table/TooltipCell.d.vue.ts +7 -0
  146. package/dist/runtime/components/table/TooltipCell.vue +23 -0
  147. package/dist/runtime/components/table/TooltipCell.vue.d.ts +7 -0
  148. package/dist/runtime/components/table/column/ActionHeader.d.vue.ts +21 -0
  149. package/dist/runtime/components/table/column/ActionHeader.vue +155 -0
  150. package/dist/runtime/components/table/column/ActionHeader.vue.d.ts +21 -0
  151. package/dist/runtime/components/table/expansion/Field.d.vue.ts +18 -0
  152. package/dist/runtime/components/table/expansion/Field.vue +33 -0
  153. package/dist/runtime/components/table/expansion/Field.vue.d.ts +18 -0
  154. package/dist/runtime/components/table/expansion/Layout.d.vue.ts +13 -0
  155. package/dist/runtime/components/table/expansion/Layout.vue +8 -0
  156. package/dist/runtime/components/table/expansion/Layout.vue.d.ts +13 -0
  157. package/dist/runtime/components/table/header/index.d.vue.ts +19 -0
  158. package/dist/runtime/components/table/header/index.vue +221 -0
  159. package/dist/runtime/components/table/header/index.vue.d.ts +19 -0
  160. package/dist/runtime/components/table/header/settings/columns/DndList.d.vue.ts +32 -0
  161. package/dist/runtime/components/table/header/settings/columns/DndList.vue +46 -0
  162. package/dist/runtime/components/table/header/settings/columns/DndList.vue.d.ts +32 -0
  163. package/dist/runtime/components/table/header/settings/columns/Item.d.vue.ts +18 -0
  164. package/dist/runtime/components/table/header/settings/columns/Item.vue +59 -0
  165. package/dist/runtime/components/table/header/settings/columns/Item.vue.d.ts +18 -0
  166. package/dist/runtime/components/table/header/settings/columns/index.d.vue.ts +24 -0
  167. package/dist/runtime/components/table/header/settings/columns/index.vue +143 -0
  168. package/dist/runtime/components/table/header/settings/columns/index.vue.d.ts +24 -0
  169. package/dist/runtime/components/table/header/settings/index.d.vue.ts +25 -0
  170. package/dist/runtime/components/table/header/settings/index.vue +35 -0
  171. package/dist/runtime/components/table/header/settings/index.vue.d.ts +25 -0
  172. package/dist/runtime/components/table/index.d.vue.ts +26 -0
  173. package/dist/runtime/components/table/index.vue +121 -0
  174. package/dist/runtime/components/table/index.vue.d.ts +26 -0
  175. package/dist/runtime/components/table/query/order/Item.d.vue.ts +28 -0
  176. package/dist/runtime/components/table/query/order/Item.vue +85 -0
  177. package/dist/runtime/components/table/query/order/Item.vue.d.ts +28 -0
  178. package/dist/runtime/components/table/query/order/Newer.d.vue.ts +25 -0
  179. package/dist/runtime/components/table/query/order/Newer.vue +50 -0
  180. package/dist/runtime/components/table/query/order/Newer.vue.d.ts +25 -0
  181. package/dist/runtime/components/table/query/order/index.d.vue.ts +19 -0
  182. package/dist/runtime/components/table/query/order/index.vue +108 -0
  183. package/dist/runtime/components/table/query/order/index.vue.d.ts +19 -0
  184. package/dist/runtime/components/table/query/where/Newer.d.vue.ts +14 -0
  185. package/dist/runtime/components/table/query/where/Newer.vue +44 -0
  186. package/dist/runtime/components/table/query/where/Newer.vue.d.ts +14 -0
  187. package/dist/runtime/components/table/query/where/index.d.vue.ts +21 -0
  188. package/dist/runtime/components/table/query/where/index.vue +108 -0
  189. package/dist/runtime/components/table/query/where/index.vue.d.ts +21 -0
  190. package/dist/runtime/components/table/query/where/simple/index.d.vue.ts +7 -0
  191. package/dist/runtime/components/table/query/where/simple/index.vue +47 -0
  192. package/dist/runtime/components/table/query/where/simple/index.vue.d.ts +7 -0
  193. package/dist/runtime/components/table/query/where/simple/item/ColumnPicker.d.vue.ts +27 -0
  194. package/dist/runtime/components/table/query/where/simple/item/ColumnPicker.vue +65 -0
  195. package/dist/runtime/components/table/query/where/simple/item/ColumnPicker.vue.d.ts +27 -0
  196. package/dist/runtime/components/table/query/where/simple/item/OprPicker.d.vue.ts +27 -0
  197. package/dist/runtime/components/table/query/where/simple/item/OprPicker.vue +68 -0
  198. package/dist/runtime/components/table/query/where/simple/item/OprPicker.vue.d.ts +27 -0
  199. package/dist/runtime/components/table/query/where/simple/item/index.d.vue.ts +20 -0
  200. package/dist/runtime/components/table/query/where/simple/item/index.vue +56 -0
  201. package/dist/runtime/components/table/query/where/simple/item/index.vue.d.ts +20 -0
  202. package/dist/runtime/components/table/query/where/simple/item/opr/AsyncSelect.d.vue.ts +29 -0
  203. package/dist/runtime/components/table/query/where/simple/item/opr/AsyncSelect.vue +152 -0
  204. package/dist/runtime/components/table/query/where/simple/item/opr/AsyncSelect.vue.d.ts +29 -0
  205. package/dist/runtime/components/table/query/where/simple/item/opr/DatePicker.d.vue.ts +27 -0
  206. package/dist/runtime/components/table/query/where/simple/item/opr/DatePicker.vue +232 -0
  207. package/dist/runtime/components/table/query/where/simple/item/opr/DatePicker.vue.d.ts +27 -0
  208. package/dist/runtime/components/table/query/where/simple/item/opr/Input.d.vue.ts +29 -0
  209. package/dist/runtime/components/table/query/where/simple/item/opr/Input.vue +57 -0
  210. package/dist/runtime/components/table/query/where/simple/item/opr/Input.vue.d.ts +29 -0
  211. package/dist/runtime/components/table/query/where/simple/item/opr/InputNumber.d.vue.ts +29 -0
  212. package/dist/runtime/components/table/query/where/simple/item/opr/InputNumber.vue +45 -0
  213. package/dist/runtime/components/table/query/where/simple/item/opr/InputNumber.vue.d.ts +29 -0
  214. package/dist/runtime/components/table/query/where/simple/item/opr/Select.d.vue.ts +28 -0
  215. package/dist/runtime/components/table/query/where/simple/item/opr/Select.vue +62 -0
  216. package/dist/runtime/components/table/query/where/simple/item/opr/Select.vue.d.ts +28 -0
  217. package/dist/runtime/components/table/query/where/simple/item/opr/index.d.vue.ts +19 -0
  218. package/dist/runtime/components/table/query/where/simple/item/opr/index.vue +72 -0
  219. package/dist/runtime/components/table/query/where/simple/item/opr/index.vue.d.ts +19 -0
  220. package/dist/runtime/composables/api/flow/index.d.ts +3 -0
  221. package/dist/runtime/composables/api/flow/index.js +3 -0
  222. package/dist/runtime/composables/api/flow/useFlowApi.d.ts +1 -0
  223. package/dist/runtime/composables/api/flow/useFlowApi.js +1 -0
  224. package/dist/runtime/composables/api/flow/useFlowNodeApi.d.ts +1 -0
  225. package/dist/runtime/composables/api/flow/useFlowNodeApi.js +1 -0
  226. package/dist/runtime/composables/api/flow/useFlowNodeLinkApi.d.ts +1 -0
  227. package/dist/runtime/composables/api/flow/useFlowNodeLinkApi.js +1 -0
  228. package/dist/runtime/composables/api/index.d.ts +4 -0
  229. package/dist/runtime/composables/api/index.js +4 -0
  230. package/dist/runtime/composables/api/sys/index.d.ts +9 -0
  231. package/dist/runtime/composables/api/sys/index.js +9 -0
  232. package/dist/runtime/composables/api/sys/useAuthApi.d.ts +0 -0
  233. package/dist/runtime/composables/api/sys/useAuthApi.js +13 -0
  234. package/dist/runtime/composables/api/sys/useCompanyApi.d.ts +1 -0
  235. package/dist/runtime/composables/api/sys/useCompanyApi.js +3 -0
  236. package/dist/runtime/composables/api/sys/useDepartmentApi.d.ts +0 -0
  237. package/dist/runtime/composables/api/sys/useDepartmentApi.js +30 -0
  238. package/dist/runtime/composables/api/sys/useJobTitleApi.d.ts +1 -0
  239. package/dist/runtime/composables/api/sys/useJobTitleApi.js +3 -0
  240. package/dist/runtime/composables/api/sys/useLoginApi.d.ts +0 -0
  241. package/dist/runtime/composables/api/sys/useLoginApi.js +13 -0
  242. package/dist/runtime/composables/api/sys/useMenuApi.d.ts +0 -0
  243. package/dist/runtime/composables/api/sys/useMenuApi.js +32 -0
  244. package/dist/runtime/composables/api/sys/useRoleApi.d.ts +0 -0
  245. package/dist/runtime/composables/api/sys/useRoleApi.js +20 -0
  246. package/dist/runtime/composables/api/sys/useRowRecord.d.ts +0 -0
  247. package/dist/runtime/composables/api/sys/useRowRecord.js +8 -0
  248. package/dist/runtime/composables/api/sys/useUserApi.d.ts +0 -0
  249. package/dist/runtime/composables/api/sys/useUserApi.js +39 -0
  250. package/dist/runtime/composables/api/useApi.d.ts +0 -0
  251. package/dist/runtime/composables/api/useApi.js +103 -0
  252. package/dist/runtime/composables/api/useModel.d.ts +3 -0
  253. package/dist/runtime/composables/api/useModel.js +4 -0
  254. package/dist/runtime/composables/flow/index.d.ts +3 -0
  255. package/dist/runtime/composables/flow/index.js +3 -0
  256. package/dist/runtime/composables/flow/useFlow.d.ts +0 -0
  257. package/dist/runtime/composables/flow/useFlow.js +162 -0
  258. package/dist/runtime/composables/flow/useFlowResize.d.ts +56 -0
  259. package/dist/runtime/composables/flow/useFlowResize.js +148 -0
  260. package/dist/runtime/composables/flow/useFlowStyles.d.ts +14 -0
  261. package/dist/runtime/composables/flow/useFlowStyles.js +32 -0
  262. package/dist/runtime/composables/index.d.ts +13 -0
  263. package/dist/runtime/composables/index.js +13 -0
  264. package/dist/runtime/composables/table/index.d.ts +9 -0
  265. package/dist/runtime/composables/table/index.js +9 -0
  266. package/dist/runtime/composables/table/useTable.d.ts +0 -0
  267. package/dist/runtime/composables/table/useTable.js +340 -0
  268. package/dist/runtime/composables/table/useTableColumns.d.ts +30 -0
  269. package/dist/runtime/composables/table/useTableColumns.js +214 -0
  270. package/dist/runtime/composables/table/useTableData.d.ts +29 -0
  271. package/dist/runtime/composables/table/useTableData.js +92 -0
  272. package/dist/runtime/composables/table/useTableOpr.d.ts +8 -0
  273. package/dist/runtime/composables/table/useTableOpr.js +91 -0
  274. package/dist/runtime/composables/table/useTablePagination.d.ts +7 -0
  275. package/dist/runtime/composables/table/useTablePagination.js +29 -0
  276. package/dist/runtime/composables/table/useTableQuery.d.ts +23 -0
  277. package/dist/runtime/composables/table/useTableQuery.js +131 -0
  278. package/dist/runtime/composables/table/useTableRowActions.d.ts +18 -0
  279. package/dist/runtime/composables/table/useTableRowActions.js +154 -0
  280. package/dist/runtime/composables/table/useTableRowSelection.d.ts +6 -0
  281. package/dist/runtime/composables/table/useTableRowSelection.js +26 -0
  282. package/dist/runtime/composables/table/useTableView.d.ts +0 -0
  283. package/dist/runtime/composables/table/useTableView.js +150 -0
  284. package/dist/runtime/composables/useApp.d.ts +22 -0
  285. package/dist/runtime/composables/useApp.js +83 -0
  286. package/dist/runtime/composables/useAuth.d.ts +14 -0
  287. package/dist/runtime/composables/useAuth.js +92 -0
  288. package/dist/runtime/composables/useBoolean.d.ts +58 -0
  289. package/dist/runtime/composables/useBoolean.js +71 -0
  290. package/dist/runtime/composables/useDate.d.ts +25 -0
  291. package/dist/runtime/composables/useDate.js +157 -0
  292. package/dist/runtime/composables/useEChart.d.ts +103 -0
  293. package/dist/runtime/composables/useEChart.js +120 -0
  294. package/dist/runtime/composables/useForm.d.ts +0 -0
  295. package/dist/runtime/composables/useForm.js +60 -0
  296. package/dist/runtime/composables/usePermission.d.ts +10 -0
  297. package/dist/runtime/composables/usePermission.js +53 -0
  298. package/dist/runtime/composables/useRouterPush.d.ts +8 -0
  299. package/dist/runtime/composables/useRouterPush.js +37 -0
  300. package/dist/runtime/composables/useSidebarMenu.d.ts +36 -0
  301. package/dist/runtime/composables/useSidebarMenu.js +131 -0
  302. package/dist/runtime/composables/useTheme.d.ts +20 -0
  303. package/dist/runtime/composables/useTheme.js +94 -0
  304. package/dist/runtime/constants/columns.d.ts +3 -0
  305. package/dist/runtime/constants/columns.js +52 -0
  306. package/dist/runtime/constants/flow.d.ts +12 -0
  307. package/dist/runtime/constants/flow.js +24 -0
  308. package/dist/runtime/constants/index.d.ts +6 -0
  309. package/dist/runtime/constants/index.js +6 -0
  310. package/dist/runtime/constants/menu.d.ts +9 -0
  311. package/dist/runtime/constants/menu.js +11 -0
  312. package/dist/runtime/constants/options.d.ts +8 -0
  313. package/dist/runtime/constants/options.js +15 -0
  314. package/dist/runtime/constants/time.d.ts +7 -0
  315. package/dist/runtime/constants/time.js +12 -0
  316. package/dist/runtime/constants/user.d.ts +7 -0
  317. package/dist/runtime/constants/user.js +7 -0
  318. package/dist/runtime/index.css +1 -0
  319. package/dist/runtime/plugins/01.nuxtUIEnhancement.d.ts +18 -0
  320. package/dist/runtime/plugins/01.nuxtUIEnhancement.js +52 -0
  321. package/dist/runtime/plugins/02.dayjs.d.ts +13 -0
  322. package/dist/runtime/plugins/02.dayjs.js +9 -0
  323. package/dist/runtime/plugins/03.theme.d.ts +2 -0
  324. package/dist/runtime/plugins/03.theme.js +33 -0
  325. package/dist/runtime/plugins/04.head.d.ts +2 -0
  326. package/dist/runtime/plugins/04.head.js +29 -0
  327. package/dist/runtime/types/app.d.ts +42 -0
  328. package/dist/runtime/types/app.js +0 -0
  329. package/dist/runtime/types/cmds/login.d.ts +23 -0
  330. package/dist/runtime/types/cmds/sys.d.ts +10 -0
  331. package/dist/runtime/types/cmds/user.d.ts +8 -0
  332. package/dist/runtime/types/components/date.d.ts +5 -0
  333. package/dist/runtime/types/components/date.js +0 -0
  334. package/dist/runtime/types/components/dnd.d.ts +14 -0
  335. package/dist/runtime/types/components/dnd.js +0 -0
  336. package/dist/runtime/types/components/form/field.d.ts +102 -0
  337. package/dist/runtime/types/components/form/field.js +0 -0
  338. package/dist/runtime/types/components/form/index.d.ts +27 -0
  339. package/dist/runtime/types/components/form/index.js +1 -0
  340. package/dist/runtime/types/components/index.d.ts +4 -0
  341. package/dist/runtime/types/components/index.js +4 -0
  342. package/dist/runtime/types/components/table/column.d.ts +35 -0
  343. package/dist/runtime/types/components/table/column.js +0 -0
  344. package/dist/runtime/types/components/table/header.d.ts +33 -0
  345. package/dist/runtime/types/components/table/header.js +0 -0
  346. package/dist/runtime/types/components/table/index.d.ts +103 -0
  347. package/dist/runtime/types/components/table/index.js +4 -0
  348. package/dist/runtime/types/components/table/pagination.d.ts +14 -0
  349. package/dist/runtime/types/components/table/pagination.js +0 -0
  350. package/dist/runtime/types/components/table/query/index.d.ts +2 -0
  351. package/dist/runtime/types/components/table/query/index.js +2 -0
  352. package/dist/runtime/types/components/table/query/order.d.ts +16 -0
  353. package/dist/runtime/types/components/table/query/order.js +0 -0
  354. package/dist/runtime/types/components/table/query/where.d.ts +26 -0
  355. package/dist/runtime/types/components/table/query/where.js +0 -0
  356. package/dist/runtime/types/constants/time.d.ts +5 -0
  357. package/dist/runtime/types/index.d.ts +14 -0
  358. package/dist/runtime/types/index.js +6 -0
  359. package/dist/runtime/types/localStorage.d.ts +15 -0
  360. package/dist/runtime/types/locale.d.ts +81 -0
  361. package/dist/runtime/types/locale.js +0 -0
  362. package/dist/runtime/types/models/base.d.ts +16 -0
  363. package/dist/runtime/types/models/flow.d.ts +31 -0
  364. package/dist/runtime/types/models/sys.d.ts +107 -0
  365. package/dist/runtime/types/query.d.ts +45 -0
  366. package/dist/runtime/types/query.js +1 -0
  367. package/dist/runtime/types/request.d.ts +55 -0
  368. package/dist/runtime/types/request.js +22 -0
  369. package/dist/runtime/types/storage.d.ts +10 -0
  370. package/dist/runtime/types/storage.js +11 -0
  371. package/dist/runtime/utils/array.d.ts +1 -0
  372. package/dist/runtime/utils/array.js +3 -0
  373. package/dist/runtime/utils/diff.d.ts +2 -0
  374. package/dist/runtime/utils/diff.js +81 -0
  375. package/dist/runtime/utils/download/index.d.ts +1 -0
  376. package/dist/runtime/utils/download/index.js +1 -0
  377. package/dist/runtime/utils/download/tagA.d.ts +2 -0
  378. package/dist/runtime/utils/download/tagA.js +14 -0
  379. package/dist/runtime/utils/emoji.d.ts +1 -0
  380. package/dist/runtime/utils/emoji.js +57 -0
  381. package/dist/runtime/utils/excel.d.ts +3 -0
  382. package/dist/runtime/utils/excel.js +63 -0
  383. package/dist/runtime/utils/form.d.ts +2 -0
  384. package/dist/runtime/utils/form.js +142 -0
  385. package/dist/runtime/utils/index.d.ts +11 -0
  386. package/dist/runtime/utils/index.js +11 -0
  387. package/dist/runtime/utils/request.d.ts +3 -0
  388. package/dist/runtime/utils/request.js +3 -0
  389. package/dist/runtime/utils/string.d.ts +6 -0
  390. package/dist/runtime/utils/string.js +18 -0
  391. package/dist/runtime/utils/tree.d.ts +8 -0
  392. package/dist/runtime/utils/tree.js +54 -0
  393. package/dist/runtime/utils/type.d.ts +1 -0
  394. package/dist/runtime/utils/type.js +3 -0
  395. package/dist/runtime/utils/vueuse.d.ts +1 -0
  396. package/dist/runtime/utils/vueuse.js +20 -0
  397. package/dist/types.d.mts +3 -0
  398. package/package.json +108 -0
package/README.md ADDED
@@ -0,0 +1,153 @@
1
+ # V Nuxt UI
2
+
3
+ A reusable Nuxt module providing enterprise-grade components, composables, and utilities built on top of [@nuxt/ui](https://ui.nuxt.com/).
4
+
5
+ ## Features
6
+
7
+ - **ProTable** — Sophisticated data table with CRUD, pagination, column management, where/order query filters (persisted to localStorage), row selection, context menu actions, Excel export, tree data, row expansion, and column pinning with shadow effects
8
+ - **ProForm** — Declarative form builder with 18+ field types and Zod validation
9
+ - **ProDeleteModal** — Generic delete confirmation modal with batch support
10
+ - **ProPermissionWrapper** — Permission-based UI wrapper with hide/disable modes
11
+ - **ProDatePicker** — Enhanced date picker with shortcut presets
12
+ - **ProDnd** — Drag-and-drop list via vue-draggable-plus
13
+ - **30+ composables** — useApi, useModel, useBoolean, useForm, useDate, useEChart, useApp, useTheme, and 9 table composables
14
+ - **Utility functions** — String, array, tree, diff, form, excel, type, emoji, request, download helpers
15
+ - **i18n** — English and Chinese locale files
16
+ - **Plugins** — NuxtUI toast enhancements, dayjs integration
17
+
18
+ ## Installation
19
+
20
+ ```bash
21
+ pnpm add @anthropic-test/v-nuxt-ui
22
+ ```
23
+
24
+ ### Peer dependencies
25
+
26
+ ```bash
27
+ pnpm add @nuxt/ui @nuxtjs/i18n @vueuse/nuxt nuxt
28
+ ```
29
+
30
+ ### Optional dependencies
31
+
32
+ ```bash
33
+ # For charts
34
+ pnpm add echarts vue-echarts
35
+
36
+ # For Excel export
37
+ pnpm add exceljs
38
+
39
+ # For drag-and-drop
40
+ pnpm add vue-draggable-plus
41
+
42
+ # For cron expression display
43
+ pnpm add cronstrue
44
+ ```
45
+
46
+ ## Usage
47
+
48
+ ```ts
49
+ // nuxt.config.ts
50
+ export default defineNuxtConfig({
51
+ modules: ['@anthropic-test/v-nuxt-ui']
52
+ })
53
+ ```
54
+
55
+ ### Module Options
56
+
57
+ ```ts
58
+ export default defineNuxtConfig({
59
+ modules: ['@anthropic-test/v-nuxt-ui'],
60
+ vNuxtUI: {
61
+ prefix: 'Pro' // Component prefix (default: 'V')
62
+ }
63
+ })
64
+ ```
65
+
66
+ ## Components
67
+
68
+ ### ProTable
69
+
70
+ ```vue
71
+ <ProTable
72
+ name="users"
73
+ cn-name="Users"
74
+ :biz-columns="bizColumns"
75
+ :use-api-group="useUserApi"
76
+ :on-edit-row-from-modal="openEditModal"
77
+ :export-excel="{ filename: 'users' }"
78
+ />
79
+ ```
80
+
81
+ ### ProForm
82
+
83
+ ```vue
84
+ <ProForm
85
+ :fields="[
86
+ { key: 'name', label: 'Name', type: 'input', required: true },
87
+ { key: 'email', label: 'Email', type: 'input' },
88
+ { key: 'role', label: 'Role', type: 'select', items: roleOptions }
89
+ ]"
90
+ :model="formData"
91
+ @submit="handleSubmit"
92
+ />
93
+ ```
94
+
95
+ ### ProPermissionWrapper
96
+
97
+ The permission wrapper uses provide/inject. Your app must provide the permission checker:
98
+
99
+ ```ts
100
+ // In your app's plugin or root component
101
+ const { hasPermissions } = usePermission()
102
+ provide('vui:hasPermissions', hasPermissions)
103
+ ```
104
+
105
+ ```vue
106
+ <ProPermissionWrapper permission="users:delete" mode="disable">
107
+ <UButton color="error">Delete</UButton>
108
+ </ProPermissionWrapper>
109
+ ```
110
+
111
+ ## API Composables
112
+
113
+ Create standard CRUD API composables using the factory pattern:
114
+
115
+ ```ts
116
+ // composables/api/useUserApi.ts
117
+ export const useUserApi = () => useApi<User>('/api/users')
118
+ ```
119
+
120
+ This provides: `create`, `batchCreate`, `update`, `batchUpdate`, `getById`, `deleteById`, `batchDelete`, `count`, `list`, `countAndList`, `prune`, `copy`.
121
+
122
+ ## Development
123
+
124
+ ```bash
125
+ # Install dependencies
126
+ make install
127
+
128
+ # Start playground dev server
129
+ make dev
130
+
131
+ # Build the module
132
+ make build
133
+
134
+ # Run linter
135
+ make lint
136
+
137
+ # Type check
138
+ make typecheck
139
+ ```
140
+
141
+ ## Publishing
142
+
143
+ ```bash
144
+ # Dry-run
145
+ make publish-dry
146
+
147
+ # Publish
148
+ make publish
149
+ ```
150
+
151
+ ## License
152
+
153
+ MIT
@@ -0,0 +1,13 @@
1
+ import * as _nuxt_schema from '@nuxt/schema';
2
+
3
+ interface ModuleOptions {
4
+ /**
5
+ * Module prefix for components
6
+ * @default 'V'
7
+ */
8
+ prefix?: string;
9
+ }
10
+ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
11
+
12
+ export { _default as default };
13
+ export type { ModuleOptions };
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "v-nuxt-ui",
3
+ "configKey": "vNuxtUI",
4
+ "compatibility": {
5
+ "nuxt": ">=4.0.0"
6
+ },
7
+ "dependencies": [
8
+ "@nuxt/ui"
9
+ ],
10
+ "version": "0.1.0",
11
+ "builder": {
12
+ "@nuxt/module-builder": "1.0.2",
13
+ "unbuild": "unknown"
14
+ }
15
+ }
@@ -0,0 +1,45 @@
1
+ import { defineNuxtModule, createResolver, addComponentsDir, addImportsDir, addPlugin, addTypeTemplate } from '@nuxt/kit';
2
+
3
+ const module$1 = defineNuxtModule({
4
+ meta: {
5
+ name: "v-nuxt-ui",
6
+ configKey: "vNuxtUI",
7
+ compatibility: {
8
+ nuxt: ">=4.0.0"
9
+ },
10
+ dependencies: ["@nuxt/ui"]
11
+ },
12
+ defaults: {
13
+ prefix: "V"
14
+ },
15
+ async setup(options, nuxt) {
16
+ const { resolve } = createResolver(import.meta.url);
17
+ nuxt.options.alias["#v"] = resolve("./runtime");
18
+ addComponentsDir({
19
+ path: resolve("./runtime/components"),
20
+ prefix: options.prefix,
21
+ pathPrefix: true
22
+ });
23
+ addImportsDir(resolve("./runtime/composables"));
24
+ addImportsDir(resolve("./runtime/composables/api"));
25
+ addImportsDir(resolve("./runtime/composables/flow"));
26
+ addImportsDir(resolve("./runtime/composables/table"));
27
+ addImportsDir(resolve("./runtime/utils"));
28
+ addImportsDir(resolve("./runtime/constants"));
29
+ addPlugin(resolve("./runtime/plugins/01.nuxtUIEnhancement"));
30
+ addPlugin(resolve("./runtime/plugins/02.dayjs"));
31
+ addPlugin(resolve("./runtime/plugins/03.theme"));
32
+ addPlugin(resolve("./runtime/plugins/04.head"));
33
+ nuxt.options.css.push(resolve("./runtime/assets/css/main.css"));
34
+ nuxt.options.css.push(resolve("./runtime/assets/css/transition.css"));
35
+ nuxt.hook("prepare:types", ({ references }) => {
36
+ references.push({ path: resolve("./runtime/types/index.ts") });
37
+ });
38
+ addTypeTemplate({
39
+ filename: "types/v-nuxt-ui.d.ts",
40
+ getContents: () => `export * from '${resolve("./runtime/types/index.ts")}'`
41
+ });
42
+ }
43
+ });
44
+
45
+ export { module$1 as default };
@@ -0,0 +1 @@
1
+ :root{--ui-header-height:3.5rem;--ui-table-header-height:3rem;--ui-footer-height:3rem}::-webkit-scrollbar{height:.25rem;width:.25rem}::-webkit-scrollbar-thumb{background-color:#e5e7eb;border-radius:9999px}.dark ::-webkit-scrollbar-thumb{background-color:#404040}.dark,:root{--chart-1:var(--ui-color-primary-300);--chart-2:var(--ui-color-primary-500);--chart-3:var(--ui-color-primary-700);--chart-4:var(--ui-color-primary-900)}input[type=number]{-moz-appearance:textfield;-webkit-appearance:textfield;appearance:textfield}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}:focus-visible{outline:none!important}
@@ -0,0 +1 @@
1
+ .fade-enter-active,.fade-leave-active{transition:opacity .3s ease-in-out}.fade-enter-from,.fade-leave-to{opacity:0}.fade-slide-enter-active,.fade-slide-leave-active{transition:all .3s}.fade-slide-enter-from{opacity:0;transform:translateX(-30px)}.fade-slide-leave-to{opacity:0;transform:translateX(30px)}.fade-bottom-enter-active,.fade-bottom-leave-active{transition:opacity .25s,transform .3s}.fade-bottom-enter-from{opacity:0;transform:translateY(-10%)}.fade-bottom-leave-to{opacity:0;transform:translateY(10%)}.fade-scale-enter-active,.fade-scale-leave-active{transition:all .28s}.fade-scale-enter-from{opacity:0;transform:scale(1.2)}.fade-scale-leave-to{opacity:0;transform:scale(.8)}.zoom-fade-enter-active,.zoom-fade-leave-active{transition:transform .2s,opacity .3s ease-out}.zoom-fade-enter-from{opacity:0;transform:scale(.92)}.zoom-fade-leave-to{opacity:0;transform:scale(1.06)}.zoom-out-enter-active,.zoom-out-leave-active{transition:opacity .1s ease-in-out,transform .15s ease-out}.zoom-out-enter-from,.zoom-out-leave-to{opacity:0;transform:scale(0)}.list-enter-active,.list-leave-active,.list-move{transition:all .3s ease}.list-enter-from{opacity:0}.list-leave-active{display:none;position:absolute}
@@ -0,0 +1,17 @@
1
+ import type { ButtonProps } from '@nuxt/ui';
2
+ type __VLS_Props = {
3
+ text?: string;
4
+ textColor?: ButtonProps['color'];
5
+ textClass?: string;
6
+ strokeWidth?: number;
7
+ arcs?: {
8
+ percent?: number;
9
+ color?: ButtonProps['color'];
10
+ }[];
11
+ };
12
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
13
+ textColor: string | number | symbol;
14
+ strokeWidth: number;
15
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
@@ -0,0 +1,75 @@
1
+ <script setup>
2
+ import { computed } from "vue";
3
+ const props = defineProps({
4
+ text: { type: String, required: false },
5
+ textColor: { type: null, required: false, default: "neutral" },
6
+ textClass: { type: String, required: false },
7
+ strokeWidth: { type: Number, required: false, default: 2 },
8
+ arcs: { type: Array, required: false }
9
+ });
10
+ const RADIUS = 16;
11
+ const CIRCUMFERENCE = 2 * Math.PI * RADIUS;
12
+ const normalizedSegments = computed(() => {
13
+ const raw = props.arcs || [];
14
+ if (!raw.length) return [];
15
+ const allFraction = raw.every((i) => (i.percent ?? 0) <= 1);
16
+ const percents = raw.map((i) => Math.max(0, (i.percent ?? 0) * (allFraction ? 100 : 1)));
17
+ const total = percents.reduce((s, v) => s + v, 0);
18
+ if (total <= 0) return raw.map(() => ({ percent: 0, color: void 0 }));
19
+ const scale = total > 100 ? 100 / total : 1;
20
+ return raw.map((it, idx) => ({
21
+ percent: percents[idx] * scale,
22
+ color: it.color
23
+ }));
24
+ });
25
+ const dashLength = (percent) => percent / 100 * CIRCUMFERENCE;
26
+ const dashOffset = (idx) => {
27
+ const preceding = normalizedSegments.value.slice(0, idx).reduce((s, v) => s + dashLength(v.percent), 0);
28
+ return -preceding;
29
+ };
30
+ const colorClassOf = (color) => {
31
+ if (!color || color === "neutral") return "text-dimmed duration-512";
32
+ return `text-${String(color)} duration-512`;
33
+ };
34
+ </script>
35
+
36
+ <template>
37
+ <div class="relative">
38
+ <svg style="transform: rotate(-90deg);" viewBox="0 0 36 36" xmlns="http://www.w3.org/2000/svg">
39
+ <!-- 背景圆 -->
40
+ <circle
41
+ cx="18"
42
+ cy="18"
43
+ r="16"
44
+ fill="none"
45
+ stroke="currentColor"
46
+ class="text-dimmed"
47
+ :stroke-width="strokeWidth"
48
+ />
49
+
50
+ <!-- 分段进度(从第一个到最后按顺序渲染,未填满部分透出灰色背景) -->
51
+ <template v-for="(seg, idx) in normalizedSegments" :key="idx">
52
+ <circle
53
+ v-if="seg.percent > 1e-4"
54
+ cx="18"
55
+ cy="18"
56
+ r="16"
57
+ fill="none"
58
+ stroke-linecap="round"
59
+ :stroke-width="strokeWidth"
60
+ :stroke-dasharray="`${dashLength(seg.percent)} ${CIRCUMFERENCE}`"
61
+ :stroke-dashoffset="dashOffset(idx)"
62
+ stroke="currentColor"
63
+ class="transition-discrete"
64
+ :class="colorClassOf(seg.color)"
65
+ />
66
+ </template>
67
+ </svg>
68
+
69
+ <div class="absolute inset-0 flex items-center justify-center">
70
+ <span :class="`${colorClassOf(textColor)} ${textClass}`">
71
+ {{ props.text }}
72
+ </span>
73
+ </div>
74
+ </div>
75
+ </template>
@@ -0,0 +1,17 @@
1
+ import type { ButtonProps } from '@nuxt/ui';
2
+ type __VLS_Props = {
3
+ text?: string;
4
+ textColor?: ButtonProps['color'];
5
+ textClass?: string;
6
+ strokeWidth?: number;
7
+ arcs?: {
8
+ percent?: number;
9
+ color?: ButtonProps['color'];
10
+ }[];
11
+ };
12
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
13
+ textColor: string | number | symbol;
14
+ strokeWidth: number;
15
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import type { RequestResult } from '#v/types';
2
+ type __VLS_Props = {
3
+ ids: number[];
4
+ onDelete: ((ids: number[]) => Promise<{
5
+ data: globalThis.Ref<RequestResult<any>>;
6
+ }> | undefined) | undefined | null;
7
+ };
8
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ close: (args_0: boolean) => any;
10
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
11
+ onClose?: ((args_0: boolean) => any) | undefined;
12
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
@@ -0,0 +1,57 @@
1
+ <script setup>
2
+ import { useSubmitting } from "#v/composables/useBoolean";
3
+ const props = defineProps({
4
+ ids: { type: Array, required: true },
5
+ onDelete: { type: [Function, null], required: true, skipCheck: true }
6
+ });
7
+ const emit = defineEmits(["close"]);
8
+ const { submitting, startSubmitting, endSubmitting } = useSubmitting();
9
+ async function onSubmit(e) {
10
+ if (!props.onDelete) return;
11
+ e.preventDefault();
12
+ try {
13
+ startSubmitting();
14
+ const { data } = await props.onDelete(props.ids);
15
+ if (!data.value.error) {
16
+ emit("close", true);
17
+ }
18
+ } finally {
19
+ endSubmitting();
20
+ }
21
+ }
22
+ </script>
23
+
24
+ <template>
25
+ <UModal
26
+ title="请确认是否删除已选数据"
27
+ description="删除后数据将无法恢复,请谨慎操作"
28
+ :close="{ onClick: () => emit('close', false) }"
29
+ :dismissible="false"
30
+ >
31
+ <UButton
32
+ color="error"
33
+ variant="soft"
34
+ icon="i-lucide-trash-2"
35
+ >
36
+ 删除
37
+ </UButton>
38
+ <template #footer>
39
+ <div class="flex justify-end gap-2">
40
+ <UButton
41
+ label="取消"
42
+ color="neutral"
43
+ variant="subtle"
44
+ @click="emit('close', false)"
45
+ />
46
+ <UButton
47
+ :label="`\u5220\u9664 ${props.ids.length} \u6761\u6570\u636E`"
48
+ color="error"
49
+ variant="solid"
50
+ icon="i-lucide-trash"
51
+ :loading="submitting"
52
+ @click="onSubmit"
53
+ />
54
+ </div>
55
+ </template>
56
+ </UModal>
57
+ </template>
@@ -0,0 +1,14 @@
1
+ import type { RequestResult } from '#v/types';
2
+ type __VLS_Props = {
3
+ ids: number[];
4
+ onDelete: ((ids: number[]) => Promise<{
5
+ data: globalThis.Ref<RequestResult<any>>;
6
+ }> | undefined) | undefined | null;
7
+ };
8
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ close: (args_0: boolean) => any;
10
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
11
+ onClose?: ((args_0: boolean) => any) | undefined;
12
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
@@ -0,0 +1,25 @@
1
+ import type { DndProps } from '#v/types';
2
+ declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<(DndProps<T> & {
4
+ modelValue?: T[];
5
+ }) & {
6
+ "onUpdate:modelValue"?: ((value: T[]) => any) | undefined;
7
+ }> & (typeof globalThis extends {
8
+ __VLS_PROPS_FALLBACK: infer P;
9
+ } ? P : {});
10
+ expose: (exposed: {}) => void;
11
+ attrs: any;
12
+ slots: {
13
+ default?: (props: {}) => any;
14
+ };
15
+ emit: (event: "update:modelValue", value: T[]) => void;
16
+ }>) => import("vue").VNode & {
17
+ __ctx?: Awaited<typeof __VLS_setup>;
18
+ };
19
+ declare const _default: typeof __VLS_export;
20
+ export default _default;
21
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
22
+ [K in keyof T]: T[K];
23
+ } : {
24
+ [K in keyof T as K]: T[K];
25
+ }) & {};
@@ -0,0 +1,47 @@
1
+ <script setup>
2
+ import { computed } from "vue";
3
+ import { VueDraggable } from "vue-draggable-plus";
4
+ import { isEmptyString } from "#v/utils";
5
+ import { useApp } from "#v/composables/useApp";
6
+ const { sort = true, forceFallback = true, chosenClass } = defineProps({
7
+ handle: { type: String, required: false },
8
+ group: { type: null, required: false },
9
+ sort: { type: Boolean, required: false },
10
+ chosenClass: { type: String, required: false },
11
+ dragClass: { type: String, required: false },
12
+ ghostClass: { type: String, required: false },
13
+ forceFallback: { type: Boolean, required: false },
14
+ clone: { type: Function, required: false },
15
+ onAdd: { type: Function, required: false },
16
+ onEnd: { type: Function, required: false }
17
+ });
18
+ const model = defineModel({ type: Array, ...{
19
+ default: () => []
20
+ } });
21
+ const coalesceChosenClass = computed(() => {
22
+ return !isEmptyString(chosenClass) ? chosenClass : useApp().isMobile.value ? "bg-muted" : "";
23
+ });
24
+ </script>
25
+
26
+ <template>
27
+ <vue-draggable
28
+ v-model="model"
29
+ :animation="200"
30
+ :handle="handle"
31
+ :group="group"
32
+ :chosen-class="coalesceChosenClass"
33
+ :force-fallback="forceFallback"
34
+ :delay="useApp().isMobile.value ? 100 : 0"
35
+ :sort="sort"
36
+ :clone="clone"
37
+ class="select-none"
38
+ @add="onAdd"
39
+ @end="onEnd"
40
+ >
41
+ <slot />
42
+ </vue-draggable>
43
+ </template>
44
+
45
+ <style>
46
+ .sortable-drag{opacity:1!important}.sortable-ghost{opacity:.2!important}
47
+ </style>
@@ -0,0 +1,25 @@
1
+ import type { DndProps } from '#v/types';
2
+ declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<(DndProps<T> & {
4
+ modelValue?: T[];
5
+ }) & {
6
+ "onUpdate:modelValue"?: ((value: T[]) => any) | undefined;
7
+ }> & (typeof globalThis extends {
8
+ __VLS_PROPS_FALLBACK: infer P;
9
+ } ? P : {});
10
+ expose: (exposed: {}) => void;
11
+ attrs: any;
12
+ slots: {
13
+ default?: (props: {}) => any;
14
+ };
15
+ emit: (event: "update:modelValue", value: T[]) => void;
16
+ }>) => import("vue").VNode & {
17
+ __ctx?: Awaited<typeof __VLS_setup>;
18
+ };
19
+ declare const _default: typeof __VLS_export;
20
+ export default _default;
21
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
22
+ [K in keyof T]: T[K];
23
+ } : {
24
+ [K in keyof T as K]: T[K];
25
+ }) & {};
@@ -0,0 +1,19 @@
1
+ interface Props {
2
+ option: any;
3
+ useBar?: boolean;
4
+ usePie?: boolean;
5
+ useLine?: boolean;
6
+ useGrid?: boolean;
7
+ colors?: string[];
8
+ }
9
+ declare const __VLS_export: import("vue").DefineComponent<Props, {
10
+ downloadImage: (filenamePrefix?: string) => void;
11
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
12
+ useBar: boolean;
13
+ usePie: boolean;
14
+ useLine: boolean;
15
+ useGrid: boolean;
16
+ colors: string[];
17
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
@@ -0,0 +1,72 @@
1
+ <script setup>
2
+ import { ref, computed, useTemplateRef, watch } from "vue";
3
+ import { useColorMode } from "#imports";
4
+ import { useTheme } from "#v/composables/useTheme";
5
+ import { useApp } from "#v/composables/useApp";
6
+ import { useEChart } from "#v/composables/useEChart";
7
+ import { use } from "echarts/core";
8
+ import { CanvasRenderer } from "echarts/renderers";
9
+ import { BarChart, PieChart, LineChart } from "echarts/charts";
10
+ import {
11
+ TitleComponent,
12
+ TooltipComponent,
13
+ LegendComponent,
14
+ GridComponent,
15
+ ToolboxComponent
16
+ } from "echarts/components";
17
+ import VChart from "vue-echarts";
18
+ const props = defineProps({
19
+ option: { type: null, required: true },
20
+ useBar: { type: Boolean, required: false, default: false },
21
+ usePie: { type: Boolean, required: false, default: false },
22
+ useLine: { type: Boolean, required: false, default: false },
23
+ useGrid: { type: Boolean, required: false, default: false },
24
+ colors: { type: Array, required: false, default: () => [] }
25
+ });
26
+ const chartsToUse = [CanvasRenderer];
27
+ const componentsToUse = [
28
+ TitleComponent,
29
+ TooltipComponent,
30
+ ToolboxComponent,
31
+ LegendComponent
32
+ ];
33
+ if (props.useGrid) {
34
+ componentsToUse.push(GridComponent);
35
+ }
36
+ if (props.useBar) {
37
+ chartsToUse.push(BarChart);
38
+ }
39
+ if (props.usePie) {
40
+ chartsToUse.push(PieChart);
41
+ }
42
+ if (props.useLine) {
43
+ chartsToUse.push(LineChart);
44
+ }
45
+ use([...chartsToUse, ...componentsToUse]);
46
+ const theme = useTheme();
47
+ const colorMode = useColorMode();
48
+ const app = useApp();
49
+ const echart = useEChart();
50
+ const finalOption = ref({});
51
+ const updateOption = () => {
52
+ finalOption.value = echart.mergeOption(props.option);
53
+ };
54
+ const chartRef = useTemplateRef("v-chart");
55
+ watch(
56
+ [() => props.option, colorMode, () => theme.primary.value, () => theme.neutral.value, () => app.appConfig.value.radius],
57
+ () => setTimeout(() => {
58
+ updateOption();
59
+ }, 1),
60
+ { immediate: true, deep: true }
61
+ );
62
+ defineExpose({
63
+ downloadImage: (filenamePrefix) => {
64
+ if (!chartRef.value) return;
65
+ echart.exportChartAsImage(chartRef.value, { filename: filenamePrefix });
66
+ }
67
+ });
68
+ </script>
69
+
70
+ <template>
71
+ <v-chart ref="v-chart" :option="finalOption" autoresize />
72
+ </template>
@@ -0,0 +1,19 @@
1
+ interface Props {
2
+ option: any;
3
+ useBar?: boolean;
4
+ usePie?: boolean;
5
+ useLine?: boolean;
6
+ useGrid?: boolean;
7
+ colors?: string[];
8
+ }
9
+ declare const __VLS_export: import("vue").DefineComponent<Props, {
10
+ downloadImage: (filenamePrefix?: string) => void;
11
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
12
+ useBar: boolean;
13
+ usePie: boolean;
14
+ useLine: boolean;
15
+ useGrid: boolean;
16
+ colors: string[];
17
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
@@ -0,0 +1,12 @@
1
+ import type { EmptyProps } from '@nuxt/ui';
2
+ type __VLS_Props = EmptyProps & {
3
+ extraClass?: string;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
6
+ title: string;
7
+ variant: string | number | symbol;
8
+ icon: import("@nuxt/ui").IconProps["name"];
9
+ size: string | number | symbol;
10
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;