@skyroc/scripts 2.5.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 (333) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +508 -0
  3. package/dist/cli.mjs +78 -0
  4. package/dist/config-BKkdncJS.mjs +987 -0
  5. package/dist/index.mjs +14 -0
  6. package/package.json +83 -0
  7. package/templates/admin/.env +62 -0
  8. package/templates/admin/.env.prod +7 -0
  9. package/templates/admin/.env.test +7 -0
  10. package/templates/admin/.oxlintrc.json +6 -0
  11. package/templates/admin/README.md +508 -0
  12. package/templates/admin/index.html +14 -0
  13. package/templates/admin/package.json +105 -0
  14. package/templates/admin/public/favicon.svg +3 -0
  15. package/templates/admin/src/App.tsx +71 -0
  16. package/templates/admin/src/assets/audio/wechat-style-notification.wav +0 -0
  17. package/templates/admin/src/assets/imgs/skyroc.jpg +0 -0
  18. package/templates/admin/src/assets/svg-icon/activity.svg +1 -0
  19. package/templates/admin/src/assets/svg-icon/at-sign.svg +1 -0
  20. package/templates/admin/src/assets/svg-icon/avatar.svg +1 -0
  21. package/templates/admin/src/assets/svg-icon/banner.svg +1 -0
  22. package/templates/admin/src/assets/svg-icon/cast.svg +1 -0
  23. package/templates/admin/src/assets/svg-icon/chrome.svg +1 -0
  24. package/templates/admin/src/assets/svg-icon/copy.svg +1 -0
  25. package/templates/admin/src/assets/svg-icon/custom-icon.svg +1 -0
  26. package/templates/admin/src/assets/svg-icon/empty-data.svg +1 -0
  27. package/templates/admin/src/assets/svg-icon/error.svg +1 -0
  28. package/templates/admin/src/assets/svg-icon/expectation.svg +1 -0
  29. package/templates/admin/src/assets/svg-icon/heart.svg +1 -0
  30. package/templates/admin/src/assets/svg-icon/logo.svg +15 -0
  31. package/templates/admin/src/assets/svg-icon/network-error.svg +1 -0
  32. package/templates/admin/src/assets/svg-icon/no-icon.svg +1 -0
  33. package/templates/admin/src/assets/svg-icon/no-permission.svg +1 -0
  34. package/templates/admin/src/assets/svg-icon/not-found.svg +1 -0
  35. package/templates/admin/src/assets/svg-icon/service-error.svg +1 -0
  36. package/templates/admin/src/bootstrap.tsx +60 -0
  37. package/templates/admin/src/components/SkyrocAvatar.tsx +13 -0
  38. package/templates/admin/src/components/SystemLogo.tsx +7 -0
  39. package/templates/admin/src/config.ts +125 -0
  40. package/templates/admin/src/features/antd/AntdProvider.tsx +21 -0
  41. package/templates/admin/src/features/auth/components/UserAvatar.tsx +76 -0
  42. package/templates/admin/src/features/auth/use-auth-form-rules.ts +83 -0
  43. package/templates/admin/src/features/auth/use-auth.ts +96 -0
  44. package/templates/admin/src/features/auth/use-login.ts +72 -0
  45. package/templates/admin/src/features/effects/GlobalEffect.tsx +15 -0
  46. package/templates/admin/src/features/menus/dynamic-routes.ts +10 -0
  47. package/templates/admin/src/features/menus/extras.ts +3 -0
  48. package/templates/admin/src/features/menus/menu-category.ts +14 -0
  49. package/templates/admin/src/features/menus/menu-config.ts +5 -0
  50. package/templates/admin/src/features/router/RouterProvider.tsx +18 -0
  51. package/templates/admin/src/features/router/guard.ts +97 -0
  52. package/templates/admin/src/features/router/index.ts +52 -0
  53. package/templates/admin/src/features/router/routeTree.gen.ts +237 -0
  54. package/templates/admin/src/features/router/router-ref.ts +24 -0
  55. package/templates/admin/src/locales/antd.ts +8 -0
  56. package/templates/admin/src/locales/index.ts +22 -0
  57. package/templates/admin/src/locales/sync.ts +14 -0
  58. package/templates/admin/src/main.tsx +9 -0
  59. package/templates/admin/src/pages/(admin)/home/index.tsx +46 -0
  60. package/templates/admin/src/pages/(admin)/layout.tsx +44 -0
  61. package/templates/admin/src/pages/(auth)/login/index.tsx +102 -0
  62. package/templates/admin/src/pages/(auth)/login/layout.tsx +71 -0
  63. package/templates/admin/src/pages/(auth)/login-out.tsx +27 -0
  64. package/templates/admin/src/pages/(errors)/403.tsx +16 -0
  65. package/templates/admin/src/pages/(errors)/404.tsx +16 -0
  66. package/templates/admin/src/pages/(errors)/500.tsx +16 -0
  67. package/templates/admin/src/pages/__root.tsx +54 -0
  68. package/templates/admin/src/pages/error.tsx +19 -0
  69. package/templates/admin/src/pages/index.tsx +14 -0
  70. package/templates/admin/src/pages/loading.tsx +45 -0
  71. package/templates/admin/src/pages/not-found.tsx +9 -0
  72. package/templates/admin/src/plugins/app.tsx +47 -0
  73. package/templates/admin/src/plugins/assets.ts +4 -0
  74. package/templates/admin/src/plugins/index.ts +32 -0
  75. package/templates/admin/src/service/adapter.ts +63 -0
  76. package/templates/admin/src/service/api/auth/api.ts +31 -0
  77. package/templates/admin/src/service/api/auth/hooks.ts +28 -0
  78. package/templates/admin/src/service/api/auth/index.ts +10 -0
  79. package/templates/admin/src/service/api/auth/keys.ts +7 -0
  80. package/templates/admin/src/service/api/auth/urls.ts +7 -0
  81. package/templates/admin/src/service/api/index.ts +2 -0
  82. package/templates/admin/src/service/api/route/api.ts +7 -0
  83. package/templates/admin/src/service/api/route/hooks.ts +21 -0
  84. package/templates/admin/src/service/api/route/index.ts +10 -0
  85. package/templates/admin/src/service/api/route/keys.ts +3 -0
  86. package/templates/admin/src/service/api/route/urls.ts +5 -0
  87. package/templates/admin/src/service/queryClient.ts +13 -0
  88. package/templates/admin/src/service/request/index.ts +62 -0
  89. package/templates/admin/src/styles/scss/global.scss +1 -0
  90. package/templates/admin/src/styles/scss/scrollbar.scss +28 -0
  91. package/templates/admin/src/types/auto-imports.d.ts +186 -0
  92. package/templates/admin/src/types/global.d.ts +16 -0
  93. package/templates/admin/src/types/router.d.ts +14 -0
  94. package/templates/admin/src/types/storage.d.ts +17 -0
  95. package/templates/admin/src/types/vite-env.d.ts +117 -0
  96. package/templates/admin/src/utils/common.tsx +38 -0
  97. package/templates/admin/src/utils/icon.ts +9 -0
  98. package/templates/admin/src/utils/service.ts +75 -0
  99. package/templates/admin/src/utils/storage.ts +7 -0
  100. package/templates/admin/tsconfig.json +22 -0
  101. package/templates/admin/uno.config.ts +18 -0
  102. package/templates/admin/vite.config.ts +13 -0
  103. package/templates/admin-shell/i18n/atoms/lang.ts +20 -0
  104. package/templates/admin-shell/i18n/config/default.ts +11 -0
  105. package/templates/admin-shell/i18n/features/lang/LangEffect.tsx +25 -0
  106. package/templates/admin-shell/i18n/features/lang/LangSwitch.tsx +49 -0
  107. package/templates/admin-shell/i18n/hooks/use-lang.ts +47 -0
  108. package/templates/admin-shell/i18n/i18n.ts +116 -0
  109. package/templates/admin-shell/i18n/index.ts +23 -0
  110. package/templates/admin-shell/i18n/langs/en-us/common.json +49 -0
  111. package/templates/admin-shell/i18n/langs/en-us/datatable.json +8 -0
  112. package/templates/admin-shell/i18n/langs/en-us/dropdown.json +9 -0
  113. package/templates/admin-shell/i18n/langs/en-us/form.json +27 -0
  114. package/templates/admin-shell/i18n/langs/en-us/icon.json +13 -0
  115. package/templates/admin-shell/i18n/langs/en-us/notification.json +20 -0
  116. package/templates/admin-shell/i18n/langs/en-us/page.json +442 -0
  117. package/templates/admin-shell/i18n/langs/en-us/request.json +8 -0
  118. package/templates/admin-shell/i18n/langs/en-us/route.json +84 -0
  119. package/templates/admin-shell/i18n/langs/en-us/system.json +9 -0
  120. package/templates/admin-shell/i18n/langs/en-us/theme.json +173 -0
  121. package/templates/admin-shell/i18n/langs/index.ts +63 -0
  122. package/templates/admin-shell/i18n/langs/zh-cn/common.json +49 -0
  123. package/templates/admin-shell/i18n/langs/zh-cn/datatable.json +8 -0
  124. package/templates/admin-shell/i18n/langs/zh-cn/dropdown.json +9 -0
  125. package/templates/admin-shell/i18n/langs/zh-cn/form.json +27 -0
  126. package/templates/admin-shell/i18n/langs/zh-cn/icon.json +13 -0
  127. package/templates/admin-shell/i18n/langs/zh-cn/notification.json +20 -0
  128. package/templates/admin-shell/i18n/langs/zh-cn/page.json +442 -0
  129. package/templates/admin-shell/i18n/langs/zh-cn/request.json +8 -0
  130. package/templates/admin-shell/i18n/langs/zh-cn/route.json +84 -0
  131. package/templates/admin-shell/i18n/langs/zh-cn/system.json +9 -0
  132. package/templates/admin-shell/i18n/langs/zh-cn/theme.json +173 -0
  133. package/templates/admin-shell/i18n/types/i18n.ts +29 -0
  134. package/templates/admin-shell/i18n/types.ts +53 -0
  135. package/templates/admin-shell/i18n/utils/helpers.ts +18 -0
  136. package/templates/admin-shell/layouts/AdminLayout.tsx +161 -0
  137. package/templates/admin-shell/layouts/constant.ts +56 -0
  138. package/templates/admin-shell/layouts/context.tsx +101 -0
  139. package/templates/admin-shell/layouts/features/menus/MenuBadge.tsx +76 -0
  140. package/templates/admin-shell/layouts/features/menus/dynamic-routes.ts +146 -0
  141. package/templates/admin-shell/layouts/features/menus/menu-generator.tsx +444 -0
  142. package/templates/admin-shell/layouts/features/menus/menu-renderer.tsx +149 -0
  143. package/templates/admin-shell/layouts/features/menus/permissions.ts +28 -0
  144. package/templates/admin-shell/layouts/features/menus/use-menus.ts +98 -0
  145. package/templates/admin-shell/layouts/features/use-route.ts +30 -0
  146. package/templates/admin-shell/layouts/index.ts +44 -0
  147. package/templates/admin-shell/layouts/materials/index.ts +6 -0
  148. package/templates/admin-shell/layouts/materials/libs/admin-layout/index.module.css +63 -0
  149. package/templates/admin-shell/layouts/materials/libs/admin-layout/index.module.css.d.ts +18 -0
  150. package/templates/admin-shell/layouts/materials/libs/admin-layout/index.tsx +238 -0
  151. package/templates/admin-shell/layouts/materials/libs/admin-layout/shared.ts +67 -0
  152. package/templates/admin-shell/layouts/materials/libs/page-tab/ButtonTab.tsx +44 -0
  153. package/templates/admin-shell/layouts/materials/libs/page-tab/ChromeTab.tsx +54 -0
  154. package/templates/admin-shell/layouts/materials/libs/page-tab/ChromeTabBg.tsx +30 -0
  155. package/templates/admin-shell/layouts/materials/libs/page-tab/SliderTab.tsx +44 -0
  156. package/templates/admin-shell/layouts/materials/libs/page-tab/SvgClose.tsx +51 -0
  157. package/templates/admin-shell/layouts/materials/libs/page-tab/hook.ts +34 -0
  158. package/templates/admin-shell/layouts/materials/libs/page-tab/index.module.css +120 -0
  159. package/templates/admin-shell/layouts/materials/libs/page-tab/index.module.css.d.ts +18 -0
  160. package/templates/admin-shell/layouts/materials/libs/page-tab/index.tsx +76 -0
  161. package/templates/admin-shell/layouts/materials/libs/page-tab/shared.ts +32 -0
  162. package/templates/admin-shell/layouts/materials/types/index.ts +322 -0
  163. package/templates/admin-shell/layouts/modules/AdminContent.tsx +285 -0
  164. package/templates/admin-shell/layouts/modules/AdminFooter.tsx +13 -0
  165. package/templates/admin-shell/layouts/modules/AdminLogo.tsx +28 -0
  166. package/templates/admin-shell/layouts/modules/AdminSider.tsx +50 -0
  167. package/templates/admin-shell/layouts/modules/admin-header/AdminHeader.tsx +132 -0
  168. package/templates/admin-shell/layouts/modules/admin-header/components/Breadcrumb.tsx +62 -0
  169. package/templates/admin-shell/layouts/modules/admin-header/components/ThemeButton.tsx +24 -0
  170. package/templates/admin-shell/layouts/modules/admin-menu/AdminMenu.tsx +37 -0
  171. package/templates/admin-shell/layouts/modules/admin-menu/components/FirstLevelMenu.tsx +156 -0
  172. package/templates/admin-shell/layouts/modules/admin-menu/components/HorizontalMenu.tsx +88 -0
  173. package/templates/admin-shell/layouts/modules/admin-menu/components/MenuPortal.tsx +28 -0
  174. package/templates/admin-shell/layouts/modules/admin-menu/components/VerticalMenu.tsx +123 -0
  175. package/templates/admin-shell/layouts/modules/admin-menu/enum.ts +47 -0
  176. package/templates/admin-shell/layouts/modules/admin-menu/modules/Horizontal.tsx +22 -0
  177. package/templates/admin-shell/layouts/modules/admin-menu/modules/TopHybridHeaderFirst.tsx +15 -0
  178. package/templates/admin-shell/layouts/modules/admin-menu/modules/TopHybridSidebarFirst.tsx +18 -0
  179. package/templates/admin-shell/layouts/modules/admin-menu/modules/Vertical.tsx +14 -0
  180. package/templates/admin-shell/layouts/modules/admin-menu/modules/VerticalHybridHeaderFirst.tsx +18 -0
  181. package/templates/admin-shell/layouts/modules/admin-menu/modules/VerticalMix.tsx +132 -0
  182. package/templates/admin-shell/layouts/modules/admin-search/AdminSearch.tsx +36 -0
  183. package/templates/admin-shell/layouts/modules/admin-search/components/SearchFooter.tsx +38 -0
  184. package/templates/admin-shell/layouts/modules/admin-search/components/SearchModal.tsx +171 -0
  185. package/templates/admin-shell/layouts/modules/admin-search/components/SearchResult.tsx +43 -0
  186. package/templates/admin-shell/layouts/modules/admin-tab/AdminTab.tsx +125 -0
  187. package/templates/admin-shell/layouts/modules/admin-tab/components/TabContextMenu.tsx +107 -0
  188. package/templates/admin-shell/layouts/modules/admin-tab/hooks/useTabScroll.ts +86 -0
  189. package/templates/admin-shell/layouts/modules/shared/logo.ts +42 -0
  190. package/templates/admin-shell/layouts/modules/theme-drawer/ThemeDrawer.tsx +68 -0
  191. package/templates/admin-shell/layouts/modules/theme-drawer/components/AnimatedCollapse.tsx +36 -0
  192. package/templates/admin-shell/layouts/modules/theme-drawer/components/AnimatedItem.tsx +35 -0
  193. package/templates/admin-shell/layouts/modules/theme-drawer/components/LayoutModeCard.tsx +110 -0
  194. package/templates/admin-shell/layouts/modules/theme-drawer/components/SettingItem.tsx +31 -0
  195. package/templates/admin-shell/layouts/modules/theme-drawer/modules/ConfigOperation.tsx +53 -0
  196. package/templates/admin-shell/layouts/modules/theme-drawer/modules/appearance/CustomPicker.tsx +105 -0
  197. package/templates/admin-shell/layouts/modules/theme-drawer/modules/appearance/ThemeColor.tsx +58 -0
  198. package/templates/admin-shell/layouts/modules/theme-drawer/modules/appearance/ThemeSchema.tsx +42 -0
  199. package/templates/admin-shell/layouts/modules/theme-drawer/modules/appearance/ThemeToken.tsx +44 -0
  200. package/templates/admin-shell/layouts/modules/theme-drawer/modules/appearance/index.tsx +23 -0
  201. package/templates/admin-shell/layouts/modules/theme-drawer/modules/general/GlobalSettings.tsx +57 -0
  202. package/templates/admin-shell/layouts/modules/theme-drawer/modules/general/ThemeGeneral.tsx +20 -0
  203. package/templates/admin-shell/layouts/modules/theme-drawer/modules/general/WatermarkSettings.tsx +103 -0
  204. package/templates/admin-shell/layouts/modules/theme-drawer/modules/layout/ContentSettings.tsx +100 -0
  205. package/templates/admin-shell/layouts/modules/theme-drawer/modules/layout/FooterSettings.tsx +71 -0
  206. package/templates/admin-shell/layouts/modules/theme-drawer/modules/layout/HeaderSettings.tsx +63 -0
  207. package/templates/admin-shell/layouts/modules/theme-drawer/modules/layout/LayoutMode.tsx +73 -0
  208. package/templates/admin-shell/layouts/modules/theme-drawer/modules/layout/SiderSettings.tsx +124 -0
  209. package/templates/admin-shell/layouts/modules/theme-drawer/modules/layout/TabSettings.tsx +95 -0
  210. package/templates/admin-shell/layouts/modules/theme-drawer/modules/layout/ThemeLayout.tsx +32 -0
  211. package/templates/admin-shell/layouts/modules/theme-drawer/modules/preset/ThemePreset.tsx +132 -0
  212. package/templates/admin-shell/layouts/options.tsx +79 -0
  213. package/templates/admin-shell/layouts/setup.ts +102 -0
  214. package/templates/admin-shell/layouts/state/AdminEffect.tsx +56 -0
  215. package/templates/admin-shell/layouts/state/AdminTabEffect.tsx +28 -0
  216. package/templates/admin-shell/layouts/state/index.ts +3 -0
  217. package/templates/admin-shell/layouts/state/menus/MenuToggler.tsx +53 -0
  218. package/templates/admin-shell/layouts/state/menus/use-admin-menu-badges.ts +46 -0
  219. package/templates/admin-shell/layouts/state/menus/use-admin-menus.tsx +164 -0
  220. package/templates/admin-shell/layouts/state/tabs/index.ts +1 -0
  221. package/templates/admin-shell/layouts/state/tabs/shared.tsx +148 -0
  222. package/templates/admin-shell/layouts/state/tabs/use-admin-tab.ts +377 -0
  223. package/templates/admin-shell/layouts/state/use-admin-state.ts +118 -0
  224. package/templates/admin-shell/layouts/types/router.d.ts +10 -0
  225. package/templates/admin-shell/layouts/types/storage.ts +18 -0
  226. package/templates/admin-shell/notification/NotificationButton.tsx +91 -0
  227. package/templates/admin-shell/notification/NotificationContext.ts +8 -0
  228. package/templates/admin-shell/notification/NotificationPanel.tsx +194 -0
  229. package/templates/admin-shell/notification/NotificationProvider.tsx +59 -0
  230. package/templates/admin-shell/notification/index.ts +12 -0
  231. package/templates/admin-shell/notification/mock.ts +59 -0
  232. package/templates/admin-shell/notification/notification-store.ts +438 -0
  233. package/templates/admin-shell/notification/notification.css +60 -0
  234. package/templates/admin-shell/notification/types.ts +104 -0
  235. package/templates/admin-shell/notification/use-notification.ts +51 -0
  236. package/templates/admin-shell/notification/useNotificationContext.ts +14 -0
  237. package/templates/admin-shell/runtime/app-update.ts +156 -0
  238. package/templates/admin-shell/runtime/dayjs.ts +20 -0
  239. package/templates/admin-shell/runtime/iconify.ts +17 -0
  240. package/templates/admin-shell/runtime/index.ts +10 -0
  241. package/templates/admin-shell/runtime/nprogress.ts +25 -0
  242. package/templates/admin-shell/runtime/plugins.ts +62 -0
  243. package/templates/admin-shell/styles/global.css +54 -0
  244. package/templates/admin-shell/styles/nprogress.css +85 -0
  245. package/templates/admin-shell/styles/reset.css +378 -0
  246. package/templates/admin-shell/theme/antd/AntdProvider.tsx +106 -0
  247. package/templates/admin-shell/theme/antd/index.ts +23 -0
  248. package/templates/admin-shell/theme/antd/shared.ts +80 -0
  249. package/templates/admin-shell/theme/antd/ui.ts +250 -0
  250. package/templates/admin-shell/theme/antd-algorithm/algorithm/dark/colors.ts +99 -0
  251. package/templates/admin-shell/theme/antd-algorithm/algorithm/dark/index.ts +87 -0
  252. package/templates/admin-shell/theme/antd-algorithm/algorithm/default/colors.ts +91 -0
  253. package/templates/admin-shell/theme/antd-algorithm/algorithm/default/index.ts +77 -0
  254. package/templates/admin-shell/theme/antd-algorithm/index.ts +80 -0
  255. package/templates/admin-shell/theme/antd-algorithm/seed/index.ts +41 -0
  256. package/templates/admin-shell/theme/antd-algorithm/shared/colorAlgorithm.ts +10 -0
  257. package/templates/admin-shell/theme/antd-algorithm/shared/genColorMapToken.ts +165 -0
  258. package/templates/admin-shell/theme/antd-algorithm/shared/genCommonMapToken.ts +23 -0
  259. package/templates/admin-shell/theme/antd-algorithm/shared/genControlHeight.ts +14 -0
  260. package/templates/admin-shell/theme/antd-algorithm/shared/genFontMapToken.ts +274 -0
  261. package/templates/admin-shell/theme/antd-algorithm/shared/genRadiusMapToken.ts +139 -0
  262. package/templates/admin-shell/theme/antd-algorithm/shared/genSizeMapToken.ts +114 -0
  263. package/templates/admin-shell/theme/antd-algorithm/types/index.ts +20 -0
  264. package/templates/admin-shell/theme/components/ThemeEffect.tsx +55 -0
  265. package/templates/admin-shell/theme/components/ThemeSchemaSegmented.tsx +27 -0
  266. package/templates/admin-shell/theme/components/ThemeSchemaSwitch.tsx +77 -0
  267. package/templates/admin-shell/theme/components/shared.ts +5 -0
  268. package/templates/admin-shell/theme/config/default.ts +108 -0
  269. package/templates/admin-shell/theme/config/index.ts +1 -0
  270. package/templates/admin-shell/theme/hooks/index.ts +2 -0
  271. package/templates/admin-shell/theme/hooks/use-theme.ts +244 -0
  272. package/templates/admin-shell/theme/index.ts +78 -0
  273. package/templates/admin-shell/theme/presets/azir.json +39 -0
  274. package/templates/admin-shell/theme/presets/compact.json +38 -0
  275. package/templates/admin-shell/theme/presets/dark.json +93 -0
  276. package/templates/admin-shell/theme/presets/default.json +95 -0
  277. package/templates/admin-shell/theme/presets/index.ts +29 -0
  278. package/templates/admin-shell/theme/presets/shadcn.json +99 -0
  279. package/templates/admin-shell/theme/setup.ts +115 -0
  280. package/templates/admin-shell/theme/types/index.ts +27 -0
  281. package/templates/admin-shell/theme/types/theme.d.ts +316 -0
  282. package/templates/admin-shell/theme/utils/dark-mode.ts +46 -0
  283. package/templates/admin-shell/theme/utils/filters.ts +20 -0
  284. package/templates/admin-shell/theme/utils/index.ts +3 -0
  285. package/templates/admin-shell/theme/utils/settings.ts +43 -0
  286. package/templates/admin-shell/types/api/auth.d.ts +148 -0
  287. package/templates/admin-shell/types/api/common.d.ts +54 -0
  288. package/templates/admin-shell/types/api/route.d.ts +104 -0
  289. package/templates/admin-shell/types/api/service.d.ts +51 -0
  290. package/templates/admin-shell/types/api/system-manage.d.ts +160 -0
  291. package/templates/admin-shell/types/app/common.d.ts +31 -0
  292. package/templates/admin-shell/types/app/global.d.ts +71 -0
  293. package/templates/admin-shell/types/app/menu.d.ts +57 -0
  294. package/templates/admin-shell/types/app/router.d.ts +201 -0
  295. package/templates/admin-shell/types/app/storage.d.ts +10 -0
  296. package/templates/admin-shell/types/app/union-key.d.ts +156 -0
  297. package/templates/admin-shell/types/locales/i18n.d.ts +135 -0
  298. package/templates/admin-shell/ui/antd/components/AppTree.tsx +62 -0
  299. package/templates/admin-shell/ui/antd/components/BeyondHiding.tsx +42 -0
  300. package/templates/admin-shell/ui/antd/components/ButtonIcon.tsx +123 -0
  301. package/templates/admin-shell/ui/antd/components/ButtonLink.tsx +30 -0
  302. package/templates/admin-shell/ui/antd/components/ErrorBoundary.tsx +45 -0
  303. package/templates/admin-shell/ui/antd/components/ExceptionBase.tsx +69 -0
  304. package/templates/admin-shell/ui/antd/components/FullScreen.tsx +33 -0
  305. package/templates/admin-shell/ui/antd/components/PinToggler.tsx +35 -0
  306. package/templates/admin-shell/ui/antd/components/ReloadButton.tsx +20 -0
  307. package/templates/admin-shell/ui/antd/components/index.ts +12 -0
  308. package/templates/admin-shell/ui/antd/components/styles/button-icon-animations.css +246 -0
  309. package/templates/admin-shell/ui/antd/index.ts +1 -0
  310. package/templates/admin-shell/ui/antd/styles.d.ts +1 -0
  311. package/templates/admin-shell/ui/compose/animate-feature.ts +5 -0
  312. package/templates/admin-shell/ui/compose/components/BetterScroll.tsx +51 -0
  313. package/templates/admin-shell/ui/compose/components/DarkModeContainer.tsx +22 -0
  314. package/templates/admin-shell/ui/compose/components/FlipText.tsx +41 -0
  315. package/templates/admin-shell/ui/compose/components/I18nLabel.tsx +18 -0
  316. package/templates/admin-shell/ui/compose/components/LazyAnimate.tsx +10 -0
  317. package/templates/admin-shell/ui/compose/components/LookForward.tsx +24 -0
  318. package/templates/admin-shell/ui/compose/components/NumberTicker.tsx +105 -0
  319. package/templates/admin-shell/ui/compose/components/Portal.tsx +74 -0
  320. package/templates/admin-shell/ui/compose/components/SvgIcon.tsx +39 -0
  321. package/templates/admin-shell/ui/compose/components/TypingAnimation.tsx +83 -0
  322. package/templates/admin-shell/ui/compose/components/WaveBg.tsx +56 -0
  323. package/templates/admin-shell/ui/compose/components/index.ts +11 -0
  324. package/templates/admin-shell/ui/compose/index.ts +2 -0
  325. package/templates/admin-shell/ui/compose/table/DragContent.tsx +239 -0
  326. package/templates/admin-shell/ui/compose/table/TableHeaderOperation.tsx +210 -0
  327. package/templates/admin-shell/ui/compose/table/hooks.ts +196 -0
  328. package/templates/admin-shell/ui/compose/table/index.ts +16 -0
  329. package/templates/admin-shell/ui/compose/table/types.ts +244 -0
  330. package/templates/admin-shell/ui/compose/table/use-table-operate.ts +136 -0
  331. package/templates/admin-shell/ui/compose/table/use-table-scroll.ts +49 -0
  332. package/templates/admin-shell/ui/compose/table/use-table.ts +303 -0
  333. package/templates/admin.meta.json +756 -0
