@liujitcn/kratos-admin-core 0.0.1

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 (368) hide show
  1. package/README.md +168 -0
  2. package/build/getEnv.ts +46 -0
  3. package/build/plugins.ts +206 -0
  4. package/build/proxy.ts +29 -0
  5. package/dist/package/declarations/build/getEnv.d.ts +13 -0
  6. package/dist/package/declarations/build/plugins.d.ts +20 -0
  7. package/dist/package/declarations/build/proxy.d.ts +10 -0
  8. package/dist/package/declarations/index.d.ts +7 -0
  9. package/dist/package/declarations/src/App.vue.d.ts +3 -0
  10. package/dist/package/declarations/src/api/base/config.d.ts +7 -0
  11. package/dist/package/declarations/src/api/base/file.d.ts +11 -0
  12. package/dist/package/declarations/src/api/base/login.d.ts +18 -0
  13. package/dist/package/declarations/src/api/base/oauth.d.ts +12 -0
  14. package/dist/package/declarations/src/api/system/auth.d.ts +13 -0
  15. package/dist/package/declarations/src/api/system/base_dict.d.ts +8 -0
  16. package/dist/package/declarations/src/api/system/base_tenant.d.ts +9 -0
  17. package/dist/package/declarations/src/auth.d.ts +1 -0
  18. package/dist/package/declarations/src/bootstrap.d.ts +23 -0
  19. package/dist/package/declarations/src/components/Card/DataPanelCard.vue.d.ts +23 -0
  20. package/dist/package/declarations/src/components/CronExpression/index.vue.d.ts +15 -0
  21. package/dist/package/declarations/src/components/Dialog/FormDialog.vue.d.ts +74 -0
  22. package/dist/package/declarations/src/components/Dialog/ProDialog.vue.d.ts +58 -0
  23. package/dist/package/declarations/src/components/Dict/DictLabel.vue.d.ts +11 -0
  24. package/dist/package/declarations/src/components/Dict/index.vue.d.ts +30 -0
  25. package/dist/package/declarations/src/components/ECharts/config/index.d.ts +7 -0
  26. package/dist/package/declarations/src/components/ECharts/index.vue.d.ts +22 -0
  27. package/dist/package/declarations/src/components/ErrorMessage/index.vue.d.ts +12 -0
  28. package/dist/package/declarations/src/components/Grid/components/GridItem.vue.d.ts +34 -0
  29. package/dist/package/declarations/src/components/Grid/index.vue.d.ts +28 -0
  30. package/dist/package/declarations/src/components/Grid/interface/index.d.ts +7 -0
  31. package/dist/package/declarations/src/components/ImportExcel/index.vue.d.ts +26 -0
  32. package/dist/package/declarations/src/components/Loading/fullScreen.d.ts +5 -0
  33. package/dist/package/declarations/src/components/Loading/index.vue.d.ts +3 -0
  34. package/dist/package/declarations/src/components/PasswordStrength/index.vue.d.ts +13 -0
  35. package/dist/package/declarations/src/components/ProForm/components/DynamicList.vue.d.ts +15 -0
  36. package/dist/package/declarations/src/components/ProForm/components/KvList.vue.d.ts +26 -0
  37. package/dist/package/declarations/src/components/ProForm/components/ProFormItem.vue.d.ts +28 -0
  38. package/dist/package/declarations/src/components/ProForm/index.vue.d.ts +36 -0
  39. package/dist/package/declarations/src/components/ProForm/interface/index.d.ts +47 -0
  40. package/dist/package/declarations/src/components/ProTable/components/ColSetting.vue.d.ts +9 -0
  41. package/dist/package/declarations/src/components/ProTable/components/Pagination.vue.d.ts +15 -0
  42. package/dist/package/declarations/src/components/ProTable/components/TableColumn.vue.d.ts +9 -0
  43. package/dist/package/declarations/src/components/ProTable/interface/index.d.ts +187 -0
  44. package/dist/package/declarations/src/components/ProTable.d.ts +5 -0
  45. package/dist/package/declarations/src/components/SearchForm/components/SearchFormItem.vue.d.ts +21 -0
  46. package/dist/package/declarations/src/components/SearchForm/index.vue.d.ts +22 -0
  47. package/dist/package/declarations/src/components/SelectFilter/index.vue.d.ts +44 -0
  48. package/dist/package/declarations/src/components/SelectIcon/index.vue.d.ts +19 -0
  49. package/dist/package/declarations/src/components/SvgIcon/index.vue.d.ts +15 -0
  50. package/dist/package/declarations/src/components/SwitchDark/index.vue.d.ts +3 -0
  51. package/dist/package/declarations/src/components/TreeFilter/index.vue.d.ts +5866 -0
  52. package/dist/package/declarations/src/components/Upload/File.vue.d.ts +24 -0
  53. package/dist/package/declarations/src/components/Upload/Files.vue.d.ts +26 -0
  54. package/dist/package/declarations/src/components/Upload/Img.vue.d.ts +43 -0
  55. package/dist/package/declarations/src/components/Upload/Imgs.vue.d.ts +46 -0
  56. package/dist/package/declarations/src/components/WangEditor/index.vue.d.ts +29 -0
  57. package/dist/package/declarations/src/config/index.d.ts +6 -0
  58. package/dist/package/declarations/src/config/nprogress.d.ts +3 -0
  59. package/dist/package/declarations/src/directives/index.d.ts +5 -0
  60. package/dist/package/declarations/src/directives/modules/auth.d.ts +3 -0
  61. package/dist/package/declarations/src/directives/modules/copy.d.ts +8 -0
  62. package/dist/package/declarations/src/directives/modules/debounce.d.ts +8 -0
  63. package/dist/package/declarations/src/directives/modules/draggable.d.ts +3 -0
  64. package/dist/package/declarations/src/directives/modules/longpress.d.ts +7 -0
  65. package/dist/package/declarations/src/directives/modules/throttle.d.ts +3 -0
  66. package/dist/package/declarations/src/directives/modules/waterMarker.d.ts +5 -0
  67. package/dist/package/declarations/src/enums/httpEnum.d.ts +29 -0
  68. package/dist/package/declarations/src/format.d.ts +1 -0
  69. package/dist/package/declarations/src/hooks/interface/index.d.ts +36 -0
  70. package/dist/package/declarations/src/hooks/useAuthButtons.d.ts +8 -0
  71. package/dist/package/declarations/src/hooks/useDownload.d.ts +9 -0
  72. package/dist/package/declarations/src/hooks/useHandleData.d.ts +10 -0
  73. package/dist/package/declarations/src/hooks/useOnline.d.ts +6 -0
  74. package/dist/package/declarations/src/hooks/useSelection.d.ts +10 -0
  75. package/dist/package/declarations/src/hooks/useTable.d.ts +46 -0
  76. package/dist/package/declarations/src/hooks/useTheme.d.ts +12 -0
  77. package/dist/package/declarations/src/hooks/useTime.d.ts +13 -0
  78. package/dist/package/declarations/src/index.d.ts +3 -0
  79. package/dist/package/declarations/src/layouts/LayoutClassic/index.vue.d.ts +3 -0
  80. package/dist/package/declarations/src/layouts/LayoutColumns/index.vue.d.ts +3 -0
  81. package/dist/package/declarations/src/layouts/LayoutTransverse/index.vue.d.ts +3 -0
  82. package/dist/package/declarations/src/layouts/LayoutVertical/index.vue.d.ts +3 -0
  83. package/dist/package/declarations/src/layouts/components/Footer/index.vue.d.ts +3 -0
  84. package/dist/package/declarations/src/layouts/components/Header/ToolBarLeft.vue.d.ts +3 -0
  85. package/dist/package/declarations/src/layouts/components/Header/ToolBarRight.vue.d.ts +3 -0
  86. package/dist/package/declarations/src/layouts/components/Header/components/AssemblySize.vue.d.ts +3 -0
  87. package/dist/package/declarations/src/layouts/components/Header/components/Avatar.vue.d.ts +3 -0
  88. package/dist/package/declarations/src/layouts/components/Header/components/Breadcrumb.vue.d.ts +3 -0
  89. package/dist/package/declarations/src/layouts/components/Header/components/CollapseIcon.vue.d.ts +3 -0
  90. package/dist/package/declarations/src/layouts/components/Header/components/Fullscreen.vue.d.ts +3 -0
  91. package/dist/package/declarations/src/layouts/components/Header/components/InfoDialog.vue.d.ts +5 -0
  92. package/dist/package/declarations/src/layouts/components/Header/components/PasswordDialog.vue.d.ts +5 -0
  93. package/dist/package/declarations/src/layouts/components/Header/components/SearchMenu.vue.d.ts +3 -0
  94. package/dist/package/declarations/src/layouts/components/Header/components/ThemeSetting.vue.d.ts +3 -0
  95. package/dist/package/declarations/src/layouts/components/Main/components/Maximize.vue.d.ts +3 -0
  96. package/dist/package/declarations/src/layouts/components/Main/index.vue.d.ts +3 -0
  97. package/dist/package/declarations/src/layouts/components/Menu/SubMenu.vue.d.ts +7 -0
  98. package/dist/package/declarations/src/layouts/components/Tabs/components/MoreButton.vue.d.ts +3 -0
  99. package/dist/package/declarations/src/layouts/components/Tabs/index.vue.d.ts +3 -0
  100. package/dist/package/declarations/src/layouts/components/ThemeDrawer/index.vue.d.ts +3 -0
  101. package/dist/package/declarations/src/layouts/index.vue.d.ts +3 -0
  102. package/dist/package/declarations/src/layouts/indexAsync.vue.d.ts +3 -0
  103. package/dist/package/declarations/src/modules/index.d.ts +117 -0
  104. package/dist/package/declarations/src/modules/kratosAdmin.d.ts +4 -0
  105. package/dist/package/declarations/src/navigation.d.ts +2 -0
  106. package/dist/package/declarations/src/request.d.ts +2 -0
  107. package/dist/package/declarations/src/routers/index.d.ts +21 -0
  108. package/dist/package/declarations/src/routers/modules/dynamicRouter.d.ts +4 -0
  109. package/dist/package/declarations/src/routers/modules/staticRouter.d.ts +25 -0
  110. package/dist/package/declarations/src/rpc/base/v1/config.d.ts +23 -0
  111. package/dist/package/declarations/src/rpc/base/v1/file.d.ts +52 -0
  112. package/dist/package/declarations/src/rpc/base/v1/login.d.ts +107 -0
  113. package/dist/package/declarations/src/rpc/base/v1/oauth.d.ts +167 -0
  114. package/dist/package/declarations/src/rpc/common/v1/common.d.ts +57 -0
  115. package/dist/package/declarations/src/rpc/common/v1/enum.d.ts +58 -0
  116. package/dist/package/declarations/src/rpc/common/v1/types.d.ts +60 -0
  117. package/dist/package/declarations/src/rpc/google/protobuf/empty.d.ts +11 -0
  118. package/dist/package/declarations/src/rpc/google/protobuf/wrappers.d.ts +108 -0
  119. package/dist/package/declarations/src/rpc/system/admin/v1/auth.d.ts +156 -0
  120. package/dist/package/declarations/src/rpc/system/admin/v1/base_dict.d.ts +215 -0
  121. package/dist/package/declarations/src/rpc/system/admin/v1/base_tenant.d.ts +112 -0
  122. package/dist/package/declarations/src/rpc/system/common/v1/enum.d.ts +67 -0
  123. package/dist/package/declarations/src/security.d.ts +3 -0
  124. package/dist/package/declarations/src/stores/helper/persist.d.ts +9 -0
  125. package/dist/package/declarations/src/stores/index.d.ts +2 -0
  126. package/dist/package/declarations/src/stores/interface/index.d.ts +90 -0
  127. package/dist/package/declarations/src/stores/modules/auth.d.ts +168 -0
  128. package/dist/package/declarations/src/stores/modules/config.d.ts +26 -0
  129. package/dist/package/declarations/src/stores/modules/dict.d.ts +32 -0
  130. package/dist/package/declarations/src/stores/modules/global.d.ts +4 -0
  131. package/dist/package/declarations/src/stores/modules/keepAlive.d.ts +6 -0
  132. package/dist/package/declarations/src/stores/modules/tabs.d.ts +13 -0
  133. package/dist/package/declarations/src/stores/modules/user.d.ts +29 -0
  134. package/dist/package/declarations/src/stores/runtime.d.ts +4 -0
  135. package/dist/package/declarations/src/styles/theme/aside.d.ts +4 -0
  136. package/dist/package/declarations/src/styles/theme/header.d.ts +4 -0
  137. package/dist/package/declarations/src/styles/theme/menu.d.ts +4 -0
  138. package/dist/package/declarations/src/table.d.ts +1 -0
  139. package/dist/package/declarations/src/tenant.d.ts +1 -0
  140. package/dist/package/declarations/src/utils/color.d.ts +28 -0
  141. package/dist/package/declarations/src/utils/dict.d.ts +15 -0
  142. package/dist/package/declarations/src/utils/eleValidate.d.ts +4 -0
  143. package/dist/package/declarations/src/utils/errorHandler.d.ts +5 -0
  144. package/dist/package/declarations/src/utils/index.d.ts +192 -0
  145. package/dist/package/declarations/src/utils/is/index.d.ts +72 -0
  146. package/dist/package/declarations/src/utils/mittBus.d.ts +2 -0
  147. package/dist/package/declarations/src/utils/oauthProvider.d.ts +19 -0
  148. package/dist/package/declarations/src/utils/passwordCrypto.d.ts +6 -0
  149. package/dist/package/declarations/src/utils/passwordStrength.d.ts +36 -0
  150. package/dist/package/declarations/src/utils/proTable.d.ts +44 -0
  151. package/dist/package/declarations/src/utils/request.d.ts +11 -0
  152. package/dist/package/declarations/src/utils/router.d.ts +14 -0
  153. package/dist/package/declarations/src/utils/svg.d.ts +4 -0
  154. package/dist/package/declarations/src/utils/tenant.d.ts +6 -0
  155. package/dist/package/declarations/src/utils/utils.d.ts +12 -0
  156. package/dist/package/declarations/src/views/error/403.vue.d.ts +3 -0
  157. package/dist/package/declarations/src/views/error/404.vue.d.ts +3 -0
  158. package/dist/package/declarations/src/views/error/500.vue.d.ts +3 -0
  159. package/dist/package/declarations/src/views/error/pending.vue.d.ts +3 -0
  160. package/dist/package/declarations/src/views/login/components/LoginForm.vue.d.ts +4 -0
  161. package/dist/package/declarations/src/views/login/index.vue.d.ts +3 -0
  162. package/dist/package/declarations/vite.config.d.ts +13 -0
  163. package/dist/package/src/App.vue +25 -0
  164. package/dist/package/src/api/base/config.ts +19 -0
  165. package/dist/package/src/api/base/file.ts +75 -0
  166. package/dist/package/src/api/base/login.ts +81 -0
  167. package/dist/package/src/api/base/oauth.ts +50 -0
  168. package/dist/package/src/api/system/auth.ts +45 -0
  169. package/dist/package/src/api/system/base_dict.ts +19 -0
  170. package/dist/package/src/api/system/base_tenant.ts +20 -0
  171. package/dist/package/src/assets/fonts/DIN.otf +0 -0
  172. package/dist/package/src/assets/fonts/MetroDF.ttf +0 -0
  173. package/dist/package/src/assets/fonts/YouSheBiaoTiHei.ttf +0 -0
  174. package/dist/package/src/assets/fonts/font.scss +14 -0
  175. package/dist/package/src/assets/iconfont/iconfont.scss +47 -0
  176. package/dist/package/src/assets/iconfont/iconfont.ttf +0 -0
  177. package/dist/package/src/assets/images/403.png +0 -0
  178. package/dist/package/src/assets/images/404.png +0 -0
  179. package/dist/package/src/assets/images/500.png +0 -0
  180. package/dist/package/src/assets/images/avatar.png +0 -0
  181. package/dist/package/src/assets/images/login_bg.svg +33 -0
  182. package/dist/package/src/assets/images/login_left.png +0 -0
  183. package/dist/package/src/assets/images/logo.svg +1 -0
  184. package/dist/package/src/assets/images/notData.png +0 -0
  185. package/dist/package/src/assets/images/oauth/dingtalk.png +0 -0
  186. package/dist/package/src/assets/images/oauth/feishu.png +0 -0
  187. package/dist/package/src/assets/images/oauth/gitee.png +0 -0
  188. package/dist/package/src/assets/images/oauth/github.png +0 -0
  189. package/dist/package/src/assets/images/oauth/google.png +0 -0
  190. package/dist/package/src/assets/images/oauth/wechat.png +0 -0
  191. package/dist/package/src/assets/images/oauth/wechatwork.png +0 -0
  192. package/dist/package/src/auth.ts +1 -0
  193. package/dist/package/src/bootstrap.ts +69 -0
  194. package/dist/package/src/components/Card/DataPanelCard.vue +67 -0
  195. package/dist/package/src/components/CronExpression/index.vue +713 -0
  196. package/dist/package/src/components/Dialog/FormDialog.vue +160 -0
  197. package/dist/package/src/components/Dialog/ProDialog.vue +96 -0
  198. package/dist/package/src/components/Dict/DictLabel.vue +62 -0
  199. package/dist/package/src/components/Dict/index.vue +157 -0
  200. package/dist/package/src/components/ECharts/config/index.ts +45 -0
  201. package/dist/package/src/components/ECharts/index.vue +108 -0
  202. package/dist/package/src/components/ErrorMessage/index.vue +63 -0
  203. package/dist/package/src/components/Grid/components/GridItem.vue +69 -0
  204. package/dist/package/src/components/Grid/index.vue +169 -0
  205. package/dist/package/src/components/Grid/interface/index.ts +8 -0
  206. package/dist/package/src/components/ImportExcel/index.scss +3 -0
  207. package/dist/package/src/components/ImportExcel/index.vue +150 -0
  208. package/dist/package/src/components/Loading/fullScreen.ts +45 -0
  209. package/dist/package/src/components/Loading/index.scss +67 -0
  210. package/dist/package/src/components/Loading/index.vue +13 -0
  211. package/dist/package/src/components/PasswordStrength/index.vue +127 -0
  212. package/dist/package/src/components/ProForm/components/DynamicList.vue +59 -0
  213. package/dist/package/src/components/ProForm/components/KvList.vue +73 -0
  214. package/dist/package/src/components/ProForm/components/ProFormItem.vue +191 -0
  215. package/dist/package/src/components/ProForm/index.vue +120 -0
  216. package/dist/package/src/components/ProForm/interface/index.ts +74 -0
  217. package/dist/package/src/components/ProTable/components/ColSetting.vue +45 -0
  218. package/dist/package/src/components/ProTable/components/Pagination.vue +58 -0
  219. package/dist/package/src/components/ProTable/components/TableColumn.vue +234 -0
  220. package/dist/package/src/components/ProTable/index.vue +567 -0
  221. package/dist/package/src/components/ProTable/interface/index.ts +223 -0
  222. package/dist/package/src/components/ProTable.ts +8 -0
  223. package/dist/package/src/components/SearchForm/components/SearchFormItem.vue +168 -0
  224. package/dist/package/src/components/SearchForm/index.vue +105 -0
  225. package/dist/package/src/components/SelectFilter/index.scss +63 -0
  226. package/dist/package/src/components/SelectFilter/index.vue +113 -0
  227. package/dist/package/src/components/SelectIcon/index.scss +39 -0
  228. package/dist/package/src/components/SelectIcon/index.vue +105 -0
  229. package/dist/package/src/components/SvgIcon/index.vue +35 -0
  230. package/dist/package/src/components/SwitchDark/index.vue +12 -0
  231. package/dist/package/src/components/TreeFilter/index.scss +44 -0
  232. package/dist/package/src/components/TreeFilter/index.vue +207 -0
  233. package/dist/package/src/components/Upload/File.vue +201 -0
  234. package/dist/package/src/components/Upload/Files.vue +234 -0
  235. package/dist/package/src/components/Upload/Img.vue +306 -0
  236. package/dist/package/src/components/Upload/Imgs.vue +320 -0
  237. package/dist/package/src/components/WangEditor/index.scss +28 -0
  238. package/dist/package/src/components/WangEditor/index.vue +154 -0
  239. package/dist/package/src/config/index.ts +19 -0
  240. package/dist/package/src/config/nprogress.ts +12 -0
  241. package/dist/package/src/directives/index.ts +28 -0
  242. package/dist/package/src/directives/modules/auth.ts +25 -0
  243. package/dist/package/src/directives/modules/copy.ts +39 -0
  244. package/dist/package/src/directives/modules/debounce.ts +32 -0
  245. package/dist/package/src/directives/modules/draggable.ts +50 -0
  246. package/dist/package/src/directives/modules/longpress.ts +49 -0
  247. package/dist/package/src/directives/modules/throttle.ts +42 -0
  248. package/dist/package/src/directives/modules/waterMarker.ts +36 -0
  249. package/dist/package/src/enums/httpEnum.ts +35 -0
  250. package/dist/package/src/format.ts +1 -0
  251. package/dist/package/src/hooks/interface/index.ts +38 -0
  252. package/dist/package/src/hooks/useAuthButtons.ts +25 -0
  253. package/dist/package/src/hooks/useDownload.ts +44 -0
  254. package/dist/package/src/hooks/useHandleData.ts +38 -0
  255. package/dist/package/src/hooks/useOnline.ts +27 -0
  256. package/dist/package/src/hooks/useSelection.ts +34 -0
  257. package/dist/package/src/hooks/useTable.ts +151 -0
  258. package/dist/package/src/hooks/useTheme.ts +111 -0
  259. package/dist/package/src/hooks/useTime.ts +38 -0
  260. package/dist/package/src/index.ts +9 -0
  261. package/dist/package/src/layouts/LayoutClassic/index.scss +60 -0
  262. package/dist/package/src/layouts/LayoutClassic/index.vue +64 -0
  263. package/dist/package/src/layouts/LayoutColumns/index.scss +95 -0
  264. package/dist/package/src/layouts/LayoutColumns/index.vue +113 -0
  265. package/dist/package/src/layouts/LayoutTransverse/index.scss +60 -0
  266. package/dist/package/src/layouts/LayoutTransverse/index.vue +70 -0
  267. package/dist/package/src/layouts/LayoutVertical/index.scss +70 -0
  268. package/dist/package/src/layouts/LayoutVertical/index.vue +119 -0
  269. package/dist/package/src/layouts/components/Footer/index.scss +11 -0
  270. package/dist/package/src/layouts/components/Footer/index.vue +21 -0
  271. package/dist/package/src/layouts/components/Header/ToolBarLeft.vue +23 -0
  272. package/dist/package/src/layouts/components/Header/ToolBarRight.vue +44 -0
  273. package/dist/package/src/layouts/components/Header/components/AssemblySize.vue +39 -0
  274. package/dist/package/src/layouts/components/Header/components/Avatar.vue +226 -0
  275. package/dist/package/src/layouts/components/Header/components/Breadcrumb.vue +117 -0
  276. package/dist/package/src/layouts/components/Header/components/CollapseIcon.vue +21 -0
  277. package/dist/package/src/layouts/components/Header/components/Fullscreen.vue +28 -0
  278. package/dist/package/src/layouts/components/Header/components/InfoDialog.vue +22 -0
  279. package/dist/package/src/layouts/components/Header/components/PasswordDialog.vue +22 -0
  280. package/dist/package/src/layouts/components/Header/components/SearchMenu.vue +207 -0
  281. package/dist/package/src/layouts/components/Header/components/ThemeSetting.vue +14 -0
  282. package/dist/package/src/layouts/components/Main/components/Maximize.vue +39 -0
  283. package/dist/package/src/layouts/components/Main/index.scss +14 -0
  284. package/dist/package/src/layouts/components/Main/index.vue +90 -0
  285. package/dist/package/src/layouts/components/Menu/SubMenu.vue +132 -0
  286. package/dist/package/src/layouts/components/Tabs/components/MoreButton.vue +83 -0
  287. package/dist/package/src/layouts/components/Tabs/index.scss +69 -0
  288. package/dist/package/src/layouts/components/Tabs/index.vue +111 -0
  289. package/dist/package/src/layouts/components/ThemeDrawer/index.scss +137 -0
  290. package/dist/package/src/layouts/components/ThemeDrawer/index.vue +191 -0
  291. package/dist/package/src/layouts/index.vue +50 -0
  292. package/dist/package/src/layouts/indexAsync.vue +54 -0
  293. package/dist/package/src/modules/index.ts +233 -0
  294. package/dist/package/src/modules/kratosAdmin.ts +17 -0
  295. package/dist/package/src/navigation.ts +2 -0
  296. package/dist/package/src/request.ts +2 -0
  297. package/dist/package/src/routers/index.ts +143 -0
  298. package/dist/package/src/routers/modules/dynamicRouter.ts +160 -0
  299. package/dist/package/src/routers/modules/staticRouter.ts +73 -0
  300. package/dist/package/src/rpc/base/v1/config.ts +34 -0
  301. package/dist/package/src/rpc/base/v1/file.ts +66 -0
  302. package/dist/package/src/rpc/base/v1/login.ts +128 -0
  303. package/dist/package/src/rpc/base/v1/oauth.ts +199 -0
  304. package/dist/package/src/rpc/common/v1/common.ts +71 -0
  305. package/dist/package/src/rpc/common/v1/enum.ts +71 -0
  306. package/dist/package/src/rpc/common/v1/types.ts +77 -0
  307. package/dist/package/src/rpc/google/protobuf/empty.ts +19 -0
  308. package/dist/package/src/rpc/google/protobuf/wrappers.ts +124 -0
  309. package/dist/package/src/rpc/system/admin/v1/auth.ts +208 -0
  310. package/dist/package/src/rpc/system/admin/v1/base_dict.ts +249 -0
  311. package/dist/package/src/rpc/system/admin/v1/base_tenant.ts +134 -0
  312. package/dist/package/src/rpc/system/common/v1/enum.ts +80 -0
  313. package/dist/package/src/security.ts +3 -0
  314. package/dist/package/src/stores/helper/persist.ts +19 -0
  315. package/dist/package/src/stores/index.ts +8 -0
  316. package/dist/package/src/stores/interface/index.ts +102 -0
  317. package/dist/package/src/stores/modules/auth.ts +73 -0
  318. package/dist/package/src/stores/modules/config.ts +119 -0
  319. package/dist/package/src/stores/modules/dict.ts +65 -0
  320. package/dist/package/src/stores/modules/global.ts +54 -0
  321. package/dist/package/src/stores/modules/keepAlive.ts +22 -0
  322. package/dist/package/src/stores/modules/tabs.ts +77 -0
  323. package/dist/package/src/stores/modules/user.ts +109 -0
  324. package/dist/package/src/stores/runtime.ts +4 -0
  325. package/dist/package/src/styles/common.scss +144 -0
  326. package/dist/package/src/styles/element-dark.scss +46 -0
  327. package/dist/package/src/styles/element.scss +333 -0
  328. package/dist/package/src/styles/reset.scss +143 -0
  329. package/dist/package/src/styles/theme/aside.ts +16 -0
  330. package/dist/package/src/styles/theme/header.ts +25 -0
  331. package/dist/package/src/styles/theme/menu.ts +31 -0
  332. package/dist/package/src/styles/var.scss +2 -0
  333. package/dist/package/src/table.ts +1 -0
  334. package/dist/package/src/tenant.ts +1 -0
  335. package/dist/package/src/typings/global.d.ts +74 -0
  336. package/dist/package/src/typings/utils.d.ts +17 -0
  337. package/dist/package/src/typings/window.d.ts +8 -0
  338. package/dist/package/src/utils/color.ts +59 -0
  339. package/dist/package/src/utils/dict.ts +17 -0
  340. package/dist/package/src/utils/eleValidate.ts +14 -0
  341. package/dist/package/src/utils/errorHandler.ts +27 -0
  342. package/dist/package/src/utils/index.ts +403 -0
  343. package/dist/package/src/utils/is/index.ts +125 -0
  344. package/dist/package/src/utils/mittBus.ts +5 -0
  345. package/dist/package/src/utils/oauthProvider.ts +79 -0
  346. package/dist/package/src/utils/passwordCrypto.ts +71 -0
  347. package/dist/package/src/utils/passwordStrength.ts +86 -0
  348. package/dist/package/src/utils/proTable.ts +124 -0
  349. package/dist/package/src/utils/request.ts +296 -0
  350. package/dist/package/src/utils/router.ts +43 -0
  351. package/dist/package/src/utils/svg.ts +13 -0
  352. package/dist/package/src/utils/tenant.ts +10 -0
  353. package/dist/package/src/utils/utils.ts +40 -0
  354. package/dist/package/src/views/error/403.vue +8 -0
  355. package/dist/package/src/views/error/404.vue +8 -0
  356. package/dist/package/src/views/error/500.vue +8 -0
  357. package/dist/package/src/views/error/pending.vue +16 -0
  358. package/dist/package/src/views/login/components/LoginForm.vue +797 -0
  359. package/dist/package/src/views/login/index.scss +103 -0
  360. package/dist/package/src/views/login/index.vue +108 -0
  361. package/dist/package/src/vite-env.d.ts +3 -0
  362. package/dist/package/types/generated/auto-imports.d.ts +124 -0
  363. package/dist/package/types/generated/components.d.ts +151 -0
  364. package/package.json +199 -0
  365. package/tsconfig.json +21 -0
  366. package/types/generated/auto-imports.d.ts +124 -0
  367. package/types/generated/components.d.ts +151 -0
  368. package/vite.config.ts +239 -0
