create-bubbles 0.1.20 → 0.1.23

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 (272) hide show
  1. package/dist/{index.js → index.mjs} +14 -7
  2. package/package.json +5 -4
  3. package/template-nextjs-vinext-eslint/vite.config.ts +1 -1
  4. package/template-vp-monorepo-react-nestjs/.spaces/server//347/231/273/345/275/225/JWT/344/270/216RefreshToken/350/275/256/346/215/242/351/211/264/346/235/203/346/236/266/346/236/204/345/256/236/347/216/260/346/214/207/345/215/227.md +6614 -0
  5. package/template-vp-monorepo-react-nestjs/.vite-hooks/commit-msg +1 -0
  6. package/template-vp-monorepo-react-nestjs/.vite-hooks/pre-commit +2 -1
  7. package/template-vp-monorepo-react-nestjs/.vscode/settings.json +26 -0
  8. package/template-vp-monorepo-react-nestjs/AGENTS.md +16 -0
  9. package/template-vp-monorepo-react-nestjs/README.md +2 -2
  10. package/template-vp-monorepo-react-nestjs/apps/server/.env.development +61 -0
  11. package/template-vp-monorepo-react-nestjs/apps/server/.env.production +20 -0
  12. package/template-vp-monorepo-react-nestjs/apps/server/README.md +3 -0
  13. package/template-vp-monorepo-react-nestjs/apps/server/drizzle.config.ts +15 -0
  14. package/template-vp-monorepo-react-nestjs/apps/server/nest-cli.json +8 -0
  15. package/template-vp-monorepo-react-nestjs/apps/server/package.json +57 -0
  16. package/template-vp-monorepo-react-nestjs/apps/server/src/app.controller.ts +12 -0
  17. package/template-vp-monorepo-react-nestjs/apps/server/src/app.module.ts +58 -0
  18. package/template-vp-monorepo-react-nestjs/apps/server/src/app.service.ts +8 -0
  19. package/template-vp-monorepo-react-nestjs/apps/server/src/common/constants/decorator.ts +2 -0
  20. package/template-vp-monorepo-react-nestjs/apps/server/src/common/constants/response.ts +15 -0
  21. package/template-vp-monorepo-react-nestjs/apps/server/src/common/decorators/bypass.ts +12 -0
  22. package/template-vp-monorepo-react-nestjs/apps/server/src/common/interceptors/transform.ts +34 -0
  23. package/template-vp-monorepo-react-nestjs/apps/server/src/common/model/response.ts +23 -0
  24. package/template-vp-monorepo-react-nestjs/apps/server/src/config/app.config.ts +6 -0
  25. package/template-vp-monorepo-react-nestjs/apps/server/src/config/auth.config.ts +64 -0
  26. package/template-vp-monorepo-react-nestjs/apps/server/src/config/database.config.ts +10 -0
  27. package/template-vp-monorepo-react-nestjs/apps/server/src/config/index.ts +5 -0
  28. package/template-vp-monorepo-react-nestjs/apps/server/src/config/llm.config.ts +7 -0
  29. package/template-vp-monorepo-react-nestjs/apps/server/src/config/redis.config.ts +18 -0
  30. package/template-vp-monorepo-react-nestjs/apps/server/src/database/db.module.ts +32 -0
  31. package/template-vp-monorepo-react-nestjs/apps/server/src/database/schema.ts +73 -0
  32. package/template-vp-monorepo-react-nestjs/apps/server/src/main.ts +34 -0
  33. package/template-vp-monorepo-react-nestjs/apps/server/src/modules/test/db/db.controller.ts +28 -0
  34. package/template-vp-monorepo-react-nestjs/apps/server/src/modules/test/db/db.module.ts +9 -0
  35. package/template-vp-monorepo-react-nestjs/apps/server/src/modules/test/db/db.service.ts +22 -0
  36. package/template-vp-monorepo-react-nestjs/apps/server/src/modules/test/db/dto/create-user.dto.ts +27 -0
  37. package/template-vp-monorepo-react-nestjs/apps/server/src/modules/test/redis/dto/redis-quary.dto.ts +18 -0
  38. package/template-vp-monorepo-react-nestjs/apps/server/src/modules/test/redis/redis.controller.ts +31 -0
  39. package/template-vp-monorepo-react-nestjs/apps/server/src/modules/test/redis/redis.module.ts +9 -0
  40. package/template-vp-monorepo-react-nestjs/apps/server/src/modules/test/redis/redis.service.ts +37 -0
  41. package/template-vp-monorepo-react-nestjs/apps/server/src/utils/server-address.ts +33 -0
  42. package/template-vp-monorepo-react-nestjs/apps/server/tsconfig.build.json +4 -0
  43. package/template-vp-monorepo-react-nestjs/apps/server/tsconfig.json +28 -0
  44. package/template-vp-monorepo-react-nestjs/apps/web/.env +1 -0
  45. package/template-vp-monorepo-react-nestjs/apps/web/.env.dev +1 -0
  46. package/template-vp-monorepo-react-nestjs/apps/web/.env.prod +1 -0
  47. package/template-vp-monorepo-react-nestjs/apps/web/package.json +21 -25
  48. package/template-vp-monorepo-react-nestjs/apps/web/src/App.tsx +5 -4
  49. package/template-vp-monorepo-react-nestjs/apps/web/src/locales/en_US.json +4 -0
  50. package/template-vp-monorepo-react-nestjs/apps/web/src/locales/zh_CN.json +4 -0
  51. package/template-vp-monorepo-react-nestjs/apps/web/src/main.tsx +4 -4
  52. package/template-vp-monorepo-react-nestjs/apps/web/src/pages/home/index.tsx +38 -8
  53. package/template-vp-monorepo-react-nestjs/apps/web/src/router/index.tsx +15 -15
  54. package/template-vp-monorepo-react-nestjs/apps/web/src/utils/env/index.ts +6 -0
  55. package/template-vp-monorepo-react-nestjs/apps/web/src/utils/request/core/index.ts +420 -0
  56. package/template-vp-monorepo-react-nestjs/apps/web/src/utils/request/core/utils.ts +39 -0
  57. package/template-vp-monorepo-react-nestjs/apps/web/src/utils/request/index.ts +61 -0
  58. package/template-vp-monorepo-react-nestjs/apps/web/tsconfig.json +10 -14
  59. package/template-vp-monorepo-react-nestjs/apps/web/vite.config.ts +15 -2
  60. package/template-vp-monorepo-react-nestjs/apps/web-vue/.env.production +2 -0
  61. package/template-vp-monorepo-react-nestjs/apps/web-vue/.vscode/extensions.json +3 -0
  62. package/template-vp-monorepo-react-nestjs/apps/web-vue/AGENTS.md +16 -0
  63. package/template-vp-monorepo-react-nestjs/apps/web-vue/README.md +98 -0
  64. package/template-vp-monorepo-react-nestjs/apps/web-vue/commitlint.config.js +1 -0
  65. package/template-vp-monorepo-react-nestjs/apps/web-vue/eslint.config.js +13 -0
  66. package/{template-vue-vite-eslint → template-vp-monorepo-react-nestjs/apps/web-vue}/lefthook.yml +1 -1
  67. package/template-vp-monorepo-react-nestjs/apps/web-vue/package.json +67 -0
  68. package/template-vp-monorepo-react-nestjs/apps/web-vue/pnpm-workspace.yaml +16 -0
  69. package/template-vp-monorepo-react-nestjs/apps/web-vue/src/App.vue +12 -0
  70. package/template-vp-monorepo-react-nestjs/apps/web-vue/src/api/index.ts +12 -0
  71. package/template-vp-monorepo-react-nestjs/apps/web-vue/src/assets/image/.gitkeep +0 -0
  72. package/{template-vue-vite-eslint → template-vp-monorepo-react-nestjs/apps/web-vue}/src/components/Icon/svg-icon.vue +3 -3
  73. package/{template-vue-vite-eslint → template-vp-monorepo-react-nestjs/apps/web-vue}/src/hooks/chart/lib.ts +6 -6
  74. package/template-vp-monorepo-react-nestjs/apps/web-vue/src/hooks/chart/useEcharts.ts +65 -0
  75. package/template-vp-monorepo-react-nestjs/apps/web-vue/src/i18n/instance.ts +8 -0
  76. package/template-vp-monorepo-react-nestjs/apps/web-vue/src/layout/default/header/index.vue +30 -0
  77. package/template-vp-monorepo-react-nestjs/apps/web-vue/src/layout/default/index.vue +138 -0
  78. package/template-vp-monorepo-react-nestjs/apps/web-vue/src/locales/en_US.json +4 -0
  79. package/template-vp-monorepo-react-nestjs/apps/web-vue/src/locales/zh_CN.json +4 -0
  80. package/{template-vue-vite-eslint → template-vp-monorepo-react-nestjs/apps/web-vue}/src/main.ts +0 -3
  81. package/template-vp-monorepo-react-nestjs/apps/web-vue/src/router/guard/index.ts +7 -0
  82. package/template-vp-monorepo-react-nestjs/apps/web-vue/src/router/guard/permissionGuard.ts +13 -0
  83. package/{template-vue-vite-eslint → template-vp-monorepo-react-nestjs/apps/web-vue}/src/router/index.ts +7 -7
  84. package/template-vp-monorepo-react-nestjs/apps/web-vue/src/router/interface.ts +9 -0
  85. package/{template-vue-vite-eslint → template-vp-monorepo-react-nestjs/apps/web-vue}/src/router/modules/index.ts +1 -4
  86. package/template-vp-monorepo-react-nestjs/apps/web-vue/src/store/index.ts +11 -0
  87. package/template-vp-monorepo-react-nestjs/apps/web-vue/src/store/modules/user.ts +17 -0
  88. package/template-vp-monorepo-react-nestjs/apps/web-vue/src/styles/font.scss +0 -0
  89. package/{template-vue-vite-eslint → template-vp-monorepo-react-nestjs/apps/web-vue}/src/styles/index.scss +3 -3
  90. package/{template-vue-vite-eslint → template-vp-monorepo-react-nestjs/apps/web-vue}/src/types/components.d.ts +8 -0
  91. package/template-vp-monorepo-react-nestjs/apps/web-vue/src/types/vite-env.d.ts +15 -0
  92. package/{template-vue-vite-eslint → template-vp-monorepo-react-nestjs/apps/web-vue}/src/utils/env.ts +1 -1
  93. package/{template-vue-vite-eslint → template-vp-monorepo-react-nestjs/apps/web-vue}/src/utils/request/index.ts +5 -3
  94. package/{template-vue-vite-eslint → template-vp-monorepo-react-nestjs/apps/web-vue}/src/views/example/echart/config.ts +687 -687
  95. package/template-vp-monorepo-react-nestjs/apps/web-vue/src/views/example/echart/index.vue +20 -0
  96. package/template-vp-monorepo-react-nestjs/apps/web-vue/src/views/example/tree-chart.vue +16 -0
  97. package/template-vp-monorepo-react-nestjs/apps/web-vue/src/views/home/index.vue +27 -0
  98. package/{template-vue-vite-eslint → template-vp-monorepo-react-nestjs/apps/web-vue}/tsconfig.json +2 -9
  99. package/template-vp-monorepo-react-nestjs/apps/web-vue/uno.config.ts +17 -0
  100. package/{template-vue-vite-eslint → template-vp-monorepo-react-nestjs/apps/web-vue}/vite.config.ts +4 -6
  101. package/template-vp-monorepo-react-nestjs/commitlint.config.js +0 -0
  102. package/template-vp-monorepo-react-nestjs/docker-compose.yml +41 -0
  103. package/template-vp-monorepo-react-nestjs/mise.toml +3 -0
  104. package/template-vp-monorepo-react-nestjs/package.json +16 -11
  105. package/template-vp-monorepo-react-nestjs/packages/i18n/core/package.json +20 -0
  106. package/template-vp-monorepo-react-nestjs/packages/i18n/core/src/format.ts +9 -0
  107. package/template-vp-monorepo-react-nestjs/packages/i18n/core/src/i18n.ts +73 -0
  108. package/template-vp-monorepo-react-nestjs/packages/i18n/core/src/index.ts +24 -0
  109. package/template-vp-monorepo-react-nestjs/packages/i18n/core/src/storage.ts +47 -0
  110. package/template-vp-monorepo-react-nestjs/packages/i18n/core/src/store.ts +48 -0
  111. package/template-vp-monorepo-react-nestjs/packages/i18n/core/src/types.ts +36 -0
  112. package/template-vp-monorepo-react-nestjs/packages/i18n/core/tsconfig.json +15 -0
  113. package/template-vp-monorepo-react-nestjs/packages/i18n/core/vite.config.ts +13 -0
  114. package/template-vp-monorepo-react-nestjs/packages/i18n/react/package.json +28 -0
  115. package/template-vp-monorepo-react-nestjs/packages/i18n/react/src/index.tsx +26 -0
  116. package/template-vp-monorepo-react-nestjs/packages/i18n/react/src/use-store.ts +14 -0
  117. package/template-vp-monorepo-react-nestjs/packages/i18n/react/tsconfig.json +16 -0
  118. package/template-vp-monorepo-react-nestjs/packages/i18n/react/vite.config.ts +16 -0
  119. package/template-vp-monorepo-react-nestjs/packages/i18n/vue/package.json +27 -0
  120. package/template-vp-monorepo-react-nestjs/packages/i18n/vue/src/index.ts +52 -0
  121. package/template-vp-monorepo-react-nestjs/packages/i18n/vue/src/use-store.ts +19 -0
  122. package/template-vp-monorepo-react-nestjs/packages/i18n/vue/tsconfig.json +15 -0
  123. package/template-vp-monorepo-react-nestjs/packages/i18n/vue/vite.config.ts +16 -0
  124. package/template-vp-monorepo-react-nestjs/pnpm-workspace.yaml +97 -9
  125. package/template-vp-monorepo-react-nestjs/vite.config.ts +16 -4
  126. package/template-vp-vue-eslint-vapor/.env +6 -0
  127. package/template-vp-vue-eslint-vapor/.env.development +2 -0
  128. package/template-vp-vue-eslint-vapor/.env.production +2 -0
  129. package/template-vp-vue-eslint-vapor/.vite-hooks/commit-msg +1 -0
  130. package/template-vp-vue-eslint-vapor/.vite-hooks/pre-commit +1 -0
  131. package/template-vp-vue-eslint-vapor/.vscode/extensions.json +3 -0
  132. package/template-vp-vue-eslint-vapor/AGENTS.md +16 -0
  133. package/template-vp-vue-eslint-vapor/README.md +93 -0
  134. package/template-vp-vue-eslint-vapor/commitlint.config.js +1 -0
  135. package/template-vp-vue-eslint-vapor/eslint.config.js +13 -0
  136. package/template-vp-vue-eslint-vapor/index.html +13 -0
  137. package/template-vp-vue-eslint-vapor/package.json +64 -0
  138. package/template-vp-vue-eslint-vapor/pnpm-workspace.yaml +2 -0
  139. package/template-vp-vue-eslint-vapor/public/vite.svg +1 -0
  140. package/template-vp-vue-eslint-vapor/src/App.vue +7 -0
  141. package/template-vp-vue-eslint-vapor/src/api/index.ts +12 -0
  142. package/template-vp-vue-eslint-vapor/src/assets/icon/home.svg +3 -0
  143. package/template-vp-vue-eslint-vapor/src/assets/icon/logo.svg +1 -0
  144. package/template-vp-vue-eslint-vapor/src/assets/image/.gitkeep +0 -0
  145. package/template-vp-vue-eslint-vapor/src/components/Icon/svg-icon.vue +29 -0
  146. package/template-vp-vue-eslint-vapor/src/hooks/chart/lib.ts +57 -0
  147. package/template-vp-vue-eslint-vapor/src/hooks/chart/useEcharts.ts +65 -0
  148. package/template-vp-vue-eslint-vapor/src/layout/default/header/index.vue +57 -0
  149. package/template-vp-vue-eslint-vapor/src/layout/default/index.vue +138 -0
  150. package/template-vp-vue-eslint-vapor/src/main.ts +19 -0
  151. package/template-vp-vue-eslint-vapor/src/router/guard/index.ts +7 -0
  152. package/{template-vue-vite-eslint → template-vp-vue-eslint-vapor}/src/router/guard/permissionGuard.ts +3 -3
  153. package/template-vp-vue-eslint-vapor/src/router/index.ts +18 -0
  154. package/template-vp-vue-eslint-vapor/src/router/interface.ts +9 -0
  155. package/template-vp-vue-eslint-vapor/src/router/modules/index.ts +33 -0
  156. package/template-vp-vue-eslint-vapor/src/store/index.ts +11 -0
  157. package/template-vp-vue-eslint-vapor/src/store/modules/user.ts +17 -0
  158. package/template-vp-vue-eslint-vapor/src/styles/font.scss +0 -0
  159. package/template-vp-vue-eslint-vapor/src/styles/index.scss +29 -0
  160. package/template-vp-vue-eslint-vapor/src/styles/variables.scss +3 -0
  161. package/template-vp-vue-eslint-vapor/src/types/vite-env.d.ts +15 -0
  162. package/template-vp-vue-eslint-vapor/src/utils/env.ts +11 -0
  163. package/template-vp-vue-eslint-vapor/src/utils/request/core/index.ts +425 -0
  164. package/template-vp-vue-eslint-vapor/src/utils/request/core/utils.ts +39 -0
  165. package/template-vp-vue-eslint-vapor/src/utils/request/index.ts +44 -0
  166. package/template-vp-vue-eslint-vapor/src/views/example/echart/config.ts +1794 -0
  167. package/template-vp-vue-eslint-vapor/src/views/example/echart/index.vue +20 -0
  168. package/template-vp-vue-eslint-vapor/src/views/example/tree-chart.vue +16 -0
  169. package/template-vp-vue-eslint-vapor/src/views/home/index.vue +16 -0
  170. package/template-vp-vue-eslint-vapor/src/views/login/index.vue +9 -0
  171. package/template-vp-vue-eslint-vapor/tsconfig.json +32 -0
  172. package/template-vp-vue-eslint-vapor/tsconfig.tsbuildinfo +1 -0
  173. package/template-vp-vue-eslint-vapor/uno.config.ts +17 -0
  174. package/template-vp-vue-eslint-vapor/vite.config.ts +66 -0
  175. package/template-vue-vp-eslint/.env +6 -0
  176. package/template-vue-vp-eslint/.env.development +2 -0
  177. package/template-vue-vp-eslint/.env.production +2 -0
  178. package/template-vue-vp-eslint/.vscode/extensions.json +3 -0
  179. package/template-vue-vp-eslint/AGENTS.md +16 -0
  180. package/template-vue-vp-eslint/README.md +98 -0
  181. package/template-vue-vp-eslint/commitlint.config.js +1 -0
  182. package/template-vue-vp-eslint/eslint.config.js +13 -0
  183. package/template-vue-vp-eslint/index.html +13 -0
  184. package/template-vue-vp-eslint/lefthook.yml +11 -0
  185. package/template-vue-vp-eslint/package.json +63 -0
  186. package/template-vue-vp-eslint/pnpm-workspace.yaml +3 -0
  187. package/template-vue-vp-eslint/public/vite.svg +1 -0
  188. package/template-vue-vp-eslint/src/App.vue +7 -0
  189. package/template-vue-vp-eslint/src/api/index.ts +12 -0
  190. package/template-vue-vp-eslint/src/assets/icon/home.svg +3 -0
  191. package/template-vue-vp-eslint/src/assets/icon/logo.svg +1 -0
  192. package/template-vue-vp-eslint/src/assets/image/.gitkeep +0 -0
  193. package/template-vue-vp-eslint/src/components/Icon/svg-icon.vue +29 -0
  194. package/template-vue-vp-eslint/src/hooks/chart/lib.ts +57 -0
  195. package/template-vue-vp-eslint/src/hooks/chart/useEcharts.ts +65 -0
  196. package/template-vue-vp-eslint/src/layout/default/header/index.vue +30 -0
  197. package/template-vue-vp-eslint/src/layout/default/index.vue +138 -0
  198. package/template-vue-vp-eslint/src/main.ts +16 -0
  199. package/template-vue-vp-eslint/src/router/guard/index.ts +7 -0
  200. package/template-vue-vp-eslint/src/router/guard/permissionGuard.ts +13 -0
  201. package/template-vue-vp-eslint/src/router/index.ts +18 -0
  202. package/template-vue-vp-eslint/src/router/interface.ts +9 -0
  203. package/template-vue-vp-eslint/src/router/modules/index.ts +33 -0
  204. package/template-vue-vp-eslint/src/store/index.ts +11 -0
  205. package/template-vue-vp-eslint/src/store/modules/user.ts +17 -0
  206. package/template-vue-vp-eslint/src/styles/font.scss +0 -0
  207. package/template-vue-vp-eslint/src/styles/index.scss +29 -0
  208. package/template-vue-vp-eslint/src/styles/variables.scss +3 -0
  209. package/template-vue-vp-eslint/src/types/vite-env.d.ts +15 -0
  210. package/template-vue-vp-eslint/src/utils/env.ts +11 -0
  211. package/template-vue-vp-eslint/src/utils/request/core/index.ts +425 -0
  212. package/template-vue-vp-eslint/src/utils/request/core/utils.ts +39 -0
  213. package/template-vue-vp-eslint/src/utils/request/index.ts +44 -0
  214. package/template-vue-vp-eslint/src/views/example/echart/config.ts +1794 -0
  215. package/template-vue-vp-eslint/src/views/example/echart/index.vue +20 -0
  216. package/template-vue-vp-eslint/src/views/example/tree-chart.vue +16 -0
  217. package/template-vue-vp-eslint/src/views/home/index.vue +16 -0
  218. package/template-vue-vp-eslint/src/views/login/index.vue +9 -0
  219. package/template-vue-vp-eslint/tsconfig.json +29 -0
  220. package/template-vue-vp-eslint/uno.config.ts +17 -0
  221. package/template-vue-vp-eslint/vite.config.ts +58 -0
  222. package/template-vp-monorepo-react-nestjs/.oxfmtrc.jsonc +0 -8
  223. package/template-vp-monorepo-react-nestjs/.oxlintrc.jsonc +0 -3
  224. package/template-vp-monorepo-react-nestjs/.specs//351/234/200/346/261/202.md +0 -5
  225. package/template-vp-monorepo-react-nestjs/apps/service/.oxlintrc.jsonc +0 -3
  226. package/template-vp-monorepo-react-nestjs/apps/web/.oxlintrc.jsonc +0 -4
  227. package/template-vp-monorepo-react-nestjs/packages/utils/README.md +0 -23
  228. package/template-vp-monorepo-react-nestjs/packages/utils/package.json +0 -39
  229. package/template-vp-monorepo-react-nestjs/packages/utils/src/index.ts +0 -3
  230. package/template-vp-monorepo-react-nestjs/packages/utils/tests/index.test.ts +0 -6
  231. package/template-vp-monorepo-react-nestjs/packages/utils/tsconfig.json +0 -20
  232. package/template-vp-monorepo-react-nestjs/packages/utils/tsdown.config.ts +0 -9
  233. package/template-vp-monorepo-react-nestjs/packages/utils/vite.config.ts +0 -7
  234. package/template-vue-vite-eslint/.env.production +0 -1
  235. package/template-vue-vite-eslint/README.md +0 -3
  236. package/template-vue-vite-eslint/commitlint.config.js +0 -1
  237. package/template-vue-vite-eslint/eslint.config.js +0 -69
  238. package/template-vue-vite-eslint/package.json +0 -56
  239. package/template-vue-vite-eslint/src/App.vue +0 -19
  240. package/template-vue-vite-eslint/src/api/index.ts +0 -12
  241. package/template-vue-vite-eslint/src/hooks/chart/useEcharts.ts +0 -65
  242. package/template-vue-vite-eslint/src/layout/default/header/index.vue +0 -12
  243. package/template-vue-vite-eslint/src/layout/default/index.vue +0 -55
  244. package/template-vue-vite-eslint/src/router/guard/index.ts +0 -7
  245. package/template-vue-vite-eslint/src/router/interface.ts +0 -9
  246. package/template-vue-vite-eslint/src/router/modules/example.ts +0 -21
  247. package/template-vue-vite-eslint/src/store/index.ts +0 -11
  248. package/template-vue-vite-eslint/src/store/modules/user.ts +0 -20
  249. package/template-vue-vite-eslint/src/types/vite-env.d.ts +0 -15
  250. package/template-vue-vite-eslint/src/views/example/echart/index.vue +0 -22
  251. package/template-vue-vite-eslint/src/views/example/h-full.vue +0 -24
  252. package/template-vue-vite-eslint/src/views/example/tree-chart.vue +0 -94
  253. package/template-vue-vite-eslint/src/views/home/index.vue +0 -25
  254. package/template-vue-vite-eslint/uno.config.ts +0 -21
  255. /package/{template-vue-vite-eslint/src/assets/image/.gitkeep → template-vp-monorepo-react-nestjs/.agents/auth.config.ts} +0 -0
  256. /package/{template-vue-vite-eslint/src/styles/font.scss → template-vp-monorepo-react-nestjs/apps/server/src/config/security.config.ts} +0 -0
  257. /package/{template-vue-vite-eslint → template-vp-monorepo-react-nestjs/apps/web-vue}/.env +0 -0
  258. /package/{template-vue-vite-eslint → template-vp-monorepo-react-nestjs/apps/web-vue}/.env.development +0 -0
  259. /package/{template-vue-vite-eslint → template-vp-monorepo-react-nestjs/apps/web-vue}/index.html +0 -0
  260. /package/{template-vue-vite-eslint → template-vp-monorepo-react-nestjs/apps/web-vue}/public/vite.svg +0 -0
  261. /package/{template-vue-vite-eslint → template-vp-monorepo-react-nestjs/apps/web-vue}/src/assets/icon/computer-data.svg +0 -0
  262. /package/{template-vue-vite-eslint → template-vp-monorepo-react-nestjs/apps/web-vue}/src/assets/icon/cpu.svg +0 -0
  263. /package/{template-vue-vite-eslint → template-vp-monorepo-react-nestjs/apps/web-vue}/src/assets/icon/data-search.svg +0 -0
  264. /package/{template-vue-vite-eslint → template-vp-monorepo-react-nestjs/apps/web-vue}/src/assets/icon/home.svg +0 -0
  265. /package/{template-vue-vite-eslint → template-vp-monorepo-react-nestjs/apps/web-vue}/src/assets/icon/knowledge-graph.svg +0 -0
  266. /package/{template-vue-vite-eslint → template-vp-monorepo-react-nestjs/apps/web-vue}/src/assets/icon/logo.svg +0 -0
  267. /package/{template-vue-vite-eslint → template-vp-monorepo-react-nestjs/apps/web-vue}/src/assets/icon/robot.svg +0 -0
  268. /package/{template-vue-vite-eslint → template-vp-monorepo-react-nestjs/apps/web-vue}/src/styles/variables.scss +0 -0
  269. /package/{template-vue-vite-eslint → template-vp-monorepo-react-nestjs/apps/web-vue}/src/types/auto-import.d.ts +0 -0
  270. /package/{template-vue-vite-eslint → template-vp-monorepo-react-nestjs/apps/web-vue}/src/utils/request/core/index.ts +0 -0
  271. /package/{template-vue-vite-eslint → template-vp-monorepo-react-nestjs/apps/web-vue}/src/utils/request/core/utils.ts +0 -0
  272. /package/{template-vue-vite-eslint → template-vp-monorepo-react-nestjs/apps/web-vue}/src/views/login/index.vue +0 -0
