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,83 @@
1
+ import { ref, computed } from "vue";
2
+ import { breakpointsTailwind, createSharedComposable, useBreakpoints, useLocalStorage } from "@vueuse/core";
3
+ import { StorageKey } from "#v/types";
4
+ import { cloneJson } from "#v/utils";
5
+ export const defaultAppSettings = {
6
+ headerHeight: 48,
7
+ tabHeight: 40,
8
+ siderMaxWidth: 20,
9
+ siderMinWidth: 10,
10
+ siderCollapsed: false,
11
+ siderCollapsedWidth: 5,
12
+ locale: "zh-CN",
13
+ pageAnimate: true,
14
+ pageAnimateMode: "fade-slide"
15
+ };
16
+ const _useApp = () => {
17
+ const themeSettingsVisible = ref(false);
18
+ const changelogVisible = ref(false);
19
+ const appConfig = useLocalStorage(StorageKey.APP, defaultAppSettings);
20
+ const resetAppConfig = () => appConfig.value = cloneJson(defaultAppSettings);
21
+ const updatePrimaryColor = (color) => {
22
+ appConfig.value = { ...appConfig.value, primary: color, blackAsPrimary: false };
23
+ };
24
+ const updateBlackAsPrimary = (value) => {
25
+ appConfig.value = { ...appConfig.value, blackAsPrimary: value };
26
+ };
27
+ const updateNeutralColor = (color) => {
28
+ appConfig.value = { ...appConfig.value, neutral: color };
29
+ console.log("Updated neutral color to", appConfig.value);
30
+ };
31
+ const updateRadius = (radius) => {
32
+ appConfig.value = { ...appConfig.value, radius };
33
+ };
34
+ const updateLocale = (locale) => {
35
+ appConfig.value = { ...appConfig.value, locale };
36
+ };
37
+ const keepalive = computed({
38
+ get() {
39
+ return appConfig.value.keepalive ?? true;
40
+ },
41
+ set(value) {
42
+ appConfig.value = { ...appConfig.value, keepalive: value };
43
+ }
44
+ });
45
+ const setKeepalive = (value) => keepalive.value = value;
46
+ const breakpoints = useBreakpoints(breakpointsTailwind);
47
+ const isMobile = breakpoints.smaller("sm");
48
+ const isSmallerThanMd = breakpoints.smaller("md");
49
+ const redirectConfirm = ref(false);
50
+ const redirectConfirmTitle = ref("");
51
+ const redirectConfirmMsg = ref("");
52
+ const askRedirectConfirmBeforeLeave = (title, msg) => {
53
+ redirectConfirm.value = true;
54
+ redirectConfirmTitle.value = title;
55
+ redirectConfirmMsg.value = msg;
56
+ };
57
+ const clearRedirectConfirm = () => {
58
+ redirectConfirm.value = false;
59
+ redirectConfirmTitle.value = "";
60
+ redirectConfirmMsg.value = "";
61
+ };
62
+ return {
63
+ themeSettingsVisible,
64
+ changelogVisible,
65
+ appConfig,
66
+ resetAppConfig,
67
+ updatePrimaryColor,
68
+ updateBlackAsPrimary,
69
+ updateNeutralColor,
70
+ updateRadius,
71
+ updateLocale,
72
+ keepalive,
73
+ setKeepalive,
74
+ isMobile,
75
+ isSmallerThanMd,
76
+ redirectConfirm,
77
+ redirectConfirmTitle,
78
+ redirectConfirmMsg,
79
+ askRedirectConfirmBeforeLeave,
80
+ clearRedirectConfirm
81
+ };
82
+ };
83
+ export const useApp = createSharedComposable(_useApp);
@@ -0,0 +1,14 @@
1
+ import type { UseFetchOptions } from 'nuxt/app';
2
+ import type { RouteLocationNormalizedLoadedGeneric } from 'vue-router';
3
+ export declare const useAuth: () => {
4
+ loginLoading: import("vue").Ref<boolean, boolean>;
5
+ isLoggedIn: any;
6
+ isUserInfoFetched: any;
7
+ loginUser: any;
8
+ loginUserRoles: any;
9
+ loginUserMenus: any;
10
+ logout: (route: RouteLocationNormalizedLoadedGeneric) => Promise<void>;
11
+ loginByUsernameAndPassword: (route: RouteLocationNormalizedLoadedGeneric, payload: Cmd.UsernamePasswordLoginPayload, redirect?: boolean) => Promise<void>;
12
+ initUserInfo: () => Promise<boolean>;
13
+ refreshToken: <T>(route: RouteLocationNormalizedLoadedGeneric, options: UseFetchOptions<T>) => Promise<UseFetchOptions<T> | null>;
14
+ };
@@ -0,0 +1,92 @@
1
+ import { StorageKey } from "#v/types";
2
+ import { isEmptyString } from "#v/utils";
3
+ import { useLocalStorage, createSharedComposable } from "@vueuse/core";
4
+ import { useAuthApi, useLoading, useLoginApi, useRouterPush } from "./index.js";
5
+ import { useToast } from "@nuxt/ui/runtime/composables/useToast.js";
6
+ const _useAuth = () => {
7
+ const { loading: loginLoading, startLoading: startLoginLoading, endLoading: endLoginLoading } = useLoading();
8
+ const { toLogin, redirectFromLogin, toSecuritySettings } = useRouterPush();
9
+ const acT = useLocalStorage(StorageKey.ACCESS_TOKEN, "");
10
+ const rfT = useLocalStorage(StorageKey.REFRESH_TOKEN, "");
11
+ const loginUser = ref();
12
+ const loginUserRoles = ref([]);
13
+ const loginUserMenus = ref([]);
14
+ const isLoggedIn = computed(() => !isEmptyString(acT.value) || !isEmptyString(rfT.value));
15
+ const isUserInfoFetched = computed(() => loginUser.value && loginUser.value.id > 0);
16
+ const logout = async (route) => {
17
+ acT.value = void 0;
18
+ rfT.value = void 0;
19
+ loginUser.value = { id: 0 };
20
+ await toLogin(route);
21
+ };
22
+ const setUserInfo = (user) => {
23
+ loginUser.value = user;
24
+ loginUserRoles.value = user?.roles ?? [];
25
+ loginUserMenus.value = user?.menus ?? [];
26
+ };
27
+ const loginByUsernameAndPassword = async (route, payload, redirect = true) => {
28
+ startLoginLoading();
29
+ try {
30
+ const { data } = await useLoginApi().loginByUsernameAndPassword(payload);
31
+ if (data.value?.data) {
32
+ acT.value = data.value.data.accessToken;
33
+ rfT.value = data.value.data.refreshToken;
34
+ setUserInfo(data.value.data.user);
35
+ if (loginUser.value?.needChangePwd) {
36
+ await toSecuritySettings();
37
+ } else if (redirect) {
38
+ await redirectFromLogin(route);
39
+ }
40
+ }
41
+ } finally {
42
+ endLoginLoading();
43
+ }
44
+ };
45
+ const initUserInfo = async () => {
46
+ startLoginLoading();
47
+ try {
48
+ const { data } = await useAuthApi().getUserByAccessToken();
49
+ if (data.value?.data) {
50
+ setUserInfo(data.value.data);
51
+ return true;
52
+ }
53
+ return false;
54
+ } finally {
55
+ endLoginLoading();
56
+ }
57
+ };
58
+ const refreshToken = async (route, options) => {
59
+ const { data } = await useAuthApi().refreshToken({ refreshToken: rfT.value });
60
+ if (!data.value?.data) {
61
+ useToast().add({
62
+ title: "\u767B\u5F55\u72B6\u6001\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55",
63
+ color: "warning"
64
+ });
65
+ await logout(route);
66
+ return null;
67
+ }
68
+ acT.value = data.value.data.accessToken;
69
+ rfT.value = data.value.data.refreshToken;
70
+ const config = { ...options };
71
+ if (config.headers) {
72
+ config.headers = {
73
+ ...config.headers,
74
+ Authorization: `Bearer ${acT.value}`
75
+ };
76
+ }
77
+ return config;
78
+ };
79
+ return {
80
+ loginLoading,
81
+ isLoggedIn,
82
+ isUserInfoFetched,
83
+ loginUser,
84
+ loginUserRoles,
85
+ loginUserMenus,
86
+ logout,
87
+ loginByUsernameAndPassword,
88
+ initUserInfo,
89
+ refreshToken
90
+ };
91
+ };
92
+ export const useAuth = createSharedComposable(_useAuth);
@@ -0,0 +1,58 @@
1
+ export declare function useBoolean(initValue?: boolean): {
2
+ bool: import("vue").Ref<boolean, boolean>;
3
+ setBool: (value: boolean) => void;
4
+ setTrue: () => void;
5
+ setFalse: () => void;
6
+ toggle: () => void;
7
+ };
8
+ export declare function useLoading(initValue?: boolean): {
9
+ loading: import("vue").Ref<boolean, boolean>;
10
+ startLoading: () => void;
11
+ endLoading: () => void;
12
+ };
13
+ export declare function useFetching(initValue?: boolean): {
14
+ fetching: import("vue").Ref<boolean, boolean>;
15
+ startFetching: () => void;
16
+ endFetching: () => void;
17
+ };
18
+ export declare function useSubmitting(initValue?: boolean): {
19
+ submitting: import("vue").Ref<boolean, boolean>;
20
+ startSubmitting: () => void;
21
+ endSubmitting: () => void;
22
+ };
23
+ export declare function useDeleting(initValue?: boolean): {
24
+ deleting: import("vue").Ref<boolean, boolean>;
25
+ startDeleting: () => void;
26
+ endDeleting: () => void;
27
+ };
28
+ export declare function useUploading(initValue?: boolean): {
29
+ uploading: import("vue").Ref<boolean, boolean>;
30
+ startUploading: () => void;
31
+ endUploading: () => void;
32
+ };
33
+ export declare function useDownloading(initValue?: boolean): {
34
+ downloading: import("vue").Ref<boolean, boolean>;
35
+ startDownloading: () => void;
36
+ endDownloading: () => void;
37
+ };
38
+ export declare function useSearching(initValue?: boolean): {
39
+ searching: import("vue").Ref<boolean, boolean>;
40
+ startSearching: () => void;
41
+ endSearching: () => void;
42
+ };
43
+ export declare function useExporting(initValue?: boolean): {
44
+ exporting: import("vue").Ref<boolean, boolean>;
45
+ startExporting: () => void;
46
+ endExporting: () => void;
47
+ };
48
+ export declare function useCopying(initValue?: boolean): {
49
+ copying: import("vue").Ref<boolean, boolean>;
50
+ startCopying: () => void;
51
+ endCopying: () => void;
52
+ };
53
+ export declare function useLoadingFn(fn: () => Promise<void>): {
54
+ loading: import("vue").Ref<boolean, boolean>;
55
+ startLoading: () => void;
56
+ endLoading: () => void;
57
+ handleLoadingFn: () => Promise<void>;
58
+ };
@@ -0,0 +1,71 @@
1
+ import { ref } from "vue";
2
+ export function useBoolean(initValue = false) {
3
+ const bool = ref(initValue);
4
+ function setBool(value) {
5
+ bool.value = value;
6
+ }
7
+ function setTrue() {
8
+ setBool(true);
9
+ }
10
+ function setFalse() {
11
+ setBool(false);
12
+ }
13
+ function toggle() {
14
+ setBool(!bool.value);
15
+ }
16
+ return {
17
+ bool,
18
+ setBool,
19
+ setTrue,
20
+ setFalse,
21
+ toggle
22
+ };
23
+ }
24
+ export function useLoading(initValue = false) {
25
+ const { bool: loading, setTrue: startLoading, setFalse: endLoading } = useBoolean(initValue);
26
+ return { loading, startLoading, endLoading };
27
+ }
28
+ export function useFetching(initValue = false) {
29
+ const { bool: fetching, setTrue: startFetching, setFalse: endFetching } = useBoolean(initValue);
30
+ return { fetching, startFetching, endFetching };
31
+ }
32
+ export function useSubmitting(initValue = false) {
33
+ const { bool: submitting, setTrue: startSubmitting, setFalse: endSubmitting } = useBoolean(initValue);
34
+ return { submitting, startSubmitting, endSubmitting };
35
+ }
36
+ export function useDeleting(initValue = false) {
37
+ const { bool: deleting, setTrue: startDeleting, setFalse: endDeleting } = useBoolean(initValue);
38
+ return { deleting, startDeleting, endDeleting };
39
+ }
40
+ export function useUploading(initValue = false) {
41
+ const { bool: uploading, setTrue: startUploading, setFalse: endUploading } = useBoolean(initValue);
42
+ return { uploading, startUploading, endUploading };
43
+ }
44
+ export function useDownloading(initValue = false) {
45
+ const { bool: downloading, setTrue: startDownloading, setFalse: endDownloading } = useBoolean(initValue);
46
+ return { downloading, startDownloading, endDownloading };
47
+ }
48
+ export function useSearching(initValue = false) {
49
+ const { bool: searching, setTrue: startSearching, setFalse: endSearching } = useBoolean(initValue);
50
+ return { searching, startSearching, endSearching };
51
+ }
52
+ export function useExporting(initValue = false) {
53
+ const { bool: exporting, setTrue: startExporting, setFalse: endExporting } = useBoolean(initValue);
54
+ return { exporting, startExporting, endExporting };
55
+ }
56
+ export function useCopying(initValue = false) {
57
+ const { bool: copying, setTrue: startCopying, setFalse: endCopying } = useBoolean(initValue);
58
+ return { copying, startCopying, endCopying };
59
+ }
60
+ export function useLoadingFn(fn) {
61
+ const { bool: loading, setTrue: startLoading, setFalse: endLoading } = useBoolean(false);
62
+ const handleLoadingFn = async () => {
63
+ try {
64
+ startLoading();
65
+ await fn();
66
+ } finally {
67
+ endLoading();
68
+ }
69
+ };
70
+ return { loading, startLoading, endLoading, handleLoadingFn };
71
+ }
@@ -0,0 +1,25 @@
1
+ import { type DateValue } from '@internationalized/date';
2
+ import dayjs from 'dayjs';
3
+ import type { DateRange } from 'reka-ui';
4
+ import type { DateShortcut } from '#v/types';
5
+ export declare const useDate: () => {
6
+ dayjsToDateValue: (date: dayjs.Dayjs | null | undefined) => DateValue | undefined;
7
+ isoUtcStringToDateValue: (isoString: string | null | undefined) => DateValue | undefined;
8
+ dateValueToDayjs: (dateValue: DateValue | null | undefined) => dayjs.Dayjs | undefined;
9
+ formatTimeUnit: (dateValue: DateValue | null | undefined, unit: Const.Time.TimeUnit) => string;
10
+ getRecentDateRange: (days: number) => DateRange;
11
+ getlastWeekDateRange: () => DateRange;
12
+ lastWeekDateShortcut: DateShortcut;
13
+ getCurrentWeekDateRange: () => DateRange;
14
+ currentWeekDateShortcut: DateShortcut;
15
+ getLastMonthDateRange: () => DateRange;
16
+ lastMonthDateShortcut: DateShortcut;
17
+ getCurrentMonthDateRange: () => DateRange;
18
+ currentMonthDateShortcut: DateShortcut;
19
+ getlastYearDateRange: () => DateRange;
20
+ lastYearDateShortcut: DateShortcut;
21
+ getCurrentYearDateRange: () => DateRange;
22
+ currentYearDateShortcut: DateShortcut;
23
+ getLastYearToTodayDateRange: () => DateRange;
24
+ lastYearToTodayDateShortcut: DateShortcut;
25
+ };
@@ -0,0 +1,157 @@
1
+ import { createSharedComposable } from "@vueuse/core";
2
+ import { toZoned, parseAbsolute } from "@internationalized/date";
3
+ import dayjs from "dayjs";
4
+ import { TIME_ZONE } from "#v/constants";
5
+ const _useDate = () => {
6
+ const dayjsToDateValue = (date) => {
7
+ if (!date || !date.isValid()) return void 0;
8
+ return parseAbsolute(date.toISOString(), TIME_ZONE);
9
+ };
10
+ const isoUtcStringToDateValue = (isoString) => {
11
+ if (!isoString) return void 0;
12
+ return dayjsToDateValue(dayjs(isoString));
13
+ };
14
+ const dateValueToDayjs = (dateValue) => {
15
+ if (!dateValue) return void 0;
16
+ return dayjs(toZoned(dateValue, TIME_ZONE).toAbsoluteString()).tz(TIME_ZONE);
17
+ };
18
+ const formatTimeUnit = (dateValue, unit) => {
19
+ const date = dateValueToDayjs(dateValue);
20
+ if (!date || !date.isValid()) return "";
21
+ switch (unit) {
22
+ case "year":
23
+ return date.year().toString();
24
+ case "quarter": {
25
+ const quarter = Math.ceil(date.month() + 1 / 3);
26
+ const quarterNames = ["Q1", "Q2", "Q3", "Q4"];
27
+ return `${date.year()}-${quarterNames[quarter - 1]}`;
28
+ }
29
+ case "month":
30
+ return date.format("YYYY-MM");
31
+ case "week": {
32
+ const yearStart = date.startOf("year");
33
+ const weekStart = date.startOf("week");
34
+ const weekNumber = weekStart.diff(yearStart, "week") + 1;
35
+ return `${date.year()}-W${weekNumber}`;
36
+ }
37
+ case "day":
38
+ return date.format("YYYY/MM/DD");
39
+ default:
40
+ throw new Error(`Unsupported time unit: ${unit}`);
41
+ }
42
+ };
43
+ const getRecentDateRange = (days) => {
44
+ const end = dayjs().endOf("day");
45
+ const start = end.subtract(days - 1, "day").startOf("day");
46
+ return {
47
+ start: dayjsToDateValue(start),
48
+ end: dayjsToDateValue(end)
49
+ };
50
+ };
51
+ const getlastWeekDateRange = () => {
52
+ const end = dayjs().subtract(1, "week").endOf("week");
53
+ const start = end.subtract(6, "day").startOf("day");
54
+ return {
55
+ start: dayjsToDateValue(start),
56
+ end: dayjsToDateValue(end)
57
+ };
58
+ };
59
+ const lastWeekDateShortcut = {
60
+ label: "\u4E0A\u5468",
61
+ dateFn: getlastWeekDateRange
62
+ };
63
+ const getCurrentWeekDateRange = () => {
64
+ const end = dayjs().endOf("week");
65
+ const start = end.subtract(6, "day").startOf("day");
66
+ return {
67
+ start: dayjsToDateValue(start),
68
+ end: dayjsToDateValue(end)
69
+ };
70
+ };
71
+ const currentWeekDateShortcut = {
72
+ label: "\u672C\u5468",
73
+ dateFn: getCurrentWeekDateRange
74
+ };
75
+ const getLastMonthDateRange = () => {
76
+ const end = dayjs().subtract(1, "month").endOf("month");
77
+ const start = end.subtract(1, "month").startOf("month");
78
+ return {
79
+ start: dayjsToDateValue(start),
80
+ end: dayjsToDateValue(end)
81
+ };
82
+ };
83
+ const lastMonthDateShortcut = {
84
+ label: "\u4E0A\u6708",
85
+ dateFn: getLastMonthDateRange
86
+ };
87
+ const getCurrentMonthDateRange = () => {
88
+ const end = dayjs().endOf("month");
89
+ const start = end.subtract(1, "month").startOf("month");
90
+ return {
91
+ start: dayjsToDateValue(start),
92
+ end: dayjsToDateValue(end)
93
+ };
94
+ };
95
+ const currentMonthDateShortcut = {
96
+ label: "\u672C\u6708",
97
+ dateFn: getCurrentMonthDateRange
98
+ };
99
+ const getlastYearDateRange = () => {
100
+ const end = dayjs().subtract(1, "year").endOf("year");
101
+ const start = end.subtract(1, "year").startOf("year");
102
+ return {
103
+ start: dayjsToDateValue(start),
104
+ end: dayjsToDateValue(end)
105
+ };
106
+ };
107
+ const lastYearDateShortcut = {
108
+ label: "\u53BB\u5E74",
109
+ dateFn: getlastYearDateRange
110
+ };
111
+ const getCurrentYearDateRange = () => {
112
+ const end = dayjs().endOf("year");
113
+ const start = end.subtract(1, "year").startOf("year");
114
+ return {
115
+ start: dayjsToDateValue(start),
116
+ end: dayjsToDateValue(end)
117
+ };
118
+ };
119
+ const currentYearDateShortcut = {
120
+ label: "\u4ECA\u5E74",
121
+ dateFn: getCurrentYearDateRange
122
+ };
123
+ const getLastYearToTodayDateRange = () => {
124
+ const end = dayjs().endOf("day");
125
+ const start = dayjs().subtract(1, "year").startOf("day");
126
+ return {
127
+ start: dayjsToDateValue(start),
128
+ end: dayjsToDateValue(end)
129
+ };
130
+ };
131
+ const lastYearToTodayDateShortcut = {
132
+ label: "\u53BB\u5E74\u81F3\u4ECA",
133
+ dateFn: getLastYearToTodayDateRange
134
+ };
135
+ return {
136
+ dayjsToDateValue,
137
+ isoUtcStringToDateValue,
138
+ dateValueToDayjs,
139
+ formatTimeUnit,
140
+ getRecentDateRange,
141
+ getlastWeekDateRange,
142
+ lastWeekDateShortcut,
143
+ getCurrentWeekDateRange,
144
+ currentWeekDateShortcut,
145
+ getLastMonthDateRange,
146
+ lastMonthDateShortcut,
147
+ getCurrentMonthDateRange,
148
+ currentMonthDateShortcut,
149
+ getlastYearDateRange,
150
+ lastYearDateShortcut,
151
+ getCurrentYearDateRange,
152
+ currentYearDateShortcut,
153
+ getLastYearToTodayDateRange,
154
+ lastYearToTodayDateShortcut
155
+ };
156
+ };
157
+ export const useDate = createSharedComposable(_useDate);
@@ -0,0 +1,103 @@
1
+ export declare const useEChart: () => {
2
+ getCommonGridOption: () => {
3
+ grid: {
4
+ left: string;
5
+ right: string;
6
+ bottom: string;
7
+ top: string;
8
+ containLabel: boolean;
9
+ };
10
+ };
11
+ getCommonLegendOption: () => {
12
+ legend: {
13
+ show: boolean;
14
+ bottom: string;
15
+ itemGap: number;
16
+ itemWidth: number;
17
+ itemHeight: number;
18
+ textStyle: {
19
+ color: string;
20
+ };
21
+ icon: string;
22
+ };
23
+ };
24
+ getCommonXAxisOption: () => {
25
+ color: string[];
26
+ xAxis: {
27
+ nameTextStyle: {
28
+ color: string;
29
+ };
30
+ axisLine: {
31
+ show: boolean;
32
+ lineStyle: {
33
+ color: string;
34
+ };
35
+ };
36
+ axisLabel: {
37
+ color: string;
38
+ interval: () => boolean;
39
+ hideOverlap: boolean;
40
+ };
41
+ axisTick: {
42
+ show: boolean;
43
+ interval: () => boolean;
44
+ lineStyle: {
45
+ color: string;
46
+ };
47
+ };
48
+ };
49
+ };
50
+ getCommonYAxisOption: () => {
51
+ yAxis: {
52
+ nameTextStyle: {
53
+ color: string;
54
+ };
55
+ axisLine: {
56
+ show: boolean;
57
+ lineStyle: {
58
+ color: string;
59
+ };
60
+ };
61
+ axisLabel: {
62
+ color: string;
63
+ };
64
+ splitLine: {
65
+ show: boolean;
66
+ lineStyle: {
67
+ color: string;
68
+ type: string;
69
+ };
70
+ };
71
+ };
72
+ };
73
+ getCommonBarOption: () => {
74
+ itemStyle: {
75
+ borderRadius: number[];
76
+ };
77
+ emphasis: {
78
+ focus: string;
79
+ };
80
+ label: {
81
+ color: string;
82
+ distance: number;
83
+ };
84
+ };
85
+ getCommonLineOption: () => {
86
+ emphasis: {
87
+ focus: string;
88
+ };
89
+ label: {
90
+ color: string;
91
+ distance: number;
92
+ };
93
+ };
94
+ mergeSeries: (series: any[]) => any[];
95
+ mergeOption: (option: any) => any;
96
+ parseCSSVariableColor: (colorStr: string) => string;
97
+ exportChartAsImage: (chart: any, options?: {
98
+ type?: string;
99
+ backgroundColor?: string;
100
+ pixelRatio?: number;
101
+ filename?: string;
102
+ }) => void;
103
+ };