@@ -0,0 +1,192 @@
1
+ import type { RouteItem, RouteMeta } from "../rpc/system/admin/v1/auth";
2
+ /** 树形或枚举数据字段映射配置。 */
3
+ type FieldNamesProps = {
4
+ label?: string;
5
+ value?: string;
6
+ children?: string;
7
+ };
8
+ /**
9
+ * 获取菜单图标。
10
+ */
11
+ export declare function getRouteMetaIcon(meta?: RouteMeta): string;
12
+ /**
13
+ * 获取菜单标题。
14
+ */
15
+ export declare function getRouteMetaTitle(meta?: RouteMeta): string;
16
+ /**
17
+ * 判断菜单是否隐藏。
18
+ */
19
+ export declare function getRouteMetaHidden(meta?: RouteMeta): boolean;
20
+ /**
21
+ * 判断目录是否始终显示。
22
+ */
23
+ export declare function getRouteMetaAlwaysShow(meta?: RouteMeta): boolean;
24
+ /**
25
+ * 判断菜单是否全屏。
26
+ */
27
+ export declare function getRouteMetaFull(meta?: RouteMeta): boolean;
28
+ /**
29
+ * 判断菜单是否固定标签。
30
+ */
31
+ export declare function getRouteMetaAffix(meta?: RouteMeta): boolean;
32
+ /**
33
+ * 判断菜单是否缓存。
34
+ */
35
+ export declare function getRouteMetaKeepAlive(meta?: RouteMeta): boolean;
36
+ /**
37
+ * @description 获取localStorage
38
+ * @param {String} key Storage名称
39
+ * @returns {String}
40
+ */
41
+ export declare function localGet(key: string): any;
42
+ /**
43
+ * @description 存储localStorage
44
+ * @param {String} key Storage名称
45
+ * @param {*} value Storage值
46
+ * @returns {void}
47
+ */
48
+ export declare function localSet(key: string, value: any): void;
49
+ /**
50
+ * @description 清除localStorage
51
+ * @param {String} key Storage名称
52
+ * @returns {void}
53
+ */
54
+ export declare function localRemove(key: string): void;
55
+ /**
56
+ * @description 清除所有localStorage
57
+ * @returns {void}
58
+ */
59
+ export declare function localClear(): void;
60
+ /**
61
+ * @description 判断数据类型
62
+ * @param {*} val 需要判断类型的数据
63
+ * @returns {String}
64
+ */
65
+ export declare function isType(val: any): string;
66
+ /**
67
+ * @description 生成唯一 uuid
68
+ * @returns {String}
69
+ */
70
+ export declare function generateUUID(): string;
71
+ /**
72
+ * 判断两个对象是否相同
73
+ * @param {Object} a 要比较的对象一
74
+ * @param {Object} b 要比较的对象二
75
+ * @returns {Boolean} 相同返回 true,反之 false
76
+ */
77
+ export declare function isObjectValueEqual(a: {
78
+ [key: string]: any;
79
+ }, b: {
80
+ [key: string]: any;
81
+ }): boolean;
82
+ /**
83
+ * @description 生成随机数
84
+ * @param {Number} min 最小值
85
+ * @param {Number} max 最大值
86
+ * @returns {Number}
87
+ */
88
+ export declare function randomNum(min: number, max: number): number;
89
+ /**
90
+ * @description 获取当前时间对应的提示语
91
+ * @returns {String}
92
+ */
93
+ export declare function getTimeState(): "早上好 ⛅" | "中午好 🌞" | "下午好 🌞" | "晚上好 🌛" | "凌晨好 🌛" | undefined;
94
+ /**
95
+ * @description 获取不同路由模式所对应的 url + params
96
+ * @returns {String}
97
+ */
98
+ export declare function getUrlWithParams(): string;
99
+ /**
100
+ * 判断路径是否为外部链接。
101
+ */
102
+ export declare function isExternalPath(path?: string): boolean;
103
+ /** 获取菜单项实际跳转目标,外链优先使用 redirect。 */
104
+ export declare function getRouteTarget(item: RouteItem): string;
105
+ /** 获取菜单节点在 Element Plus 菜单树中的稳定索引。 */
106
+ export declare function getRouteMenuKey(item: RouteItem): string;
107
+ /** 判断菜单节点或其子节点是否对应当前路由。 */
108
+ export declare function isRouteMenuActive(item: RouteItem, currentPath: string): boolean;
109
+ /**
110
+ * @description 使用递归扁平化菜单,方便添加动态路由
111
+ * @param {Array} menuList 菜单列表
112
+ * @returns {Array}
113
+ */
114
+ export declare function getFlatMenuList(menuList: RouteItem[]): RouteItem[];
115
+ /**
116
+ * @description 使用递归过滤出需要渲染在左侧菜单的列表 (需剔除 hide == true 的菜单)
117
+ * @param {Array} menuList 菜单列表
118
+ * @returns {Array}
119
+ * */
120
+ export declare function getShowMenuList(menuList: RouteItem[]): RouteItem[];
121
+ /**
122
+ * @description 使用递归找出所有面包屑存储到 pinia/vuex 中
123
+ * @param {Array} menuList 菜单列表
124
+ * @param {Array} parent 父级菜单
125
+ * @param {Object} result 处理后的结果
126
+ * @returns {Object}
127
+ */
128
+ export declare const getAllBreadcrumbList: (menuList: RouteItem[], parent?: RouteItem[], result?: Record<string, RouteItem[]>) => Record<string, RouteItem[]>;
129
+ /**
130
+ * @description 使用递归处理路由菜单 path,生成一维数组 (第一版本地路由鉴权会用到,该函数暂未使用)
131
+ * @param {Array} menuList 所有菜单列表
132
+ * @param {Array} menuPathArr 菜单地址的一维数组 ['**','**']
133
+ * @returns {Array}
134
+ */
135
+ export declare function getMenuListPath(menuList: RouteItem[], menuPathArr?: string[]): string[];
136
+ /**
137
+ * @description 递归查询当前 path 所对应的菜单对象 (该函数暂未使用)
138
+ * @param {Array} menuList 菜单列表
139
+ * @param {String} path 当前访问地址
140
+ * @returns {Object | null}
141
+ */
142
+ export declare function findMenuByPath(menuList: RouteItem[], path: string): RouteItem | null;
143
+ /**
144
+ * @description 使用递归过滤需要缓存的菜单 name (该函数暂未使用)
145
+ * @param {Array} menuList 所有菜单列表
146
+ * @param {Array} keepAliveNameArr 缓存的菜单 name ['**','**']
147
+ * @returns {Array}
148
+ * */
149
+ export declare function getKeepAliveRouterName(menuList: RouteItem[], keepAliveNameArr?: string[]): string[];
150
+ /**
151
+ * @description 格式化表格单元格默认值 (el-table-column)
152
+ * @param {Number} row 行
153
+ * @param {Number} col 列
154
+ * @param {*} callValue 当前单元格值
155
+ * @returns {String}
156
+ * */
157
+ export declare function formatTableColumn(row: number, col: number, callValue: any): any;
158
+ /**
159
+ * @description 处理 ProTable 值为数组 || 无数据
160
+ * @param {*} callValue 需要处理的值
161
+ * @returns {String}
162
+ * */
163
+ export declare function formatValue(callValue: any): any;
164
+ /**
165
+ * @description 处理 prop 为多级嵌套的情况,返回的数据 (列如: prop: user.name)
166
+ * @param {Object} row 当前行数据
167
+ * @param {String} prop 当前 prop
168
+ * @returns {*}
169
+ * */
170
+ export declare function handleRowAccordingToProp(row: {
171
+ [key: string]: any;
172
+ }, prop: string): any;
173
+ /**
174
+ * @description 处理 prop,当 prop 为多级嵌套时 ==> 返回最后一级 prop
175
+ * @param {String} prop 当前 prop
176
+ * @returns {String}
177
+ * */
178
+ export declare function handleProp(prop: string): string;
179
+ /**
180
+ * @description 根据枚举列表查询当需要的数据(如果指定了 label 和 value 的 key值,会自动识别格式化)
181
+ * @param {String} callValue 当前单元格值
182
+ * @param {Array} enumData 字典列表
183
+ * @param {Array} fieldNames label && value && children 的 key 值
184
+ * @param {String} type 过滤类型(目前只有 tag)
185
+ * @returns {String}
186
+ * */
187
+ export declare function filterEnum(callValue: any, enumData?: any, fieldNames?: FieldNamesProps, type?: "tag"): any;
188
+ /**
189
+ * @description 递归查找 callValue 对应的 enum 值
190
+ * */
191
+ export declare function findItemNested(enumData: any, callValue: any, value: string, children: string): any;
192
+ export {};
@@ -0,0 +1,72 @@
1
+ /**
2
+ * @description: 判断值是否未某个类型
3
+ */
4
+ export declare function is(val: unknown, type: string): boolean;
5
+ /**
6
+ * @description: 是否为函数
7
+ */
8
+ export declare function isFunction<T = Function>(val: unknown): val is T;
9
+ /**
10
+ * @description: 是否已定义
11
+ */
12
+ export declare const isDef: <T = unknown>(val?: T) => val is T;
13
+ /**
14
+ * @description: 是否未定义
15
+ */
16
+ export declare const isUnDef: <T = unknown>(val?: T) => val is T;
17
+ /**
18
+ * @description: 是否为对象
19
+ */
20
+ export declare const isObject: (val: any) => val is Record<any, any>;
21
+ /**
22
+ * @description: 是否为时间
23
+ */
24
+ export declare function isDate(val: unknown): val is Date;
25
+ /**
26
+ * @description: 是否为数值
27
+ */
28
+ export declare function isNumber(val: unknown): val is number;
29
+ /**
30
+ * @description: 是否为AsyncFunction
31
+ */
32
+ export declare function isAsyncFunction<T = any>(val: unknown): val is Promise<T>;
33
+ /**
34
+ * @description: 是否为promise
35
+ */
36
+ export declare function isPromise<T = any>(val: unknown): val is Promise<T>;
37
+ /**
38
+ * @description: 是否为字符串
39
+ */
40
+ export declare function isString(val: unknown): val is string;
41
+ /**
42
+ * @description: 是否为boolean类型
43
+ */
44
+ export declare function isBoolean(val: unknown): val is boolean;
45
+ /**
46
+ * @description: 是否为数组
47
+ */
48
+ export declare function isArray(val: any): val is Array<any>;
49
+ /**
50
+ * @description: 是否客户端
51
+ */
52
+ export declare const isClient: () => boolean;
53
+ /**
54
+ * @description: 是否为浏览器
55
+ */
56
+ export declare const isWindow: (val: any) => val is Window;
57
+ /**
58
+ * @description: 是否为 element 元素
59
+ */
60
+ export declare const isElement: (val: unknown) => val is Element;
61
+ /**
62
+ * @description: 是否为 null
63
+ */
64
+ export declare function isNull(val: unknown): val is null;
65
+ /**
66
+ * @description: 是否为 null || undefined
67
+ */
68
+ export declare function isNullOrUnDef(val: unknown): val is null | undefined;
69
+ /**
70
+ * @description: 是否为 16 进制颜色
71
+ */
72
+ export declare const isHexColor: (str: string) => boolean;
@@ -0,0 +1,2 @@
1
+ declare const mittBus: import("mitt").Emitter<Record<import("mitt").EventType, unknown>>;
2
+ export default mittBus;
@@ -0,0 +1,19 @@
1
+ import { type Component } from "vue";
2
+ /** 三方登录展示信息。 */
3
+ export interface OauthProviderDisplay {
4
+ /** 登录方式名称。 */
5
+ name: string;
6
+ /** 登录方式图标标识。 */
7
+ icon: string;
8
+ }
9
+ /** 带三方登录 provider 标识的数据。 */
10
+ export interface OauthProviderSource {
11
+ /** 登录方式标识。 */
12
+ provider: string;
13
+ }
14
+ /** 根据 provider 标识获取前端展示信息。 */
15
+ export declare function getOauthProviderDisplay(provider: string): OauthProviderDisplay;
16
+ /** 获取三方登录真实品牌图标组件。 */
17
+ export declare function getOauthProviderIcon(provider: OauthProviderSource & OauthProviderDisplay): Component;
18
+ /** 为接口返回的三方登录数据补齐前端展示信息。 */
19
+ export declare function withOauthProviderDisplay<T extends OauthProviderSource>(item: T): T & OauthProviderDisplay;
@@ -0,0 +1,6 @@
1
+ import { PasswordCryptoScene } from "../rpc/common/v1/enum";
2
+ import type { PasswordCrypto } from "../rpc/common/v1/types";
3
+ export declare const PASSWORD_CRYPTO_SCENE: typeof PasswordCryptoScene;
4
+ export type { PasswordCryptoScene };
5
+ /** 加密单个密码字段,返回后端可解析的密码密文。 */
6
+ export declare function encryptPassword(password: string, scene: PasswordCryptoScene): Promise<PasswordCrypto>;
@@ -0,0 +1,36 @@
1
+ /** 密码强度等级。 */
2
+ export type PasswordStrengthLevel = "empty" | "low" | "medium" | "high";
3
+ /** 密码强度分析结果。 */
4
+ export interface PasswordStrengthResult {
5
+ /** 命中的复杂度条件数量。 */
6
+ ruleScore: number;
7
+ /** 强度条得分。 */
8
+ strengthScore: number;
9
+ /** 强度等级。 */
10
+ level: PasswordStrengthLevel;
11
+ /** 强度文案。 */
12
+ text: string;
13
+ /** 是否达到允许提交的最高强度。 */
14
+ isValid: boolean;
15
+ }
16
+ /** 密码强度错误提示。 */
17
+ export declare const PASSWORD_STRENGTH_ERROR_MESSAGE = "\u5BC6\u7801\u9700\u540C\u65F6\u5305\u542B\u5927\u5C0F\u5199\u5B57\u6BCD\u3001\u6570\u5B57\u3001\u7279\u6B8A\u5B57\u7B26\uFF0C\u4E14\u957F\u5EA6\u4E0D\u5C11\u4E8E 8 \u4F4D";
18
+ /** 密码强度说明文案。 */
19
+ export declare const PASSWORD_STRENGTH_TIP = "\u9700\u540C\u65F6\u5305\u542B\u5927\u5C0F\u5199\u5B57\u6BCD\u3001\u6570\u5B57\u3001\u7279\u6B8A\u5B57\u7B26\uFF0C\u4E14\u957F\u5EA6\u4E0D\u5C11\u4E8E 8 \u4F4D\uFF0C\u8FBE\u5230\u6700\u9AD8\u5F3A\u5EA6\u540E\u624D\u53EF\u63D0\u4EA4\u3002";
20
+ /**
21
+ * 计算密码强度结果,供表单展示和校验统一复用。
22
+ *
23
+ * @param password 当前密码
24
+ * @returns 密码强度分析结果
25
+ */
26
+ export declare function getPasswordStrength(password?: string): PasswordStrengthResult;
27
+ /**
28
+ * 校验密码是否达到最高强度,便于表单规则直接复用。
29
+ *
30
+ * @param password 当前密码
31
+ * @returns 校验结果
32
+ */
33
+ export declare function validatePasswordStrengthValue(password?: string): {
34
+ valid: boolean;
35
+ message: string;
36
+ };
@@ -0,0 +1,44 @@
1
+ import type { ColumnProps, EnumProps } from "../components/ProTable/interface";
2
+ /** 字典值输出给表格枚举时的目标类型。 */
3
+ type DictValueType = "number" | "string";
4
+ /** 表格批量操作支持的主键类型。 */
5
+ type SelectedId = string | number;
6
+ /** 表格单元格支持的对齐方式。 */
7
+ export type TableAlign = "left" | "center" | "right";
8
+ /** 表格分页入参。 */
9
+ type PageRequestParams = Record<string, any> & {
10
+ /** 当前页码。 */
11
+ page_num?: string | number;
12
+ /** 每页条数。 */
13
+ page_size?: string | number;
14
+ };
15
+ /** 归一化后的分页请求。 */
16
+ type NormalizedPageRequest<T extends PageRequestParams> = T & {
17
+ /** 接口请求当前页码。 */
18
+ page_num: number;
19
+ /** 接口请求每页条数。 */
20
+ page_size: number;
21
+ };
22
+ /**
23
+ * 根据列语义和当前表格数据解析单元格对齐方式。
24
+ *
25
+ * 显式 align 始终优先;数据表映射按文本左对齐,字典、静态枚举及预置状态列居中,
26
+ * 金额列和纯数字列右对齐,其余内容左对齐。空表时会先按列语义返回默认值,
27
+ * 数据加载后由响应式表格重新解析。
28
+ */
29
+ export declare function resolveTableColumnAlign(column: ColumnProps, rows?: Record<string, any>[]): TableAlign;
30
+ /**
31
+ * 将字典缓存转换为 ProTable 搜索枚举数据。
32
+ */
33
+ export declare function buildDictEnum(code: string, valueType?: DictValueType): Promise<{
34
+ data: EnumProps[];
35
+ }>;
36
+ /**
37
+ * 统一补齐分页请求参数,避免组件透传时出现字符串页码。
38
+ */
39
+ export declare function buildPageRequest<T extends PageRequestParams>(params: T): NormalizedPageRequest<T>;
40
+ /**
41
+ * 统一整理表格多选和单条操作产生的 ID 集合。
42
+ */
43
+ export declare function normalizeSelectedIds(selected?: SelectedId | SelectedId[]): SelectedId[];
44
+ export {};
@@ -0,0 +1,11 @@
1
+ export declare const requestBaseURL: string;
2
+ declare const service: import("axios").AxiosInstance;
3
+ /** 判断当前访问令牌是否仍在有效期内。 */
4
+ export declare function hasValidAccessToken(): boolean;
5
+ /** 读取最新可用访问令牌,必要时先串行刷新,供 axios、fetch 与 SSE 共用。 */
6
+ export declare function getRequestAccessToken(): Promise<string>;
7
+ /** 尝试通过刷新令牌恢复访问令牌,供路由守卫进入页面前调用。 */
8
+ export declare function ensureAccessToken(): Promise<boolean>;
9
+ /** 统一处理认证失效 */
10
+ export declare function handleAuthExpired(): void;
11
+ export default service;
@@ -0,0 +1,14 @@
1
+ import type { RouteLocationRaw, Router } from "vue-router";
2
+ /**
3
+ * 判断当前解析结果是否只命中了全局 404 占位路由。
4
+ */
5
+ export declare function isUnmatchedRoute(router: Router, path: string): boolean;
6
+ /**
7
+ * 将前端路由地址转换为当前站点的绝对 URL,供后端 OAuth 回调重定向使用。
8
+ */
9
+ export declare function resolveFrontendRouteURL(router: Router, location: RouteLocationRaw): string;
10
+ /**
11
+ * 统一处理站内页面跳转;若目标路由尚未注册,则补跑动态路由初始化后重试。
12
+ * 若路由实例已可解析但 push 失败,则降级为浏览器地址跳转。
13
+ */
14
+ export declare function navigateTo(router: Router, path: string, query?: Record<string, string | number>): Promise<void | import("vue-router").NavigationFailure>;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * @description Loading Svg
3
+ */
4
+ export declare const loadingSvg = "\n<path class=\"path\" d=\"\n\tM 30 15\n\tL 28 17\n\tM 25.61 25.61\n\tA 15 15, 0, 0, 1, 15 30\n\tA 15 15, 0, 1, 1, 27.99 7.5\n\tL 15 15\n\" style=\"stroke-width: 4px; fill: rgba(0, 0, 0, 0)\"/>\n";
@@ -0,0 +1,6 @@
1
+ /** 默认租户编码。 */
2
+ export declare const DEFAULT_TENANT_CODE = "0000";
3
+ /** 读取租户列表筛选选项。 */
4
+ export declare function requestTenantOptions(): Promise<{
5
+ data: import("../rpc/common/v1/common").SelectOptionResponse_Option[];
6
+ }>;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * JSON 格式化显示。
3
+ */
4
+ export declare function formatJson(str: string): string;
5
+ /**
6
+ * 将后端分单位金额转换为元字符串。
7
+ */
8
+ export declare function formatPrice(price?: number): string;
9
+ /**
10
+ * 按静态资源域名补齐图片地址。
11
+ */
12
+ export declare function formatSrc(src: string): string;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import "go-captcha-vue/dist/style.css";
2
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
3
+ declare const _default: typeof __VLS_export;
4
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,13 @@
1
+ /** 管理端宿主 Vite 配置参数。 */
2
+ export interface AdminViteConfigOptions {
3
+ /** 宿主启用的业务模块 npm 包名。 */
4
+ modulePackages?: string[];
5
+ /** 业务模块需要预构建的依赖。 */
6
+ optimizeDependencies?: string[];
7
+ /** 静态资源构建输出目录。 */
8
+ outputDirectory?: string;
9
+ }
10
+ /** 创建管理端宿主 Vite 配置。 */
11
+ export declare function defineAdminViteConfig(options?: AdminViteConfigOptions): import("vite").UserConfigFnObject;
12
+ declare const _default: import("vite").UserConfigFnObject;
13
+ export default _default;
@@ -0,0 +1,25 @@
1
+ <template>
2
+ <el-config-provider :locale="zhCn" :size="assemblySize" :button="buttonConfig">
3
+ <router-view></router-view>
4
+ </el-config-provider>
5
+ </template>
6
+
7
+ <script setup lang="ts">
8
+ import { reactive, computed } from "vue";
9
+ import { useTheme } from "./hooks/useTheme";
10
+ import { ElConfigProvider } from "element-plus";
11
+ import { useGlobalStore } from "./stores/modules/global";
12
+ import zhCn from "element-plus/es/locale/lang/zh-cn";
13
+
14
+ const globalStore = useGlobalStore();
15
+
16
+ // init theme
17
+ const { initTheme } = useTheme();
18
+ initTheme();
19
+
20
+ // element assemblySize
21
+ const assemblySize = computed(() => globalStore.assemblySize);
22
+
23
+ // element button config
24
+ const buttonConfig = reactive({ autoInsertSpace: false });
25
+ </script>
@@ -0,0 +1,19 @@
1
+ import service from "../../utils/request";
2
+ import type { ConfigService, GetConfigRequest, GetConfigResponse } from "../../rpc/base/v1/config";
3
+
4
+ const CONFIG_URL = "/v1/base/config";
5
+
6
+ /** 系统配置公共服务 */
7
+ export class ConfigServiceImpl implements ConfigService {
8
+ /** 获取系统配置 */
9
+ GetConfig(request: GetConfigRequest): Promise<GetConfigResponse> {
10
+ return service<GetConfigRequest, GetConfigResponse>({
11
+ url: `${CONFIG_URL}`,
12
+ method: "get",
13
+ params: request,
14
+ headers: { Authorization: "no-auth" }
15
+ });
16
+ }
17
+ }
18
+
19
+ export const defConfigService = new ConfigServiceImpl();
@@ -0,0 +1,75 @@
1
+ import service from "../../utils/request";
2
+ import type { DownloadFileRequest, MultiUploadFileResponse, FileInfo } from "../../rpc/base/v1/file";
3
+
4
+ const FILE_URL = "/v1/base/file";
5
+
6
+ /** 文件服务 */
7
+ export class FileServiceImpl {
8
+ /** 多个文件上传 */
9
+ MultiUploadFile(files: File[], fileType: string): Promise<MultiUploadFileResponse> {
10
+ const formData = new FormData();
11
+ files.map(file => {
12
+ formData.append(file.name, file);
13
+ });
14
+ formData.append("fileType", fileType);
15
+ return service<FormData, MultiUploadFileResponse>({
16
+ url: `${FILE_URL}/multi`,
17
+ method: "post",
18
+ data: formData,
19
+ headers: {
20
+ "Content-Type": "multipart/form-data"
21
+ }
22
+ });
23
+ }
24
+ /** 上传文件 */
25
+ UploadFile(file: File, fileType: string): Promise<FileInfo> {
26
+ const formData = new FormData();
27
+ formData.append("file", file);
28
+ formData.append("fileType", fileType);
29
+ return service<FormData, FileInfo>({
30
+ url: `${FILE_URL}`,
31
+ method: "post",
32
+ data: formData,
33
+ headers: {
34
+ "Content-Type": "multipart/form-data"
35
+ }
36
+ });
37
+ }
38
+ /** 下载文件 */
39
+ async DownloadFile(file: string, fileName: string) {
40
+ try {
41
+ const response = await service<DownloadFileRequest, any>({
42
+ url: `${FILE_URL}`,
43
+ method: "get",
44
+ params: {
45
+ name: fileName,
46
+ path: file
47
+ } as DownloadFileRequest,
48
+ responseType: "blob" // 明确要求返回 Blob 类型
49
+ });
50
+ // 获取文件名
51
+ const contentDisposition = response.headers["content-disposition"];
52
+ let downloadFilename = fileName;
53
+ if (contentDisposition) {
54
+ const match = contentDisposition.match(/filename="?(.+?)"?$/);
55
+ if (match && match[1]) {
56
+ downloadFilename = match[1];
57
+ }
58
+ }
59
+
60
+ // 创建下载链接
61
+ const url = window.URL.createObjectURL(new Blob([response.data]));
62
+ const a = document.createElement("a");
63
+ a.href = url;
64
+ a.download = downloadFilename;
65
+ document.body.appendChild(a);
66
+ a.click();
67
+ document.body.removeChild(a);
68
+ window.URL.revokeObjectURL(url);
69
+ } catch (error) {
70
+ console.error("下载错误:", error);
71
+ }
72
+ }
73
+ }
74
+
75
+ export const defFileService = new FileServiceImpl();