@@ -0,0 +1,20 @@
1
+ <script setup lang="ts">
2
+ import { useECharts } from "@/hooks/chart/useEcharts";
3
+
4
+ import { getOption } from "./config";
5
+
6
+ const dom = useTemplateRef("chart");
7
+ const { setOptions } = useECharts(dom);
8
+
9
+ onMounted(() => {
10
+ setOptions(getOption());
11
+ });
12
+ </script>
13
+
14
+ <template>
15
+ <div class="h-100vh w-full bg-black">
16
+ <div ref="chart" class="h-30% w-30%" />
17
+ </div>
18
+ </template>
19
+
20
+ <style lang="scss" scoped></style>
@@ -0,0 +1,16 @@
1
+ <script setup lang="ts">
2
+
3
+
4
+ defineOptions({ name: 'tree-chart' })
5
+
6
+ </script>
7
+
8
+ <template>
9
+ <div class="tree-chart-container">
10
+
11
+ </div>
12
+ </template>
13
+
14
+ <style lang="scss" scoped>
15
+
16
+ </style>
@@ -0,0 +1,16 @@
1
+ <script setup lang="ts">
2
+
3
+ </script>
4
+
5
+ <template>
6
+ <div class="flex-center flex-col gap-4 h-full w-full">
7
+ <h1 class="text-2xl font-bold">
8
+ Welcome to Vue Template
9
+ </h1>
10
+ <p class="text-gray-500">
11
+ Vite+ + Vue 3 + Antdv Next + UnoCSS + ESLint
12
+ </p>
13
+ </div>
14
+ </template>
15
+
16
+ <style lang="scss" scoped></style>
@@ -0,0 +1,9 @@
1
+ <script setup lang="ts">
2
+ // const a = 123
3
+ </script>
4
+
5
+ <template>
6
+ <div>login</div>
7
+ </template>
8
+
9
+ <style lang="scss" scoped></style>
@@ -0,0 +1,32 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
5
+ "moduleDetection": "force",
6
+ "useDefineForClassFields": true,
7
+ "module": "ESNext",
8
+
9
+ /* Bundler mode */
10
+ "moduleResolution": "bundler",
11
+ "paths": {
12
+ "@/*": ["./src/*"]
13
+ },
14
+ "types": ["vite/client", "vue", "node"],
15
+ "allowImportingTsExtensions": true,
16
+
17
+ /* Linting */
18
+ "strict": true,
19
+ "noFallthroughCasesInSwitch": true,
20
+ "noUnusedLocals": true,
21
+ "noUnusedParameters": true,
22
+ "noEmit": true,
23
+ "verbatimModuleSyntax": true,
24
+ "erasableSyntaxOnly": true,
25
+ "skipLibCheck": true,
26
+ "noUncheckedSideEffectImports": true
27
+ },
28
+ "vueCompilerOptions": {
29
+ "vapor": true
30
+ },
31
+ "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.vue", "node_modules/antdv-next/global.d.ts"]
32
+ }
@@ -0,0 +1 @@
1
+ {"root":["./src/main.ts","./src/api/index.ts","./src/hooks/chart/lib.ts","./src/hooks/chart/useecharts.ts","./src/router/index.ts","./src/router/interface.ts","./src/router/guard/index.ts","./src/router/guard/permissionguard.ts","./src/router/modules/index.ts","./src/store/index.ts","./src/store/modules/user.ts","./src/types/auto-import.d.ts","./src/types/components.d.ts","./src/types/vite-env.d.ts","./src/utils/env.ts","./src/utils/request/index.ts","./src/utils/request/core/index.ts","./src/utils/request/core/utils.ts","./src/views/example/echart/config.ts","./src/app.vue","./src/components/icon/svg-icon.vue","./src/layout/default/index.vue","./src/layout/default/header/index.vue","./src/views/example/tree-chart.vue","./src/views/example/echart/index.vue","./src/views/home/index.vue","./src/views/login/index.vue","./node_modules/antdv-next/global.d.ts"],"version":"6.0.3"}
@@ -0,0 +1,17 @@
1
+ import presetAttributify from "@unocss/preset-attributify";
2
+ import presetWind4 from "@unocss/preset-wind4";
3
+ import { defineConfig } from "unocss";
4
+
5
+ export default defineConfig({
6
+ // content: {
7
+ // filesystem: [
8
+ // '**/*.{html,js,ts,jsx,tsx,vue,svelte,astro}',
9
+ // ],
10
+ // },
11
+ shortcuts: [
12
+ {
13
+ "flex-center": "flex justify-center items-center",
14
+ },
15
+ ],
16
+ presets: [presetWind4(), presetAttributify()],
17
+ });
@@ -0,0 +1,66 @@
1
+ import path from "node:path";
2
+ import process from "node:process";
3
+
4
+ import { AntdvNextResolver } from "@antdv-next/auto-import-resolver";
5
+ import Vue from "@vitejs/plugin-vue";
6
+ import UnoCSS from "unocss/vite";
7
+ import AutoImport from "unplugin-auto-import/vite";
8
+ import Components from "unplugin-vue-components/vite";
9
+ import Inspect from "vite-plugin-inspect";
10
+ import { createSvgIconsPlugin } from "vite-plugin-svg-icons";
11
+ import { defineConfig, lazyPlugins, loadEnv } from "vite-plus";
12
+
13
+ // https://vite.dev/config/
14
+ export default defineConfig(({ mode }) => {
15
+ const root = process.cwd();
16
+ const env = loadEnv(mode, root);
17
+ const { VITE_PORT, VITE_API_URL, VITE_API_AFFIX } = env;
18
+
19
+ return {
20
+ resolve: {
21
+ alias: {
22
+ "@": path.resolve(__dirname, "src"),
23
+ },
24
+ },
25
+ server: {
26
+ port: Number(VITE_PORT),
27
+ host: "0.0.0.0",
28
+ open: false,
29
+ proxy: {
30
+ [`^/${VITE_API_AFFIX}`]: {
31
+ target: VITE_API_URL,
32
+ changeOrigin: true,
33
+ // secure: false, // Disable SSL certificate verification
34
+ rewrite: (path) => path.replace(new RegExp(`^/${VITE_API_AFFIX}`), ""),
35
+ },
36
+ },
37
+ },
38
+ staged: {
39
+ "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,vue}": "vp check --fix",
40
+ "*.{json,jsonc}": "vp fmt",
41
+ },
42
+ plugins: lazyPlugins(() => [
43
+ Vue({
44
+ features: {
45
+ vapor: true,
46
+ },
47
+ }),
48
+ AutoImport({
49
+ imports: ["vue", "vue-router"],
50
+ dts: "./src/types/auto-import.d.ts",
51
+ }),
52
+ Components({
53
+ resolvers: [AntdvNextResolver()],
54
+ dts: "./src/types/components.d.ts",
55
+ }),
56
+ createSvgIconsPlugin({
57
+ // Specify the icon folder to be cached
58
+ iconDirs: [path.resolve(__dirname, "src/assets/icon")],
59
+ // Specify symbolId format
60
+ symbolId: "icon-[dir]-[name]",
61
+ }),
62
+ UnoCSS(),
63
+ Inspect(),
64
+ ]),
65
+ };
66
+ });
@@ -0,0 +1,6 @@
1
+ VITE_PORT = 9999
2
+ VITE_PATH = '/'
3
+ VITE_APP_NAME = "xxx"
4
+
5
+ # 后端
6
+ VITE_API_AFFIX = 'api'
@@ -0,0 +1,2 @@
1
+ # 后端
2
+ VITE_API_URL = 'http://localhost:8080'
@@ -0,0 +1,2 @@
1
+ # 后端
2
+ VITE_API_URL = 'http://localhost:8080'
@@ -0,0 +1,3 @@
1
+ {
2
+ "recommendations": ["VoidZero.vite-plus-extension-pack"]
3
+ }
@@ -0,0 +1,16 @@
1
+ <!--VITE PLUS START-->
2
+
3
+ # Using Vite+, the Unified Toolchain for the Web
4
+
5
+ This project is using Vite+, a unified toolchain built on top of Vite, Rolldown, Vitest, tsdown, Oxlint, Oxfmt, and Vite Task. Vite+ wraps runtime management, package management, and frontend tooling in a single global CLI called `vp`. Vite+ is distinct from Vite, and it invokes Vite through `vp dev` and `vp build`. Run `vp help` to print a list of commands and `vp <command> --help` for information about a specific command.
6
+
7
+ Docs are local at `node_modules/vite-plus/docs` or online at https://viteplus.dev/guide/.
8
+
9
+ ## Review Checklist
10
+
11
+ - [ ] Run `vp install` after pulling remote changes and before getting started.
12
+ - [ ] Run `vp check` and `vp test` to format, lint, type check and test changes.
13
+ - [ ] Check if there are `vite.config.ts` tasks or `package.json` scripts necessary for validation, run via `vp run <script>`.
14
+ - [ ] If setup, runtime, or package-manager behavior looks wrong, run `vp env doctor` and include its output when asking for help.
15
+
16
+ <!--VITE PLUS END-->
@@ -0,0 +1,98 @@
1
+ # template-vp-vue-eslint
2
+
3
+ Vue 3 项目模板,基于 Vite+ 统一工具链,集成 Antdv Next UI 组件库、UnoCSS 原子化样式、ESLint 代码规范。
4
+
5
+ ## 技术栈
6
+
7
+ | 分类 | 技术 | 说明 |
8
+ |------|------|------|
9
+ | 构建工具 | Vite+ (`vp`) | 统一工具链,封装 Vite + Rolldown + Oxlint |
10
+ | 框架 | Vue 3 | Composition API + `<script setup>` |
11
+ | 语言 | TypeScript 6/7 并存 | TS7 编译 + TS6 支持 typescript-eslint/vue-tsc |
12
+ | UI 组件库 | Antdv Next | 自动按需导入 |
13
+ | 状态管理 | Pinia | 含持久化插件 |
14
+ | 路由 | Vue Router 5 | |
15
+ | 请求库 | Alova | 基于 Axios 适配器,双调用实例 |
16
+ | 样式方案 | UnoCSS | Wind4 + Attributify 预设 |
17
+ | 代码规范 | ESLint (@antfu/eslint-config) + OxLint | |
18
+ | Git 钩子 | Lefthook + Commitlint | |
19
+
20
+ ## 快速开始
21
+
22
+ ```bash
23
+ # 安装依赖
24
+ pnpm install
25
+
26
+ # 启动开发服务器
27
+ pnpm dev
28
+
29
+ # 构建生产包
30
+ pnpm build
31
+
32
+ # 代码检查
33
+ pnpm lint
34
+
35
+ # 代码修复
36
+ pnpm lint:fix
37
+ ```
38
+
39
+ ## 目录结构
40
+
41
+ ```
42
+ src/
43
+ ├── api/ # API 接口定义
44
+ ├── assets/ # 静态资源
45
+ │ ├── icon/ # SVG 图标
46
+ │ └── image/ # 图片资源
47
+ ├── components/ # 公共组件
48
+ │ └── Icon/ # SVG 图标组件
49
+ ├── hooks/ # 组合式函数
50
+ ├── layout/ # 布局组件
51
+ │ └── default/ # 默认布局(侧边栏 + 顶部栏)
52
+ ├── router/ # 路由配置
53
+ │ ├── guard/ # 路由守卫
54
+ │ └── modules/ # 路由模块
55
+ ├── store/ # Pinia 状态管理
56
+ │ └── modules/ # 业务 Store
57
+ ├── styles/ # 全局样式
58
+ ├── types/ # 类型声明(自动生成)
59
+ ├── utils/ # 工具函数
60
+ │ └── request/ # Alova 请求封装
61
+ ├── views/ # 页面视图
62
+ ├── App.vue # 根组件
63
+ └── main.ts # 应用入口
64
+ ```
65
+
66
+ ## 环境变量
67
+
68
+ | 文件 | 用途 |
69
+ |------|------|
70
+ | `.env` | 公共环境变量 |
71
+ | `.env.development` | 开发环境 |
72
+ | `.env.production` | 生产环境 |
73
+
74
+ 关键变量:
75
+
76
+ | 变量名 | 说明 |
77
+ |--------|------|
78
+ | `VITE_PORT` | 开发服务器端口 |
79
+ | `VITE_API_URL` | 后端 API 地址 |
80
+ | `VITE_API_AFFIX` | API 路由前缀(用于代理) |
81
+ | `VITE_APP_NAME` | 应用名称 |
82
+
83
+ ## TypeScript 6/7 并存说明
84
+
85
+ TypeScript 7.0 使用 Go 重写了编译器,但暂不提供程序化 API,因此 `typescript-eslint` 和 `vue-tsc` 暂不兼容。
86
+
87
+ 本项目采用微软官方推荐的并存方案:
88
+
89
+ - `typescript` → 指向 `@typescript/typescript6`(供 ESLint、vue-tsc 使用)
90
+ - `@typescript/native` → 指向 TypeScript 7(可手动调用 `npx @typescript/native tsc`)
91
+
92
+ VS Code 中安装 [TypeScript (Native Preview)](https://marketplace.visualstudio.com/items?itemName=TypeScriptTeam.native-preview) 扩展可享受 TS7 的语言服务加速。
93
+
94
+ ## 代码规范
95
+
96
+ - **ESLint**:使用 `@antfu/eslint-config`,单引号、无分号、自动排序 imports
97
+ - **OxLint**:作为 ESLint 的补充,提供更快的 lint 速度
98
+ - **Commitlint**:提交信息需遵循 [Conventional Commits](https://www.conventionalcommits.org/) 规范
@@ -0,0 +1 @@
1
+ export default { extends: ["@commitlint/config-conventional"] };
@@ -0,0 +1,13 @@
1
+ import antfu from '@antfu/eslint-config'
2
+ import oxlint from 'eslint-plugin-oxlint'
3
+
4
+ export default antfu(
5
+ {
6
+ formatters: {
7
+ css: true,
8
+ html: true,
9
+ },
10
+ vue: true,
11
+ unocss: true,
12
+ },
13
+ ).append(...oxlint.configs['flat/recommended'])
@@ -0,0 +1,13 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>Vite + Vue + TS</title>
8
+ </head>
9
+ <body>
10
+ <div id="app"></div>
11
+ <script type="module" src="/src/main.ts"></script>
12
+ </body>
13
+ </html>
@@ -0,0 +1,11 @@
1
+ pre-commit:
2
+ commands:
3
+ check:
4
+ glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc,vue}"
5
+ run: pnpm eslint --fix {staged_files}
6
+ stage_fixed: true
7
+
8
+ commit-msg:
9
+ commands:
10
+ lint commit message:
11
+ run: npx commitlint --edit {1}
@@ -0,0 +1,63 @@
1
+ {
2
+ "name": "template-vp-vue-eslint",
3
+ "type": "module",
4
+ "version": "0.0.1",
5
+ "private": true,
6
+ "scripts": {
7
+ "dev": "vp dev --mode development",
8
+ "build": "vue-tsc -b && vp build",
9
+ "preview": "vp preview",
10
+ "lint": "oxlint && eslint",
11
+ "lint:fix": "oxlint && eslint --fix"
12
+ },
13
+ "dependencies": {
14
+ "@alova/adapter-axios": "^2.0.20",
15
+ "@antdv-next/icons": "^1.1.1",
16
+ "alova": "^3.5.3",
17
+ "antdv-next": "^1.4.5",
18
+ "axios": "^1.18.1",
19
+ "dayjs": "^1.11.21",
20
+ "echarts": "^6.1.0",
21
+ "nprogress": "^0.2.0",
22
+ "pinia": "^4.0.2",
23
+ "pinia-plugin-persistedstate": "^4.7.1",
24
+ "radashi": "^12.9.1",
25
+ "vue": "^3.5.40",
26
+ "vue-router": "^5.2.0"
27
+ },
28
+ "devDependencies": {
29
+ "@antdv-next/auto-import-resolver": "^1.1.0",
30
+ "@antfu/eslint-config": "^9.2.0",
31
+ "@commitlint/cli": "^21.2.1",
32
+ "@commitlint/config-conventional": "^21.2.0",
33
+ "@types/node": "^26.1.1",
34
+ "@types/nprogress": "^0.2.3",
35
+ "@unocss/eslint-plugin": "^66.7.5",
36
+ "@unocss/preset-attributify": "^66.7.5",
37
+ "@unocss/preset-wind4": "^66.7.5",
38
+ "@vitejs/plugin-vue": "^6.0.8",
39
+ "@vue/tsconfig": "^0.9.1",
40
+ "eslint": "10.8.0",
41
+ "eslint-plugin-format": "^2.0.1",
42
+ "eslint-plugin-oxlint": "^1.75.0",
43
+ "lefthook": "^2.1.10",
44
+ "oxlint": "^1.75.0",
45
+ "sass": "^1.102.0",
46
+ "typescript": "^6.0.3",
47
+ "unocss": "66.7.5",
48
+ "unplugin-auto-import": "^21.0.0",
49
+ "unplugin-vue-components": "^32.1.0",
50
+ "vite": "npm:@voidzero-dev/vite-plus-core@0.2.6",
51
+ "vite-plugin-inspect": "^12.0.2",
52
+ "vite-plugin-svg-icons": "^2.0.1",
53
+ "vite-plus": "^0.2.6",
54
+ "vue-tsc": "^3.3.8"
55
+ },
56
+ "devEngines": {
57
+ "packageManager": {
58
+ "name": "pnpm",
59
+ "version": "11.11.0",
60
+ "onFail": "download"
61
+ }
62
+ }
63
+ }
@@ -0,0 +1,3 @@
1
+ allowBuilds:
2
+ '@parcel/watcher': set this to true or false
3
+ lefthook: set this to true or false
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
@@ -0,0 +1,7 @@
1
+ <script setup lang="ts"></script>
2
+
3
+ <template>
4
+ <RouterView />
5
+ </template>
6
+
7
+ <style scoped></style>
@@ -0,0 +1,12 @@
1
+ import request from "@/utils/request";
2
+
3
+ export const EXPIRE_TIME = 60 * 10 * 1000;
4
+
5
+ export function getTree() {
6
+ return request.Get("/xxx/xx", {
7
+ cacheFor: {
8
+ mode: "restore",
9
+ expire: EXPIRE_TIME,
10
+ },
11
+ });
12
+ }
@@ -0,0 +1,3 @@
1
+ <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M8.34912 1.55823C8.72361 1.23724 9.27639 1.23724 9.65088 1.55823L15.5981 6.65588C15.8493 6.87118 15.9784 7.1972 15.9419 7.526L15.0991 15.11C15.0429 15.6164 14.6145 15.9996 14.105 15.9996H3.89502C3.38553 15.9996 2.95714 15.6164 2.90088 15.11L2.05811 7.526C2.02157 7.1972 2.15067 6.87118 2.40186 6.65588L8.34912 1.55823ZM9.00049 9.99963C7.89603 9.99963 7.00066 10.8952 7.00049 11.9996V13.9996C7.00049 14.5519 7.4482 14.9996 8.00049 14.9996H10.0005C10.5526 14.9994 11.0005 14.5518 11.0005 13.9996V11.9996C11.0003 10.8953 10.1048 9.99985 9.00049 9.99963Z" fill="currentColor"/>
3
+ </svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="currentColor" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="currentColor" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>
@@ -0,0 +1,29 @@
1
+ <script setup lang="ts">
2
+ defineProps<{
3
+ icon: string;
4
+ }>();
5
+ const attrs = useAttrs();
6
+ </script>
7
+
8
+ <template>
9
+ <svg class="svg-icon" aria-hidden="true" v-bind="attrs">
10
+ <use :href="`#icon-${icon}`" />
11
+ </svg>
12
+ </template>
13
+
14
+ <style lang="scss" scoped>
15
+ .svg-icon {
16
+ display: flex;
17
+ justify-content: center;
18
+ align-items: center;
19
+ width: 1em;
20
+ height: 1em;
21
+ fill: currentColor;
22
+ overflow: hidden;
23
+ }
24
+
25
+ .svg-external-icon {
26
+ background-color: currentColor;
27
+ mask-size: cover !important;
28
+ }
29
+ </style>
@@ -0,0 +1,57 @@
1
+ import {
2
+ BarChart,
3
+ GraphChart,
4
+ LineChart,
5
+ MapChart,
6
+ PictorialBarChart,
7
+ PieChart,
8
+ RadarChart,
9
+ } from "echarts/charts";
10
+ import {
11
+ AriaComponent,
12
+ CalendarComponent,
13
+ DataZoomComponent,
14
+ GraphicComponent,
15
+ GridComponent,
16
+ LegendComponent,
17
+ ParallelComponent,
18
+ PolarComponent,
19
+ RadarComponent,
20
+ TimelineComponent,
21
+ TitleComponent,
22
+ ToolboxComponent,
23
+ TooltipComponent,
24
+ VisualMapComponent,
25
+ } from "echarts/components";
26
+ import * as echarts from "echarts/core";
27
+ // TODO 如果想换成SVG渲染,就导出SVGRenderer,
28
+ // 并且放到 echarts.use 里,注释掉 CanvasRenderer
29
+ import { /* SVGRenderer */ CanvasRenderer } from "echarts/renderers";
30
+
31
+ echarts.use([
32
+ LegendComponent,
33
+ TitleComponent,
34
+ TooltipComponent,
35
+ GridComponent,
36
+ PolarComponent,
37
+ AriaComponent,
38
+ ParallelComponent,
39
+ BarChart,
40
+ LineChart,
41
+ PieChart,
42
+ MapChart,
43
+ RadarChart,
44
+ GraphChart,
45
+ // TODO 因为要兼容Online图表自适应打印,所以改成 CanvasRenderer,可能会模糊
46
+ CanvasRenderer,
47
+ PictorialBarChart,
48
+ RadarComponent,
49
+ ToolboxComponent,
50
+ DataZoomComponent,
51
+ VisualMapComponent,
52
+ TimelineComponent,
53
+ CalendarComponent,
54
+ GraphicComponent,
55
+ ]);
56
+
57
+ export default echarts;
@@ -0,0 +1,65 @@
1
+ import type { EChartsOption } from "echarts";
2
+
3
+ import type { ShallowRef } from "vue";
4
+
5
+ import { debounce } from "radashi";
6
+
7
+ import echarts from "./lib";
8
+
9
+ type setOptionsType = (options: EChartsOption, clear?: boolean) => void;
10
+
11
+ export function useECharts(
12
+ elRef: Ref<HTMLDivElement> | Readonly<ShallowRef<HTMLDivElement | null>>,
13
+ ) {
14
+ let chartInstance: echarts.ECharts | null = null;
15
+ let resizeObserver: ResizeObserver | undefined;
16
+
17
+ const resize = () => {
18
+ chartInstance?.resize();
19
+ };
20
+
21
+ const initCharts = () => {
22
+ if (!elRef) return;
23
+ const el = unref(elRef);
24
+ if (!el) return;
25
+
26
+ resizeObserver = new ResizeObserver(
27
+ debounce(
28
+ {
29
+ delay: 100,
30
+ },
31
+ resize,
32
+ ),
33
+ );
34
+ resizeObserver.observe(el);
35
+
36
+ chartInstance = echarts.init(el);
37
+ };
38
+
39
+ const setOptions: setOptionsType = (options, clear = true) => {
40
+ if (!chartInstance) {
41
+ initCharts();
42
+ if (!chartInstance) return;
43
+ }
44
+ clear && chartInstance?.clear();
45
+ chartInstance?.setOption(options);
46
+ };
47
+
48
+ const getInstance: () => echarts.ECharts | null = () => {
49
+ if (!chartInstance) initCharts();
50
+ return chartInstance;
51
+ };
52
+
53
+ onUnmounted(() => {
54
+ chartInstance?.dispose();
55
+ resizeObserver?.disconnect();
56
+ resizeObserver = undefined;
57
+ });
58
+
59
+ return {
60
+ setOptions,
61
+ resize,
62
+ echarts,
63
+ getInstance,
64
+ };
65
+ }
@@ -0,0 +1,30 @@
1
+ <script setup lang="ts">
2
+ import { useUserStoreWithOut } from '@/store/modules/user'
3
+
4
+ const userStore = useUserStoreWithOut()
5
+ const router = useRouter()
6
+
7
+ function handleMenuClick({ key }: { key: string }) {
8
+ if (key === 'logout') {
9
+ userStore.$reset()
10
+ router.push('/login')
11
+ }
12
+ }
13
+
14
+ const dropdownItems = [
15
+ { key: 'logout', label: '退出登录' },
16
+ ]
17
+ </script>
18
+
19
+ <template>
20
+ <div class="flex gap-3 items-center">
21
+ <ADropdown :menu="{ items: dropdownItems, onClick: handleMenuClick }">
22
+ <div class="flex-center gap-2 cursor-pointer">
23
+ <AAvatar :size="32" :src="userStore.avatar">
24
+ {{ userStore.name?.charAt(0).toUpperCase() }}
25
+ </AAvatar>
26
+ <span class="text-sm">{{ userStore.name }}</span>
27
+ </div>
28
+ </ADropdown>
29
+ </div>
30
+ </template>