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
@@ -0,0 +1,26 @@
1
+ import type { ButtonProps } from '@nuxt/ui';
2
+ import type { DateRange, DateValue } from 'reka-ui';
3
+ import type { DateShortcut } from '#v/types';
4
+ type __VLS_Props = {
5
+ size?: ButtonProps['size'];
6
+ loading?: ButtonProps['loading'];
7
+ range?: boolean;
8
+ placeholder?: string;
9
+ timeUnit?: Const.Time.TimeUnit;
10
+ leadingIcon?: ButtonProps['leadingIcon'];
11
+ shortcuts?: DateShortcut[];
12
+ peerButtons?: ButtonProps[];
13
+ };
14
+ type __VLS_ModelProps = {
15
+ 'modelValue'?: DateValue | DateValue[] | DateRange | null | undefined;
16
+ };
17
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
18
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
19
+ open: () => void;
20
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
21
+ "update:modelValue": (value: DateValue | DateRange | DateValue[] | null | undefined) => any;
22
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
23
+ "onUpdate:modelValue"?: ((value: DateValue | DateRange | DateValue[] | null | undefined) => any) | undefined;
24
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
25
+ declare const _default: typeof __VLS_export;
26
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import type { EdgeProps } from '@vue-flow/core';
2
+ type __VLS_Props = EdgeProps;
3
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
4
+ declare const _default: typeof __VLS_export;
5
+ export default _default;
@@ -0,0 +1,110 @@
1
+ <script setup>
2
+ import { computed } from "vue";
3
+ import { useFlowStyles } from "#v/composables/flow/useFlowStyles";
4
+ import { EdgeLabelRenderer, getSmoothStepPath, BaseEdge } from "@vue-flow/core";
5
+ const props = defineProps({
6
+ id: { type: String, required: true },
7
+ sourceNode: { type: Object, required: true },
8
+ targetNode: { type: Object, required: true },
9
+ source: { type: String, required: true },
10
+ target: { type: String, required: true },
11
+ type: { type: null, required: true },
12
+ label: { type: [String, Object, Function], required: false },
13
+ style: { type: Object, required: false },
14
+ selected: { type: Boolean, required: false },
15
+ sourcePosition: { type: String, required: true },
16
+ targetPosition: { type: String, required: true },
17
+ sourceHandleId: { type: String, required: false },
18
+ targetHandleId: { type: String, required: false },
19
+ animated: { type: Boolean, required: false },
20
+ updatable: { type: Boolean, required: false },
21
+ markerStart: { type: String, required: true },
22
+ markerEnd: { type: String, required: true },
23
+ curvature: { type: Number, required: false },
24
+ interactionWidth: { type: Number, required: false },
25
+ data: { type: null, required: true },
26
+ events: { type: void 0, required: true },
27
+ labelStyle: { type: Object, required: false },
28
+ labelShowBg: { type: Boolean, required: false },
29
+ labelBgStyle: { type: Object, required: false },
30
+ labelBgPadding: { type: Array, required: false },
31
+ labelBgBorderRadius: { type: Number, required: false },
32
+ sourceX: { type: Number, required: true },
33
+ sourceY: { type: Number, required: true },
34
+ targetX: { type: Number, required: true },
35
+ targetY: { type: Number, required: true }
36
+ });
37
+ const path = computed(() => getSmoothStepPath(props));
38
+ const flowStyles = useFlowStyles();
39
+ const { edgeMarkerStart, edgeMarkerEnd } = flowStyles;
40
+ const customMarkerEnd = computed(() => edgeMarkerEnd.value ? `url(#custom-arrow-end-${props.id})` : void 0);
41
+ const customMarkerStart = computed(() => edgeMarkerStart.value ? `url(#custom-arrow-start-${props.id})` : void 0);
42
+ const strokeColor = computed(
43
+ () => props.selected ? "var(--ui-primary)" : "var(--ui-text-dimmed)"
44
+ );
45
+ const edgeStyle = computed(() => ({
46
+ ...props.style,
47
+ stroke: strokeColor.value
48
+ }));
49
+ </script>
50
+
51
+ <template>
52
+ <svg style="position: absolute; width: 0; height: 0">
53
+ <defs>
54
+ <!-- 自定义箭头 - 终点 -->
55
+ <marker
56
+ :id="`custom-arrow-end-${id}`"
57
+ viewBox="-4 -4 14 18"
58
+ refX="7"
59
+ refY="5"
60
+ markerWidth="5"
61
+ markerHeight="5"
62
+ orient="auto-start-reverse"
63
+ >
64
+ <path
65
+ d="M -4 -4 L 10 5 L -4 14 z"
66
+ :fill="strokeColor"
67
+ />
68
+ </marker>
69
+
70
+ <!-- 自定义箭头 - 起点 -->
71
+ <marker
72
+ :id="`custom-arrow-start-${id}`"
73
+ viewBox="0 -4 14 18"
74
+ refX="3"
75
+ refY="5"
76
+ markerWidth="5"
77
+ markerHeight="5"
78
+ orient="auto"
79
+ >
80
+ <path
81
+ d="M 14 -4 L 0 5 L 14 14 z"
82
+ :fill="strokeColor"
83
+ />
84
+ </marker>
85
+ </defs>
86
+ </svg>
87
+
88
+ <BaseEdge
89
+ :id="id"
90
+ :style="edgeStyle"
91
+ :path="path[0]"
92
+ :marker-end="customMarkerEnd"
93
+ :marker-start="customMarkerStart"
94
+ />
95
+ <EdgeLabelRenderer>
96
+ <div
97
+ v-if="label"
98
+ :style="{
99
+ position: 'absolute',
100
+ transform: `translate(-50%, -50%) translate(${path[1]}px,${path[2]}px)`,
101
+ pointerEvents: 'all'
102
+ }"
103
+ class="nodrag nopan"
104
+ >
105
+ <div class="bg-background border border-default rounded px-2 py-1 text-xs shadow-sm">
106
+ {{ label }}
107
+ </div>
108
+ </div>
109
+ </EdgeLabelRenderer>
110
+ </template>
@@ -0,0 +1,5 @@
1
+ import type { EdgeProps } from '@vue-flow/core';
2
+ type __VLS_Props = EdgeProps;
3
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
4
+ declare const _default: typeof __VLS_export;
5
+ export default _default;
@@ -0,0 +1,8 @@
1
+ type __VLS_Props = {
2
+ data: any;
3
+ hoveredNodeId: string | null;
4
+ selected?: boolean;
5
+ };
6
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
@@ -0,0 +1,79 @@
1
+ <script setup>
2
+ import { ref, computed, onMounted, onBeforeUnmount } from "vue";
3
+ import { Handle } from "@vue-flow/core";
4
+ import { FLOW_HANDLES } from "#v/constants";
5
+ const props = defineProps({
6
+ data: { type: null, required: true },
7
+ hoveredNodeId: { type: [String, null], required: true },
8
+ selected: { type: Boolean, required: false }
9
+ });
10
+ const nodeRef = ref(null);
11
+ const mousePosition = ref({ x: 0, y: 0 });
12
+ const PROXIMITY_THRESHOLD = 50;
13
+ const borderColor = computed(
14
+ () => props.selected ? "var(--ui-primary)" : "var(--ui-border-default)"
15
+ );
16
+ const isNearby = computed(() => {
17
+ if (!nodeRef.value) return false;
18
+ const rect = nodeRef.value.getBoundingClientRect();
19
+ const mouseX = mousePosition.value.x;
20
+ const mouseY = mousePosition.value.y;
21
+ const dx = Math.max(rect.left - mouseX, 0, mouseX - rect.right);
22
+ const dy = Math.max(rect.top - mouseY, 0, mouseY - rect.bottom);
23
+ const distance = Math.sqrt(dx * dx + dy * dy);
24
+ return distance <= PROXIMITY_THRESHOLD;
25
+ });
26
+ const isHovered = computed(() => props.hoveredNodeId === String(props.data.id));
27
+ const showHandles = computed(() => isHovered.value || isNearby.value);
28
+ const handleGlobalMouseMove = (e) => {
29
+ mousePosition.value = { x: e.clientX, y: e.clientY };
30
+ };
31
+ onMounted(() => {
32
+ window.addEventListener("mousemove", handleGlobalMouseMove);
33
+ });
34
+ onBeforeUnmount(() => {
35
+ window.removeEventListener("mousemove", handleGlobalMouseMove);
36
+ });
37
+ </script>
38
+
39
+ <template>
40
+ <div
41
+ ref="nodeRef"
42
+ class="bg-background border rounded-md px-3 py-2 relative flex"
43
+ :style="{
44
+ width: data.width ? `${data.width}px` : '128px',
45
+ height: data.height ? `${data.height}px` : 'auto',
46
+ minWidth: '128px',
47
+ borderWidth: data.borderWidth ? `${data.borderWidth}px` : '2px',
48
+ borderStyle: 'solid',
49
+ borderColor
50
+ }"
51
+ @mouseenter="data.onMouseEnter?.()"
52
+ @mouseleave="data.onMouseLeave?.()"
53
+ @mousemove="(e) => data.onMouseMove?.(e, e.currentTarget)"
54
+ @dblclick="data.onEdit?.()"
55
+ >
56
+ <!-- 连接点 - 可以作为 source 或 target -->
57
+ <Handle
58
+ v-for="handle in FLOW_HANDLES"
59
+ :id="`${handle.id}`"
60
+ :key="`${handle.id}`"
61
+ type="source"
62
+ :position="handle.position"
63
+ :style="{
64
+ left: handle.offsetPercent?.x !== void 0 ? `${handle.offsetPercent.x}%` : void 0,
65
+ top: handle.offsetPercent?.y !== void 0 ? `${handle.offsetPercent.y}%` : void 0,
66
+ pointerEvents: 'all',
67
+ opacity: showHandles ? 1 : 0,
68
+ transition: 'opacity 0.2s',
69
+ width: '6px',
70
+ height: '6px'
71
+ }"
72
+ @mousedown.stop
73
+ />
74
+
75
+ <div class="flex items-center justify-center gap-2 w-full">
76
+ <span class="text-sm font-medium">{{ data.name }}</span>
77
+ </div>
78
+ </div>
79
+ </template>
@@ -0,0 +1,8 @@
1
+ type __VLS_Props = {
2
+ data: any;
3
+ hoveredNodeId: string | null;
4
+ selected?: boolean;
5
+ };
6
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
@@ -0,0 +1,7 @@
1
+ type __VLS_Props = {
2
+ nodeCount: number;
3
+ edgeCount: number;
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<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,17 @@
1
+ <script setup>
2
+ defineProps({
3
+ nodeCount: { type: Number, required: true },
4
+ edgeCount: { type: Number, required: true }
5
+ });
6
+ </script>
7
+
8
+ <template>
9
+ <div class="bg-default rounded-md p-2 flex flex-col items-center gap-1 shadow-sm">
10
+ <UBadge variant="outline" color="neutral" icon="i-lucide-circle-dot">
11
+ 节点数 {{ nodeCount }}
12
+ </UBadge>
13
+ <UBadge variant="outline" color="neutral" icon="i-lucide-arrow-right-left">
14
+ 连接数 {{ edgeCount }}
15
+ </UBadge>
16
+ </div>
17
+ </template>
@@ -0,0 +1,7 @@
1
+ type __VLS_Props = {
2
+ nodeCount: number;
3
+ edgeCount: number;
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<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,14 @@
1
+ type __VLS_Props = {
2
+ onAddNode?: () => void;
3
+ edgeStrokeWidth?: number;
4
+ edgeMarkerStart?: boolean;
5
+ edgeMarkerEnd?: boolean;
6
+ nodeBorderWidth?: number;
7
+ onEdgeStrokeWidthChange?: (width: number) => void;
8
+ onToggleEdgeMarkerStart?: () => void;
9
+ onToggleEdgeMarkerEnd?: () => void;
10
+ onNodeBorderWidthChange?: (width: number) => void;
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<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
@@ -0,0 +1,113 @@
1
+ <script setup>
2
+ import ButtonTheme from "#v/components/button/Theme.vue";
3
+ defineProps({
4
+ onAddNode: { type: Function, required: false },
5
+ edgeStrokeWidth: { type: Number, required: false },
6
+ edgeMarkerStart: { type: Boolean, required: false },
7
+ edgeMarkerEnd: { type: Boolean, required: false },
8
+ nodeBorderWidth: { type: Number, required: false },
9
+ onEdgeStrokeWidthChange: { type: Function, required: false },
10
+ onToggleEdgeMarkerStart: { type: Function, required: false },
11
+ onToggleEdgeMarkerEnd: { type: Function, required: false },
12
+ onNodeBorderWidthChange: { type: Function, required: false }
13
+ });
14
+ </script>
15
+
16
+ <template>
17
+ <div class="bg-default rounded-md p-1.5 flex gap-1.5 shadow-sm">
18
+ <!-- 添加节点 -->
19
+ <UButton
20
+ label="节点"
21
+ icon="i-lucide-circle-plus"
22
+ size="sm"
23
+ variant="subtle"
24
+ @click="onAddNode?.()"
25
+ />
26
+
27
+ <!-- 样式设置 -->
28
+ <UPopover :content="{ side: 'top' }" :ui="{ content: 'px-6 py-4 flex flex-col gap-4' }">
29
+ <UButton
30
+ label="设置"
31
+ icon="i-lucide-settings"
32
+ size="sm"
33
+ variant="subtle"
34
+ />
35
+ <template #content>
36
+ <fieldset>
37
+ <legend class="text-[11px] leading-none font-semibold mb-2">
38
+ 连接线粗细
39
+ </legend>
40
+
41
+ <div class="grid grid-cols-5 gap-2 -mx-2">
42
+ <ButtonTheme
43
+ v-for="width in [1, 2, 3, 4, 5]"
44
+ :key="width"
45
+ :label="width.toString()"
46
+ :selected="edgeStrokeWidth === width"
47
+ class="justify-center min-w-10"
48
+ @click="onEdgeStrokeWidthChange?.(width)"
49
+ >
50
+ <template #leading>
51
+ <div class="flex flex-col gap-px">
52
+ <div
53
+ v-for="i in width"
54
+ :key="i"
55
+ class="w-4 h-0.5 bg-current rounded-full"
56
+ />
57
+ </div>
58
+ </template>
59
+ </ButtonTheme>
60
+ </div>
61
+ </fieldset>
62
+
63
+ <fieldset>
64
+ <legend class="text-[11px] leading-none font-semibold mb-2">
65
+ 连接线箭头
66
+ </legend>
67
+
68
+ <div class="grid grid-cols-2 gap-2 -mx-2">
69
+ <ButtonTheme
70
+ label="起点"
71
+ :icon="edgeMarkerStart ? 'i-lucide-arrow-left' : 'i-lucide-minus'"
72
+ :selected="edgeMarkerStart"
73
+ @click="onToggleEdgeMarkerStart?.()"
74
+ />
75
+ <ButtonTheme
76
+ label="终点"
77
+ :icon="edgeMarkerEnd ? 'i-lucide-arrow-right' : 'i-lucide-minus'"
78
+ :selected="edgeMarkerEnd"
79
+ @click="onToggleEdgeMarkerEnd?.()"
80
+ />
81
+ </div>
82
+ </fieldset>
83
+
84
+ <fieldset>
85
+ <legend class="text-[11px] leading-none font-semibold mb-2">
86
+ 节点边框粗细
87
+ </legend>
88
+
89
+ <div class="grid grid-cols-5 gap-2 -mx-2">
90
+ <ButtonTheme
91
+ v-for="width in [1, 2, 3, 4, 5]"
92
+ :key="width"
93
+ :label="width.toString()"
94
+ :selected="nodeBorderWidth === width"
95
+ class="justify-center"
96
+ @click="onNodeBorderWidthChange?.(width)"
97
+ >
98
+ <template #leading>
99
+ <div class="flex flex-col gap-px">
100
+ <div
101
+ v-for="i in width"
102
+ :key="i"
103
+ class="w-4 h-0.5 bg-current rounded-full"
104
+ />
105
+ </div>
106
+ </template>
107
+ </ButtonTheme>
108
+ </div>
109
+ </fieldset>
110
+ </template>
111
+ </UPopover>
112
+ </div>
113
+ </template>
@@ -0,0 +1,14 @@
1
+ type __VLS_Props = {
2
+ onAddNode?: () => void;
3
+ edgeStrokeWidth?: number;
4
+ edgeMarkerStart?: boolean;
5
+ edgeMarkerEnd?: boolean;
6
+ nodeBorderWidth?: number;
7
+ onEdgeStrokeWidthChange?: (width: number) => void;
8
+ onToggleEdgeMarkerStart?: () => void;
9
+ onToggleEdgeMarkerEnd?: () => void;
10
+ onNodeBorderWidthChange?: (width: number) => void;
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<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
@@ -0,0 +1,19 @@
1
+ import type { CreateModalFormTemplatePropsWithApi } from '#v/types';
2
+ declare const __VLS_export: <T extends Model.BaseModel>(__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<CreateModalFormTemplatePropsWithApi<T>> & (typeof globalThis extends {
4
+ __VLS_PROPS_FALLBACK: infer P;
5
+ } ? P : {});
6
+ expose: (exposed: {}) => void;
7
+ attrs: any;
8
+ slots: {};
9
+ emit: {};
10
+ }>) => import("vue").VNode & {
11
+ __ctx?: Awaited<typeof __VLS_setup>;
12
+ };
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
15
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
16
+ [K in keyof T]: T[K];
17
+ } : {
18
+ [K in keyof T as K]: T[K];
19
+ }) & {};
@@ -0,0 +1,36 @@
1
+ <script setup>
2
+ import { toRef } from "vue";
3
+ import { useFormSubmission, useFormValues } from "#v/composables/useForm";
4
+ import FormCreateModalTemplate from "./index.vue";
5
+ const props = defineProps({
6
+ apiGroup: { type: Function, required: true },
7
+ valuePruneFn: { type: Function, required: false },
8
+ defaultModelValue: { type: Object, required: false },
9
+ onSave: { type: Function, required: true },
10
+ title: { type: String, required: true },
11
+ description: { type: String, required: false },
12
+ fields: { type: Array, required: true },
13
+ onClose: { type: Function, required: true },
14
+ modelValue: { type: Object, required: true },
15
+ onUpdateModelValue: { type: Function, required: false }
16
+ });
17
+ const { oldValues, newValues } = useFormValues(toRef(props.modelValue), props.defaultModelValue);
18
+ const { onSubmit } = useFormSubmission(
19
+ toRef(oldValues),
20
+ toRef(newValues),
21
+ props.onClose,
22
+ props.onSave,
23
+ props.apiGroup
24
+ );
25
+ </script>
26
+
27
+ <template>
28
+ <FormCreateModalTemplate
29
+ v-model:model-value="newValues"
30
+ :title="title"
31
+ :description="description"
32
+ :on-close="onClose"
33
+ :on-submit="onSubmit"
34
+ :fields="fields"
35
+ />
36
+ </template>
@@ -0,0 +1,19 @@
1
+ import type { CreateModalFormTemplatePropsWithApi } from '#v/types';
2
+ declare const __VLS_export: <T extends Model.BaseModel>(__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<CreateModalFormTemplatePropsWithApi<T>> & (typeof globalThis extends {
4
+ __VLS_PROPS_FALLBACK: infer P;
5
+ } ? P : {});
6
+ expose: (exposed: {}) => void;
7
+ attrs: any;
8
+ slots: {};
9
+ emit: {};
10
+ }>) => import("vue").VNode & {
11
+ __ctx?: Awaited<typeof __VLS_setup>;
12
+ };
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
15
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
16
+ [K in keyof T]: T[K];
17
+ } : {
18
+ [K in keyof T as K]: T[K];
19
+ }) & {};
@@ -0,0 +1,19 @@
1
+ import type { CreateModalFormTemplateProps } from '#v/types';
2
+ declare const __VLS_export: <T extends Model.BaseModel>(__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<CreateModalFormTemplateProps<T>> & (typeof globalThis extends {
4
+ __VLS_PROPS_FALLBACK: infer P;
5
+ } ? P : {});
6
+ expose: (exposed: {}) => void;
7
+ attrs: any;
8
+ slots: {};
9
+ emit: {};
10
+ }>) => import("vue").VNode & {
11
+ __ctx?: Awaited<typeof __VLS_setup>;
12
+ };
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
15
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
16
+ [K in keyof T]: T[K];
17
+ } : {
18
+ [K in keyof T as K]: T[K];
19
+ }) & {};
@@ -0,0 +1,75 @@
1
+ <script setup>
2
+ import { computed, useTemplateRef } from "vue";
3
+ import { useSubmitting } from "#v/composables/useBoolean";
4
+ import Form from "../index.vue";
5
+ const props = defineProps({
6
+ title: { type: String, required: true },
7
+ description: { type: String, required: false },
8
+ onClose: { type: Function, required: true },
9
+ onSubmit: { type: Function, required: true },
10
+ fields: { type: Array, required: true },
11
+ modelValue: { type: Object, required: true },
12
+ onUpdateModelValue: { type: Function, required: false },
13
+ rowKey: { type: null, required: false, default: "id" },
14
+ fullscreen: { type: Boolean, required: false }
15
+ });
16
+ const form = useTemplateRef("form");
17
+ const action = computed(() => props.modelValue[props.rowKey] === 0 ? "\u521B\u5EFA" : "\u66F4\u65B0");
18
+ const titleWithAction = computed(() => `${action.value}${props.title}`);
19
+ const descWithAction = computed(() => props.description ?? `\u8BF7${action.value}${props.title}`);
20
+ const submitIcon = computed(() => props.modelValue[props.rowKey] === 0 ? "i-lucide-clipboard-plus" : "i-lucide-clipboard-pen-line");
21
+ const { submitting, startSubmitting, endSubmitting } = useSubmitting();
22
+ async function onSubmitWithValidation(e) {
23
+ e.preventDefault();
24
+ e.stopPropagation();
25
+ try {
26
+ await form.value?.validate?.();
27
+ } catch {
28
+ return;
29
+ }
30
+ try {
31
+ startSubmitting();
32
+ await props.onSubmit();
33
+ } finally {
34
+ endSubmitting();
35
+ }
36
+ }
37
+ </script>
38
+
39
+ <template>
40
+ <UModal
41
+ :title="titleWithAction"
42
+ :description="descWithAction"
43
+ :close="{ onClick: () => props.onClose(false) }"
44
+ :dismissible="false"
45
+ :fullscreen="fullscreen"
46
+ >
47
+ <template #body>
48
+ <Form
49
+ ref="form"
50
+ :fields="fields"
51
+ :loading="submitting"
52
+ :model-value="modelValue"
53
+ @trigger-submit="onSubmitWithValidation"
54
+ @update-model-value="onUpdateModelValue"
55
+ />
56
+ </template>
57
+ <template #footer>
58
+ <UButton
59
+ label="取消"
60
+ color="neutral"
61
+ variant="subtle"
62
+ icon="i-lucide-x"
63
+ @click="props.onClose(false)"
64
+ />
65
+ <UButton
66
+ :label="action"
67
+ color="primary"
68
+ variant="solid"
69
+ :icon="submitIcon"
70
+ :loading="submitting"
71
+ @click="onSubmitWithValidation"
72
+ />
73
+ </template>
74
+ </UModal>
75
+ </template>
@@ -0,0 +1,19 @@
1
+ import type { CreateModalFormTemplateProps } from '#v/types';
2
+ declare const __VLS_export: <T extends Model.BaseModel>(__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<CreateModalFormTemplateProps<T>> & (typeof globalThis extends {
4
+ __VLS_PROPS_FALLBACK: infer P;
5
+ } ? P : {});
6
+ expose: (exposed: {}) => void;
7
+ attrs: any;
8
+ slots: {};
9
+ emit: {};
10
+ }>) => import("vue").VNode & {
11
+ __ctx?: Awaited<typeof __VLS_setup>;
12
+ };
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
15
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
16
+ [K in keyof T]: T[K];
17
+ } : {
18
+ [K in keyof T as K]: T[K];
19
+ }) & {};
@@ -0,0 +1,23 @@
1
+ import type { VFormFieldAsyncSelectProps } from '#v/types';
2
+ declare const __VLS_export: <T extends Record<string, any>>(__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<(VFormFieldAsyncSelectProps<T> & {
4
+ modelValue: T[] | undefined;
5
+ }) & {
6
+ "onUpdate:modelValue"?: ((value: T[] | undefined) => any) | undefined;
7
+ }> & (typeof globalThis extends {
8
+ __VLS_PROPS_FALLBACK: infer P;
9
+ } ? P : {});
10
+ expose: (exposed: {}) => void;
11
+ attrs: any;
12
+ slots: {};
13
+ emit: (event: "update:modelValue", value: T[] | undefined) => void;
14
+ }>) => import("vue").VNode & {
15
+ __ctx?: Awaited<typeof __VLS_setup>;
16
+ };
17
+ declare const _default: typeof __VLS_export;
18
+ export default _default;
19
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
20
+ [K in keyof T]: T[K];
21
+ } : {
22
+ [K in keyof T as K]: T[K];
23
+ }) & {};