@@ -0,0 +1,316 @@
1
+ // oxlint-disable unicorn/require-module-specifiers
2
+ /** The theme namespace */
3
+ declare global {
4
+ namespace Theme {
5
+ /** Color palette number */
6
+ type ColorPaletteNumber = import('@skyroc/color').ColorPaletteNumber;
7
+
8
+ /** Watermark settings (Ant Design) */
9
+ type WatermarkSettings = import('antd').WatermarkProps;
10
+
11
+ /**
12
+ * Theme mode
13
+ *
14
+ * - Auto: follow system theme
15
+ * - Dark: dark mode
16
+ * - Light: light mode
17
+ */
18
+ type ThemeMode = 'auto' | 'dark' | 'light';
19
+
20
+ /**
21
+ * Theme layout mode
22
+ *
23
+ * - Vertical: the vertical menu in left
24
+ * - Horizontal: the horizontal menu in top
25
+ * - Vertical-mix: two vertical mixed menus in left
26
+ * - Vertical-hybrid-header-first: vertical mixed menus with header first-level menu
27
+ * - Top-hybrid-sidebar-first: vertical first level menus in left and horizontal child level menus in top
28
+ * - Top-hybrid-header-first: horizontal first level menus in top and vertical child level menus in left
29
+ */
30
+ type ThemeLayoutMode =
31
+ | 'horizontal'
32
+ | 'top-hybrid-header-first'
33
+ | 'top-hybrid-sidebar-first'
34
+ | 'vertical'
35
+ | 'vertical-hybrid-header-first'
36
+ | 'vertical-mix';
37
+
38
+ /**
39
+ * Theme scroll mode
40
+ *
41
+ * - Wrapper: the wrapper component's root element overflow
42
+ * - Content: the content component overflow
43
+ */
44
+ type ThemeScrollMode = 'content' | 'wrapper';
45
+
46
+ /** Theme page animate mode */
47
+ type ThemePageAnimateMode =
48
+ | 'fade'
49
+ | 'fade-bottom'
50
+ | 'fade-scale'
51
+ | 'fade-slide'
52
+ | 'none'
53
+ | 'zoom-fade'
54
+ | 'zoom-out';
55
+
56
+ /**
57
+ * Theme tab mode
58
+ *
59
+ * - Chrome: chrome style
60
+ * - Button: button style
61
+ */
62
+ type ThemeTabMode = 'button' | 'chrome' | 'slider';
63
+
64
+ /** Theme color key */
65
+ type ThemeColorKey = 'error' | 'info' | 'primary' | 'success' | 'warning';
66
+
67
+ /** Other color (without primary) */
68
+ interface OtherColor {
69
+ error: string;
70
+ info: string;
71
+ success: string;
72
+ warning: string;
73
+ }
74
+
75
+ /** Theme color (includes primary) */
76
+ interface ThemeColor extends OtherColor {
77
+ primary: string;
78
+ }
79
+
80
+ /** Theme icons mapping */
81
+ interface ThemeIcons {
82
+ auto: string;
83
+ dark: string;
84
+ light: string;
85
+ }
86
+
87
+ /** Base watermark settings - platform agnostic */
88
+ interface BaseWatermarkSettings {
89
+ /** Font settings */
90
+ font?: {
91
+ fontSize?: number;
92
+ };
93
+ /** Height */
94
+ height?: number;
95
+ /** Offset */
96
+ offset?: [number, number];
97
+ /** Rotate angle */
98
+ rotate?: number;
99
+ /** Width */
100
+ width?: number;
101
+ /** Z-index */
102
+ zIndex?: number;
103
+ }
104
+
105
+ /** Theme setting token color */
106
+ interface ThemeSettingTokenColor {
107
+ 'base-text': string;
108
+ container: string;
109
+ inverted: string;
110
+ layout: string;
111
+ /** The progress bar color, if not set, will use the primary color */
112
+ nprogress?: string;
113
+ }
114
+
115
+ /** Theme setting token box shadow */
116
+ interface ThemeSettingTokenBoxShadow {
117
+ header: string;
118
+ sider: string;
119
+ tab: string;
120
+ }
121
+
122
+ /** Theme setting token */
123
+ interface ThemeSettingToken {
124
+ boxShadow: ThemeSettingTokenBoxShadow;
125
+ colors: ThemeSettingTokenColor;
126
+ }
127
+
128
+ /** Theme palette color - all color shades */
129
+ type ThemePaletteColor = {
130
+ [key in ThemeColorKey | `${ThemeColorKey}-${ColorPaletteNumber}`]: string;
131
+ };
132
+
133
+ /** Base token type */
134
+ type BaseToken = Record<string, Record<string, string>>;
135
+
136
+ /** Theme token color - palette + setting token color */
137
+ type ThemeTokenColor = ThemePaletteColor & ThemeSettingTokenColor;
138
+
139
+ /** Theme token CSS variables */
140
+ interface ThemeTokenCSSVars {
141
+ boxShadow: ThemeSettingTokenBoxShadow & { [key: string]: string };
142
+ colors: ThemeTokenColor & { [key: string]: string };
143
+ }
144
+
145
+ /** Theme preset metadata */
146
+ interface ThemePresetMeta {
147
+ /** Preset description */
148
+ desc: string;
149
+ /** I18n key for the preset name */
150
+ i18nkey: string;
151
+ /** Preset name */
152
+ name: string;
153
+ /** Display order */
154
+ order: number;
155
+ /** Preset version */
156
+ version: string;
157
+ }
158
+
159
+ /** Theme preset type */
160
+ type ThemePreset = ThemePresetMeta & Partial<ThemeSetting>;
161
+
162
+ /** Theme setting */
163
+ interface ThemeSetting {
164
+ /** Colour weakness mode */
165
+ colourWeakness: boolean;
166
+ /** Fixed header and tab */
167
+ fixedHeaderAndTab: boolean;
168
+ /** Footer */
169
+ footer: {
170
+ /** Whether fixed the footer */
171
+ fixed: boolean;
172
+ /** Footer height */
173
+ height: number;
174
+ /**
175
+ * Whether float the footer to the right when the layout is 'top-hybrid-sidebar-first' or
176
+ * 'top-hybrid-header-first'
177
+ */
178
+ right: boolean;
179
+ /** Whether to show the footer */
180
+ visible: boolean;
181
+ };
182
+ /** Grayscale mode */
183
+ grayscale: boolean;
184
+ /** Header */
185
+ header: {
186
+ /** Header breadcrumb */
187
+ breadcrumb: {
188
+ /** Whether to show the breadcrumb icon */
189
+ showIcon: boolean;
190
+ /** Whether to show the breadcrumb */
191
+ visible: boolean;
192
+ };
193
+ globalSearch: {
194
+ /** Whether to show the GlobalSearch */
195
+ visible: boolean;
196
+ };
197
+ /** Header height */
198
+ height: number;
199
+ /** Multilingual */
200
+ multilingual: {
201
+ /** Whether to show the multilingual */
202
+ visible: boolean;
203
+ };
204
+ };
205
+ /** Whether info color is followed by the primary color */
206
+ isInfoFollowPrimary: boolean;
207
+ /** Layout */
208
+ layout: {
209
+ /** Layout mode */
210
+ mode: ThemeLayoutMode;
211
+ /** Scroll mode */
212
+ scrollMode: ThemeScrollMode;
213
+ };
214
+ /** Other color */
215
+ otherColor: OtherColor;
216
+ /** Page */
217
+ page: {
218
+ /** Whether to show the page transition */
219
+ animate: boolean;
220
+ /** Page animate mode */
221
+ animateMode: ThemePageAnimateMode;
222
+ };
223
+ /** Whether to recommend color */
224
+ recommendColor: boolean;
225
+ /** Sider */
226
+ sider: {
227
+ /** Whether to auto select the first submenu */
228
+ autoSelectFirstMenu: boolean;
229
+ /** Collapsed sider width */
230
+ collapsedWidth: number;
231
+ /** Inverted sider */
232
+ inverted: boolean;
233
+ /** Child menu width when the layout is 'vertical-mix', 'top-hybrid-sidebar-first', or 'top-hybrid-header-first' */
234
+ mixChildMenuWidth: number;
235
+ /**
236
+ * Collapsed sider width when the layout is 'vertical-mix', 'top-hybrid-sidebar-first', or
237
+ * 'top-hybrid-header-first'
238
+ */
239
+ mixCollapsedWidth: number;
240
+ /** Sider width when the layout is 'vertical-mix', 'top-hybrid-sidebar-first', or 'top-hybrid-header-first' */
241
+ mixWidth: number;
242
+ /** Sider width */
243
+ width: number;
244
+ };
245
+ /** Tab */
246
+ tab: {
247
+ /**
248
+ * Whether to cache the tab
249
+ *
250
+ * If cache, the tabs will get from the local storage when the page is refreshed
251
+ */
252
+ cache: boolean;
253
+ /** Whether to close tab by middle click */
254
+ closeTabByMiddleClick: boolean;
255
+ /** Tab height */
256
+ height: number;
257
+ /** Tab mode */
258
+ mode: ThemeTabMode;
259
+ /** Whether to show the tab */
260
+ visible: boolean;
261
+ };
262
+ /** Theme color */
263
+ themeColor: string;
264
+ /** Theme radius */
265
+ themeRadius: number;
266
+ /** Theme scheme */
267
+ themeScheme: ThemeMode;
268
+ /** Theme text size */
269
+ themeTextSize: number;
270
+ /** Define some theme settings tokens, will transform to css variables */
271
+ tokens: {
272
+ dark?: {
273
+ [K in keyof ThemeSettingToken]?: Partial<ThemeSettingToken[K]>;
274
+ };
275
+ light: ThemeSettingToken;
276
+ };
277
+ /** Watermark */
278
+ watermark: {
279
+ /** Whether to use user id as watermark text */
280
+ enableCustomText: boolean;
281
+ /** Whether to use current time as watermark text */
282
+ enableTime: boolean;
283
+ /** Whether to use user name as watermark text */
284
+ enableUserName: boolean;
285
+ /** Watermark settings */
286
+ settings: WatermarkSettings;
287
+ /** Watermark text */
288
+ text: string;
289
+ /** Time format for watermark text */
290
+ timeFormat: string;
291
+
292
+ /** Whether to show the watermark */
293
+ visible: boolean;
294
+ };
295
+ }
296
+ }
297
+
298
+ namespace StorageType {
299
+ interface Local {
300
+ /** Dark mode snapshot consumed by the admin app bootstrap. */
301
+ darkMode: boolean;
302
+ /**
303
+ * Theme override version flag.
304
+ *
305
+ * The value is the build time of the project.
306
+ */
307
+ overrideThemeFlag: string;
308
+ /** Primary theme color cached by the theme package. */
309
+ themeColor: string;
310
+ /** Persisted admin theme settings. */
311
+ themeSettings: Theme.ThemeSetting;
312
+ }
313
+ }
314
+ }
315
+
316
+ export {};
@@ -0,0 +1,46 @@
1
+ /** Dark mode class name */
2
+ const DARK_CLASS = 'dark';
3
+
4
+ /**
5
+ * Toggle HTML class helper
6
+ *
7
+ * @param className Class name to toggle
8
+ * @returns Object with add and remove functions
9
+ */
10
+ function toggleHtmlClass(className: string) {
11
+ function add() {
12
+ document.documentElement.classList.add(className);
13
+ }
14
+
15
+ function remove() {
16
+ document.documentElement.classList.remove(className);
17
+ }
18
+
19
+ return { add, remove };
20
+ }
21
+
22
+ /**
23
+ * Toggle CSS dark mode
24
+ *
25
+ * Adds or removes the 'dark' class on the html element
26
+ *
27
+ * @param darkMode Is dark mode enabled
28
+ */
29
+ export function toggleCssDarkMode(darkMode = false): void {
30
+ const { add, remove } = toggleHtmlClass(DARK_CLASS);
31
+
32
+ if (darkMode) {
33
+ add();
34
+ } else {
35
+ remove();
36
+ }
37
+ }
38
+
39
+ /**
40
+ * Check if dark mode class is present
41
+ *
42
+ * @returns Whether dark mode class is on html element
43
+ */
44
+ export function isDarkModeClass(): boolean {
45
+ return document.documentElement.classList.contains(DARK_CLASS);
46
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Toggle auxiliary color modes
3
+ *
4
+ * Applies CSS filters for grayscale and colour weakness modes
5
+ *
6
+ * @param grayscaleMode Enable grayscale mode
7
+ * @param colourWeakness Enable colour weakness mode
8
+ */
9
+ export function toggleAuxiliaryColorModes(grayscaleMode = false, colourWeakness = false): void {
10
+ const htmlElement = document.documentElement;
11
+
12
+ htmlElement.style.filter = [grayscaleMode ? 'grayscale(100%)' : '', colourWeakness ? 'invert(80%)' : '']
13
+ .filter(Boolean)
14
+ .join(' ');
15
+ }
16
+
17
+ /** Clear all auxiliary color modes */
18
+ export function clearAuxiliaryColorModes(): void {
19
+ document.documentElement.style.filter = '';
20
+ }
@@ -0,0 +1,3 @@
1
+ export { isDarkModeClass, toggleCssDarkMode } from './dark-mode';
2
+ export { clearAuxiliaryColorModes, toggleAuxiliaryColorModes } from './filters';
3
+ export { getDefaultThemeSettings, getThemeColors, mergeThemeSettings } from './settings';
@@ -0,0 +1,43 @@
1
+ import { defu } from 'defu';
2
+ import { defaultThemeSettings } from '../config/default';
3
+ import type { ThemeColor } from '../types';
4
+
5
+ /**
6
+ * Get default theme settings
7
+ *
8
+ * @returns Default theme settings
9
+ */
10
+ export function getDefaultThemeSettings(): Theme.ThemeSetting {
11
+ return defaultThemeSettings;
12
+ }
13
+
14
+ /**
15
+ * Merge theme settings with defaults
16
+ *
17
+ * @param settings Partial theme settings to merge
18
+ * @param defaults Base theme settings (defaults to defaultThemeSettings)
19
+ * @returns Merged theme settings
20
+ */
21
+ export function mergeThemeSettings(
22
+ settings?: Partial<Theme.ThemeSetting>,
23
+ defaults: Theme.ThemeSetting = defaultThemeSettings
24
+ ): Theme.ThemeSetting {
25
+ if (!settings) return defaults;
26
+ return defu(settings, defaults) as Theme.ThemeSetting;
27
+ }
28
+
29
+ /**
30
+ * Get theme colors from settings
31
+ *
32
+ * @param settings Theme settings
33
+ * @returns Complete theme colors including primary
34
+ */
35
+ export function getThemeColors(settings: Theme.ThemeSetting): ThemeColor {
36
+ const { isInfoFollowPrimary, otherColor, themeColor } = settings;
37
+
38
+ return {
39
+ primary: themeColor,
40
+ ...otherColor,
41
+ info: isInfoFollowPrimary ? themeColor : otherColor.info
42
+ };
43
+ }
@@ -0,0 +1,148 @@
1
+ // oxlint-disable unicorn/require-module-specifiers
2
+ /**
3
+ * 命名空间 Api.Auth
4
+ *
5
+ * 后端 API 模块:认证模块
6
+ */
7
+ declare global {
8
+ namespace Api.Auth {
9
+ /**
10
+ * 每种登录方式都要带的字段
11
+ *
12
+ * 它们不是用户填的表单项,由 fetchLogin 统一补上,所以在类型上是可选的
13
+ */
14
+ type LoginContext = {
15
+ /** 客户端 id,对应后端 sys_client.client_id,一行是一个端(PC 后台 / App / 小程序) */
16
+ clientId?: string;
17
+ /** 是否保持登录,具体会话时长由后端决定 */
18
+ remember?: boolean;
19
+ /** 租户id */
20
+ tenantId?: string;
21
+ };
22
+
23
+ /** 账号密码登录 */
24
+ type PwdLoginParams = LoginContext & {
25
+ /** 图形验证码内容 */
26
+ code?: string;
27
+ grantType?: 'password';
28
+ /** 密码 */
29
+ password: string;
30
+ /** 用户名 */
31
+ userName: string;
32
+ /** 图形验证码唯一标识 */
33
+ uuid?: string;
34
+ };
35
+
36
+ /** 手机验证码登录 */
37
+ type SmsLoginParams = LoginContext & {
38
+ grantType: 'sms';
39
+ /** 账号绑定的手机号 */
40
+ phone: string;
41
+ /** POST /auth/sms/code 发到手机上的验证码 */
42
+ smsCode: string;
43
+ };
44
+
45
+ /** 邮箱验证码登录 */
46
+ type EmailLoginParams = LoginContext & {
47
+ /** 账号绑定的邮箱 */
48
+ email: string;
49
+ /** POST /auth/email/code 发到邮箱里的验证码 */
50
+ emailCode: string;
51
+ grantType: 'email';
52
+ };
53
+
54
+ /**
55
+ * 登录请求参数,按 grantType 分派
56
+ *
57
+ * 和后端那个可辨识联合一一对应:每种方式各要哪些字段是分开声明的,混着传会被后端 422。 加一种登录方式在这里加一个成员,别往某一种上挂可选字段。
58
+ */
59
+ type LoginParams = EmailLoginParams | PwdLoginParams | SmsLoginParams;
60
+
61
+ /** 发手机登录验证码的参数 */
62
+ type SmsCodeParams = {
63
+ /** 收验证码的手机号,必须是某个账号绑定的号码 */
64
+ phone: string;
65
+ /** 租户id */
66
+ tenantId?: string;
67
+ };
68
+
69
+ /** 发邮箱登录验证码的参数 */
70
+ type EmailCodeParams = {
71
+ /** 收验证码的邮箱,必须是某个账号绑定的地址 */
72
+ email: string;
73
+ /** 租户id */
74
+ tenantId?: string;
75
+ };
76
+
77
+ /** 登录响应数据 */
78
+ type LoginResponse = LoginToken;
79
+
80
+ /** 登录页租户下拉框里的一项 */
81
+ interface LoginTenantOption {
82
+ /** 企业名称,下拉框显示的就是它 */
83
+ companyName: string;
84
+ /** 绑定的域名,没配就是空串 */
85
+ domain: string;
86
+ /** 租户编号,登录和发码时原样带回后端 */
87
+ tenantId: string;
88
+ }
89
+
90
+ /** GET /auth/tenant/list 的响应,不需要登录就能拿 */
91
+ interface LoginTenantInfo {
92
+ /** 这个部署是不是多租户,false 时登录页不显示下拉框 */
93
+ tenantEnabled: boolean;
94
+ /** 字段名跟着后端(RuoYi 的 LoginTenantVo)叫 voList,关闭多租户时是空数组 */
95
+ voList: LoginTenantOption[];
96
+ }
97
+
98
+ /** 图形验证码 */
99
+ interface CaptchaInfo {
100
+ /** 当前是否启用图形验证码 */
101
+ captcha_enabled: boolean;
102
+ /** Base64 编码的 PNG 图片,不包含 data URL 前缀 */
103
+ img: null | string;
104
+ /** 验证码唯一标识 */
105
+ uuid: null | string;
106
+ }
107
+
108
+ /**
109
+ * 登录令牌
110
+ *
111
+ * 后端 /auth/login 和 /auth/refreshToken 四个字段都给,续签流程内部只传两个,所以那两个是可选的
112
+ */
113
+ interface LoginToken {
114
+ /** 访问令牌还有多少秒过期,据此提前续签,不用等一次 401 */
115
+ expiresIn?: number;
116
+ /** 刷新令牌还有多少秒过期,到期前没续过签就要重新登录 */
117
+ refreshExpiresIn?: number;
118
+ /** 刷新令牌,只能用一次,用过即作废 */
119
+ refreshToken: string;
120
+ /** 访问令牌 */
121
+ token: string;
122
+ }
123
+
124
+ /** 用户信息 */
125
+ interface UserInfo {
126
+ /** 用户按钮权限列表 */
127
+ buttons: string[];
128
+ /** 昵称,给界面显示用 */
129
+ nickname: string;
130
+ /** 用户角色列表 */
131
+ roles: string[];
132
+ /** 用户 ID */
133
+ userId: string;
134
+ /** 用户名 */
135
+ userName: string;
136
+ }
137
+
138
+ /** 用户认证信息 */
139
+ type Info = {
140
+ /** 访问令牌 */
141
+ token: LoginToken['token'];
142
+ /** 用户信息 */
143
+ userInfo: UserInfo;
144
+ };
145
+ }
146
+ }
147
+
148
+ export {};
@@ -0,0 +1,54 @@
1
+ // oxlint-disable unicorn/require-module-specifiers
2
+ /**
3
+ * 命名空间 Api.Common
4
+ *
5
+ * 通用类型和工具类型
6
+ */
7
+ declare global {
8
+ namespace Api.Common {
9
+ /** 分页通用参数 */
10
+ interface PaginatingCommonParams {
11
+ /** 当前页码 */
12
+ current: number;
13
+ /** 每页条数 */
14
+ size: number;
15
+ /** 总条数 */
16
+ total: number;
17
+ }
18
+
19
+ /** 分页查询列表数据的通用参数 */
20
+ interface PaginatingQueryRecord<T = any> extends PaginatingCommonParams {
21
+ /** 数据列表 */
22
+ records: T[];
23
+ }
24
+
25
+ /** 通用搜索参数 */
26
+ type CommonSearchParams = Pick<Api.Common.PaginatingCommonParams, 'current' | 'size'>;
27
+
28
+ /**
29
+ * 启用状态
30
+ *
31
+ * - "1": 启用
32
+ * - "2": 禁用
33
+ */
34
+ type EnableStatus = '1' | '2';
35
+
36
+ /** 通用记录类型 */
37
+ type CommonRecord<T = any> = {
38
+ /** 创建人 */
39
+ createBy: string;
40
+ /** 创建时间 */
41
+ createTime: string;
42
+ /** 记录 ID */
43
+ id: number;
44
+ /** 记录状态 */
45
+ status: EnableStatus | null;
46
+ /** 更新人 */
47
+ updateBy: string;
48
+ /** 更新时间 */
49
+ updateTime: string;
50
+ } & T;
51
+ }
52
+ }
53
+
54
+ export {};