@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.
- package/README.md +168 -0
- package/build/getEnv.ts +46 -0
- package/build/plugins.ts +206 -0
- package/build/proxy.ts +29 -0
- package/dist/package/declarations/build/getEnv.d.ts +13 -0
- package/dist/package/declarations/build/plugins.d.ts +20 -0
- package/dist/package/declarations/build/proxy.d.ts +10 -0
- package/dist/package/declarations/index.d.ts +7 -0
- package/dist/package/declarations/src/App.vue.d.ts +3 -0
- package/dist/package/declarations/src/api/base/config.d.ts +7 -0
- package/dist/package/declarations/src/api/base/file.d.ts +11 -0
- package/dist/package/declarations/src/api/base/login.d.ts +18 -0
- package/dist/package/declarations/src/api/base/oauth.d.ts +12 -0
- package/dist/package/declarations/src/api/system/auth.d.ts +13 -0
- package/dist/package/declarations/src/api/system/base_dict.d.ts +8 -0
- package/dist/package/declarations/src/api/system/base_tenant.d.ts +9 -0
- package/dist/package/declarations/src/auth.d.ts +1 -0
- package/dist/package/declarations/src/bootstrap.d.ts +23 -0
- package/dist/package/declarations/src/components/Card/DataPanelCard.vue.d.ts +23 -0
- package/dist/package/declarations/src/components/CronExpression/index.vue.d.ts +15 -0
- package/dist/package/declarations/src/components/Dialog/FormDialog.vue.d.ts +74 -0
- package/dist/package/declarations/src/components/Dialog/ProDialog.vue.d.ts +58 -0
- package/dist/package/declarations/src/components/Dict/DictLabel.vue.d.ts +11 -0
- package/dist/package/declarations/src/components/Dict/index.vue.d.ts +30 -0
- package/dist/package/declarations/src/components/ECharts/config/index.d.ts +7 -0
- package/dist/package/declarations/src/components/ECharts/index.vue.d.ts +22 -0
- package/dist/package/declarations/src/components/ErrorMessage/index.vue.d.ts +12 -0
- package/dist/package/declarations/src/components/Grid/components/GridItem.vue.d.ts +34 -0
- package/dist/package/declarations/src/components/Grid/index.vue.d.ts +28 -0
- package/dist/package/declarations/src/components/Grid/interface/index.d.ts +7 -0
- package/dist/package/declarations/src/components/ImportExcel/index.vue.d.ts +26 -0
- package/dist/package/declarations/src/components/Loading/fullScreen.d.ts +5 -0
- package/dist/package/declarations/src/components/Loading/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/components/PasswordStrength/index.vue.d.ts +13 -0
- package/dist/package/declarations/src/components/ProForm/components/DynamicList.vue.d.ts +15 -0
- package/dist/package/declarations/src/components/ProForm/components/KvList.vue.d.ts +26 -0
- package/dist/package/declarations/src/components/ProForm/components/ProFormItem.vue.d.ts +28 -0
- package/dist/package/declarations/src/components/ProForm/index.vue.d.ts +36 -0
- package/dist/package/declarations/src/components/ProForm/interface/index.d.ts +47 -0
- package/dist/package/declarations/src/components/ProTable/components/ColSetting.vue.d.ts +9 -0
- package/dist/package/declarations/src/components/ProTable/components/Pagination.vue.d.ts +15 -0
- package/dist/package/declarations/src/components/ProTable/components/TableColumn.vue.d.ts +9 -0
- package/dist/package/declarations/src/components/ProTable/interface/index.d.ts +187 -0
- package/dist/package/declarations/src/components/ProTable.d.ts +5 -0
- package/dist/package/declarations/src/components/SearchForm/components/SearchFormItem.vue.d.ts +21 -0
- package/dist/package/declarations/src/components/SearchForm/index.vue.d.ts +22 -0
- package/dist/package/declarations/src/components/SelectFilter/index.vue.d.ts +44 -0
- package/dist/package/declarations/src/components/SelectIcon/index.vue.d.ts +19 -0
- package/dist/package/declarations/src/components/SvgIcon/index.vue.d.ts +15 -0
- package/dist/package/declarations/src/components/SwitchDark/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/components/TreeFilter/index.vue.d.ts +5866 -0
- package/dist/package/declarations/src/components/Upload/File.vue.d.ts +24 -0
- package/dist/package/declarations/src/components/Upload/Files.vue.d.ts +26 -0
- package/dist/package/declarations/src/components/Upload/Img.vue.d.ts +43 -0
- package/dist/package/declarations/src/components/Upload/Imgs.vue.d.ts +46 -0
- package/dist/package/declarations/src/components/WangEditor/index.vue.d.ts +29 -0
- package/dist/package/declarations/src/config/index.d.ts +6 -0
- package/dist/package/declarations/src/config/nprogress.d.ts +3 -0
- package/dist/package/declarations/src/directives/index.d.ts +5 -0
- package/dist/package/declarations/src/directives/modules/auth.d.ts +3 -0
- package/dist/package/declarations/src/directives/modules/copy.d.ts +8 -0
- package/dist/package/declarations/src/directives/modules/debounce.d.ts +8 -0
- package/dist/package/declarations/src/directives/modules/draggable.d.ts +3 -0
- package/dist/package/declarations/src/directives/modules/longpress.d.ts +7 -0
- package/dist/package/declarations/src/directives/modules/throttle.d.ts +3 -0
- package/dist/package/declarations/src/directives/modules/waterMarker.d.ts +5 -0
- package/dist/package/declarations/src/enums/httpEnum.d.ts +29 -0
- package/dist/package/declarations/src/format.d.ts +1 -0
- package/dist/package/declarations/src/hooks/interface/index.d.ts +36 -0
- package/dist/package/declarations/src/hooks/useAuthButtons.d.ts +8 -0
- package/dist/package/declarations/src/hooks/useDownload.d.ts +9 -0
- package/dist/package/declarations/src/hooks/useHandleData.d.ts +10 -0
- package/dist/package/declarations/src/hooks/useOnline.d.ts +6 -0
- package/dist/package/declarations/src/hooks/useSelection.d.ts +10 -0
- package/dist/package/declarations/src/hooks/useTable.d.ts +46 -0
- package/dist/package/declarations/src/hooks/useTheme.d.ts +12 -0
- package/dist/package/declarations/src/hooks/useTime.d.ts +13 -0
- package/dist/package/declarations/src/index.d.ts +3 -0
- package/dist/package/declarations/src/layouts/LayoutClassic/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/layouts/LayoutColumns/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/layouts/LayoutTransverse/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/layouts/LayoutVertical/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/layouts/components/Footer/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/layouts/components/Header/ToolBarLeft.vue.d.ts +3 -0
- package/dist/package/declarations/src/layouts/components/Header/ToolBarRight.vue.d.ts +3 -0
- package/dist/package/declarations/src/layouts/components/Header/components/AssemblySize.vue.d.ts +3 -0
- package/dist/package/declarations/src/layouts/components/Header/components/Avatar.vue.d.ts +3 -0
- package/dist/package/declarations/src/layouts/components/Header/components/Breadcrumb.vue.d.ts +3 -0
- package/dist/package/declarations/src/layouts/components/Header/components/CollapseIcon.vue.d.ts +3 -0
- package/dist/package/declarations/src/layouts/components/Header/components/Fullscreen.vue.d.ts +3 -0
- package/dist/package/declarations/src/layouts/components/Header/components/InfoDialog.vue.d.ts +5 -0
- package/dist/package/declarations/src/layouts/components/Header/components/PasswordDialog.vue.d.ts +5 -0
- package/dist/package/declarations/src/layouts/components/Header/components/SearchMenu.vue.d.ts +3 -0
- package/dist/package/declarations/src/layouts/components/Header/components/ThemeSetting.vue.d.ts +3 -0
- package/dist/package/declarations/src/layouts/components/Main/components/Maximize.vue.d.ts +3 -0
- package/dist/package/declarations/src/layouts/components/Main/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/layouts/components/Menu/SubMenu.vue.d.ts +7 -0
- package/dist/package/declarations/src/layouts/components/Tabs/components/MoreButton.vue.d.ts +3 -0
- package/dist/package/declarations/src/layouts/components/Tabs/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/layouts/components/ThemeDrawer/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/layouts/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/layouts/indexAsync.vue.d.ts +3 -0
- package/dist/package/declarations/src/modules/index.d.ts +117 -0
- package/dist/package/declarations/src/modules/kratosAdmin.d.ts +4 -0
- package/dist/package/declarations/src/navigation.d.ts +2 -0
- package/dist/package/declarations/src/request.d.ts +2 -0
- package/dist/package/declarations/src/routers/index.d.ts +21 -0
- package/dist/package/declarations/src/routers/modules/dynamicRouter.d.ts +4 -0
- package/dist/package/declarations/src/routers/modules/staticRouter.d.ts +25 -0
- package/dist/package/declarations/src/rpc/base/v1/config.d.ts +23 -0
- package/dist/package/declarations/src/rpc/base/v1/file.d.ts +52 -0
- package/dist/package/declarations/src/rpc/base/v1/login.d.ts +107 -0
- package/dist/package/declarations/src/rpc/base/v1/oauth.d.ts +167 -0
- package/dist/package/declarations/src/rpc/common/v1/common.d.ts +57 -0
- package/dist/package/declarations/src/rpc/common/v1/enum.d.ts +58 -0
- package/dist/package/declarations/src/rpc/common/v1/types.d.ts +60 -0
- package/dist/package/declarations/src/rpc/google/protobuf/empty.d.ts +11 -0
- package/dist/package/declarations/src/rpc/google/protobuf/wrappers.d.ts +108 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/auth.d.ts +156 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_dict.d.ts +215 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_tenant.d.ts +112 -0
- package/dist/package/declarations/src/rpc/system/common/v1/enum.d.ts +67 -0
- package/dist/package/declarations/src/security.d.ts +3 -0
- package/dist/package/declarations/src/stores/helper/persist.d.ts +9 -0
- package/dist/package/declarations/src/stores/index.d.ts +2 -0
- package/dist/package/declarations/src/stores/interface/index.d.ts +90 -0
- package/dist/package/declarations/src/stores/modules/auth.d.ts +168 -0
- package/dist/package/declarations/src/stores/modules/config.d.ts +26 -0
- package/dist/package/declarations/src/stores/modules/dict.d.ts +32 -0
- package/dist/package/declarations/src/stores/modules/global.d.ts +4 -0
- package/dist/package/declarations/src/stores/modules/keepAlive.d.ts +6 -0
- package/dist/package/declarations/src/stores/modules/tabs.d.ts +13 -0
- package/dist/package/declarations/src/stores/modules/user.d.ts +29 -0
- package/dist/package/declarations/src/stores/runtime.d.ts +4 -0
- package/dist/package/declarations/src/styles/theme/aside.d.ts +4 -0
- package/dist/package/declarations/src/styles/theme/header.d.ts +4 -0
- package/dist/package/declarations/src/styles/theme/menu.d.ts +4 -0
- package/dist/package/declarations/src/table.d.ts +1 -0
- package/dist/package/declarations/src/tenant.d.ts +1 -0
- package/dist/package/declarations/src/utils/color.d.ts +28 -0
- package/dist/package/declarations/src/utils/dict.d.ts +15 -0
- package/dist/package/declarations/src/utils/eleValidate.d.ts +4 -0
- package/dist/package/declarations/src/utils/errorHandler.d.ts +5 -0
- package/dist/package/declarations/src/utils/index.d.ts +192 -0
- package/dist/package/declarations/src/utils/is/index.d.ts +72 -0
- package/dist/package/declarations/src/utils/mittBus.d.ts +2 -0
- package/dist/package/declarations/src/utils/oauthProvider.d.ts +19 -0
- package/dist/package/declarations/src/utils/passwordCrypto.d.ts +6 -0
- package/dist/package/declarations/src/utils/passwordStrength.d.ts +36 -0
- package/dist/package/declarations/src/utils/proTable.d.ts +44 -0
- package/dist/package/declarations/src/utils/request.d.ts +11 -0
- package/dist/package/declarations/src/utils/router.d.ts +14 -0
- package/dist/package/declarations/src/utils/svg.d.ts +4 -0
- package/dist/package/declarations/src/utils/tenant.d.ts +6 -0
- package/dist/package/declarations/src/utils/utils.d.ts +12 -0
- package/dist/package/declarations/src/views/error/403.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/error/404.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/error/500.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/error/pending.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/login/components/LoginForm.vue.d.ts +4 -0
- package/dist/package/declarations/src/views/login/index.vue.d.ts +3 -0
- package/dist/package/declarations/vite.config.d.ts +13 -0
- package/dist/package/src/App.vue +25 -0
- package/dist/package/src/api/base/config.ts +19 -0
- package/dist/package/src/api/base/file.ts +75 -0
- package/dist/package/src/api/base/login.ts +81 -0
- package/dist/package/src/api/base/oauth.ts +50 -0
- package/dist/package/src/api/system/auth.ts +45 -0
- package/dist/package/src/api/system/base_dict.ts +19 -0
- package/dist/package/src/api/system/base_tenant.ts +20 -0
- package/dist/package/src/assets/fonts/DIN.otf +0 -0
- package/dist/package/src/assets/fonts/MetroDF.ttf +0 -0
- package/dist/package/src/assets/fonts/YouSheBiaoTiHei.ttf +0 -0
- package/dist/package/src/assets/fonts/font.scss +14 -0
- package/dist/package/src/assets/iconfont/iconfont.scss +47 -0
- package/dist/package/src/assets/iconfont/iconfont.ttf +0 -0
- package/dist/package/src/assets/images/403.png +0 -0
- package/dist/package/src/assets/images/404.png +0 -0
- package/dist/package/src/assets/images/500.png +0 -0
- package/dist/package/src/assets/images/avatar.png +0 -0
- package/dist/package/src/assets/images/login_bg.svg +33 -0
- package/dist/package/src/assets/images/login_left.png +0 -0
- package/dist/package/src/assets/images/logo.svg +1 -0
- package/dist/package/src/assets/images/notData.png +0 -0
- package/dist/package/src/assets/images/oauth/dingtalk.png +0 -0
- package/dist/package/src/assets/images/oauth/feishu.png +0 -0
- package/dist/package/src/assets/images/oauth/gitee.png +0 -0
- package/dist/package/src/assets/images/oauth/github.png +0 -0
- package/dist/package/src/assets/images/oauth/google.png +0 -0
- package/dist/package/src/assets/images/oauth/wechat.png +0 -0
- package/dist/package/src/assets/images/oauth/wechatwork.png +0 -0
- package/dist/package/src/auth.ts +1 -0
- package/dist/package/src/bootstrap.ts +69 -0
- package/dist/package/src/components/Card/DataPanelCard.vue +67 -0
- package/dist/package/src/components/CronExpression/index.vue +713 -0
- package/dist/package/src/components/Dialog/FormDialog.vue +160 -0
- package/dist/package/src/components/Dialog/ProDialog.vue +96 -0
- package/dist/package/src/components/Dict/DictLabel.vue +62 -0
- package/dist/package/src/components/Dict/index.vue +157 -0
- package/dist/package/src/components/ECharts/config/index.ts +45 -0
- package/dist/package/src/components/ECharts/index.vue +108 -0
- package/dist/package/src/components/ErrorMessage/index.vue +63 -0
- package/dist/package/src/components/Grid/components/GridItem.vue +69 -0
- package/dist/package/src/components/Grid/index.vue +169 -0
- package/dist/package/src/components/Grid/interface/index.ts +8 -0
- package/dist/package/src/components/ImportExcel/index.scss +3 -0
- package/dist/package/src/components/ImportExcel/index.vue +150 -0
- package/dist/package/src/components/Loading/fullScreen.ts +45 -0
- package/dist/package/src/components/Loading/index.scss +67 -0
- package/dist/package/src/components/Loading/index.vue +13 -0
- package/dist/package/src/components/PasswordStrength/index.vue +127 -0
- package/dist/package/src/components/ProForm/components/DynamicList.vue +59 -0
- package/dist/package/src/components/ProForm/components/KvList.vue +73 -0
- package/dist/package/src/components/ProForm/components/ProFormItem.vue +191 -0
- package/dist/package/src/components/ProForm/index.vue +120 -0
- package/dist/package/src/components/ProForm/interface/index.ts +74 -0
- package/dist/package/src/components/ProTable/components/ColSetting.vue +45 -0
- package/dist/package/src/components/ProTable/components/Pagination.vue +58 -0
- package/dist/package/src/components/ProTable/components/TableColumn.vue +234 -0
- package/dist/package/src/components/ProTable/index.vue +567 -0
- package/dist/package/src/components/ProTable/interface/index.ts +223 -0
- package/dist/package/src/components/ProTable.ts +8 -0
- package/dist/package/src/components/SearchForm/components/SearchFormItem.vue +168 -0
- package/dist/package/src/components/SearchForm/index.vue +105 -0
- package/dist/package/src/components/SelectFilter/index.scss +63 -0
- package/dist/package/src/components/SelectFilter/index.vue +113 -0
- package/dist/package/src/components/SelectIcon/index.scss +39 -0
- package/dist/package/src/components/SelectIcon/index.vue +105 -0
- package/dist/package/src/components/SvgIcon/index.vue +35 -0
- package/dist/package/src/components/SwitchDark/index.vue +12 -0
- package/dist/package/src/components/TreeFilter/index.scss +44 -0
- package/dist/package/src/components/TreeFilter/index.vue +207 -0
- package/dist/package/src/components/Upload/File.vue +201 -0
- package/dist/package/src/components/Upload/Files.vue +234 -0
- package/dist/package/src/components/Upload/Img.vue +306 -0
- package/dist/package/src/components/Upload/Imgs.vue +320 -0
- package/dist/package/src/components/WangEditor/index.scss +28 -0
- package/dist/package/src/components/WangEditor/index.vue +154 -0
- package/dist/package/src/config/index.ts +19 -0
- package/dist/package/src/config/nprogress.ts +12 -0
- package/dist/package/src/directives/index.ts +28 -0
- package/dist/package/src/directives/modules/auth.ts +25 -0
- package/dist/package/src/directives/modules/copy.ts +39 -0
- package/dist/package/src/directives/modules/debounce.ts +32 -0
- package/dist/package/src/directives/modules/draggable.ts +50 -0
- package/dist/package/src/directives/modules/longpress.ts +49 -0
- package/dist/package/src/directives/modules/throttle.ts +42 -0
- package/dist/package/src/directives/modules/waterMarker.ts +36 -0
- package/dist/package/src/enums/httpEnum.ts +35 -0
- package/dist/package/src/format.ts +1 -0
- package/dist/package/src/hooks/interface/index.ts +38 -0
- package/dist/package/src/hooks/useAuthButtons.ts +25 -0
- package/dist/package/src/hooks/useDownload.ts +44 -0
- package/dist/package/src/hooks/useHandleData.ts +38 -0
- package/dist/package/src/hooks/useOnline.ts +27 -0
- package/dist/package/src/hooks/useSelection.ts +34 -0
- package/dist/package/src/hooks/useTable.ts +151 -0
- package/dist/package/src/hooks/useTheme.ts +111 -0
- package/dist/package/src/hooks/useTime.ts +38 -0
- package/dist/package/src/index.ts +9 -0
- package/dist/package/src/layouts/LayoutClassic/index.scss +60 -0
- package/dist/package/src/layouts/LayoutClassic/index.vue +64 -0
- package/dist/package/src/layouts/LayoutColumns/index.scss +95 -0
- package/dist/package/src/layouts/LayoutColumns/index.vue +113 -0
- package/dist/package/src/layouts/LayoutTransverse/index.scss +60 -0
- package/dist/package/src/layouts/LayoutTransverse/index.vue +70 -0
- package/dist/package/src/layouts/LayoutVertical/index.scss +70 -0
- package/dist/package/src/layouts/LayoutVertical/index.vue +119 -0
- package/dist/package/src/layouts/components/Footer/index.scss +11 -0
- package/dist/package/src/layouts/components/Footer/index.vue +21 -0
- package/dist/package/src/layouts/components/Header/ToolBarLeft.vue +23 -0
- package/dist/package/src/layouts/components/Header/ToolBarRight.vue +44 -0
- package/dist/package/src/layouts/components/Header/components/AssemblySize.vue +39 -0
- package/dist/package/src/layouts/components/Header/components/Avatar.vue +226 -0
- package/dist/package/src/layouts/components/Header/components/Breadcrumb.vue +117 -0
- package/dist/package/src/layouts/components/Header/components/CollapseIcon.vue +21 -0
- package/dist/package/src/layouts/components/Header/components/Fullscreen.vue +28 -0
- package/dist/package/src/layouts/components/Header/components/InfoDialog.vue +22 -0
- package/dist/package/src/layouts/components/Header/components/PasswordDialog.vue +22 -0
- package/dist/package/src/layouts/components/Header/components/SearchMenu.vue +207 -0
- package/dist/package/src/layouts/components/Header/components/ThemeSetting.vue +14 -0
- package/dist/package/src/layouts/components/Main/components/Maximize.vue +39 -0
- package/dist/package/src/layouts/components/Main/index.scss +14 -0
- package/dist/package/src/layouts/components/Main/index.vue +90 -0
- package/dist/package/src/layouts/components/Menu/SubMenu.vue +132 -0
- package/dist/package/src/layouts/components/Tabs/components/MoreButton.vue +83 -0
- package/dist/package/src/layouts/components/Tabs/index.scss +69 -0
- package/dist/package/src/layouts/components/Tabs/index.vue +111 -0
- package/dist/package/src/layouts/components/ThemeDrawer/index.scss +137 -0
- package/dist/package/src/layouts/components/ThemeDrawer/index.vue +191 -0
- package/dist/package/src/layouts/index.vue +50 -0
- package/dist/package/src/layouts/indexAsync.vue +54 -0
- package/dist/package/src/modules/index.ts +233 -0
- package/dist/package/src/modules/kratosAdmin.ts +17 -0
- package/dist/package/src/navigation.ts +2 -0
- package/dist/package/src/request.ts +2 -0
- package/dist/package/src/routers/index.ts +143 -0
- package/dist/package/src/routers/modules/dynamicRouter.ts +160 -0
- package/dist/package/src/routers/modules/staticRouter.ts +73 -0
- package/dist/package/src/rpc/base/v1/config.ts +34 -0
- package/dist/package/src/rpc/base/v1/file.ts +66 -0
- package/dist/package/src/rpc/base/v1/login.ts +128 -0
- package/dist/package/src/rpc/base/v1/oauth.ts +199 -0
- package/dist/package/src/rpc/common/v1/common.ts +71 -0
- package/dist/package/src/rpc/common/v1/enum.ts +71 -0
- package/dist/package/src/rpc/common/v1/types.ts +77 -0
- package/dist/package/src/rpc/google/protobuf/empty.ts +19 -0
- package/dist/package/src/rpc/google/protobuf/wrappers.ts +124 -0
- package/dist/package/src/rpc/system/admin/v1/auth.ts +208 -0
- package/dist/package/src/rpc/system/admin/v1/base_dict.ts +249 -0
- package/dist/package/src/rpc/system/admin/v1/base_tenant.ts +134 -0
- package/dist/package/src/rpc/system/common/v1/enum.ts +80 -0
- package/dist/package/src/security.ts +3 -0
- package/dist/package/src/stores/helper/persist.ts +19 -0
- package/dist/package/src/stores/index.ts +8 -0
- package/dist/package/src/stores/interface/index.ts +102 -0
- package/dist/package/src/stores/modules/auth.ts +73 -0
- package/dist/package/src/stores/modules/config.ts +119 -0
- package/dist/package/src/stores/modules/dict.ts +65 -0
- package/dist/package/src/stores/modules/global.ts +54 -0
- package/dist/package/src/stores/modules/keepAlive.ts +22 -0
- package/dist/package/src/stores/modules/tabs.ts +77 -0
- package/dist/package/src/stores/modules/user.ts +109 -0
- package/dist/package/src/stores/runtime.ts +4 -0
- package/dist/package/src/styles/common.scss +144 -0
- package/dist/package/src/styles/element-dark.scss +46 -0
- package/dist/package/src/styles/element.scss +333 -0
- package/dist/package/src/styles/reset.scss +143 -0
- package/dist/package/src/styles/theme/aside.ts +16 -0
- package/dist/package/src/styles/theme/header.ts +25 -0
- package/dist/package/src/styles/theme/menu.ts +31 -0
- package/dist/package/src/styles/var.scss +2 -0
- package/dist/package/src/table.ts +1 -0
- package/dist/package/src/tenant.ts +1 -0
- package/dist/package/src/typings/global.d.ts +74 -0
- package/dist/package/src/typings/utils.d.ts +17 -0
- package/dist/package/src/typings/window.d.ts +8 -0
- package/dist/package/src/utils/color.ts +59 -0
- package/dist/package/src/utils/dict.ts +17 -0
- package/dist/package/src/utils/eleValidate.ts +14 -0
- package/dist/package/src/utils/errorHandler.ts +27 -0
- package/dist/package/src/utils/index.ts +403 -0
- package/dist/package/src/utils/is/index.ts +125 -0
- package/dist/package/src/utils/mittBus.ts +5 -0
- package/dist/package/src/utils/oauthProvider.ts +79 -0
- package/dist/package/src/utils/passwordCrypto.ts +71 -0
- package/dist/package/src/utils/passwordStrength.ts +86 -0
- package/dist/package/src/utils/proTable.ts +124 -0
- package/dist/package/src/utils/request.ts +296 -0
- package/dist/package/src/utils/router.ts +43 -0
- package/dist/package/src/utils/svg.ts +13 -0
- package/dist/package/src/utils/tenant.ts +10 -0
- package/dist/package/src/utils/utils.ts +40 -0
- package/dist/package/src/views/error/403.vue +8 -0
- package/dist/package/src/views/error/404.vue +8 -0
- package/dist/package/src/views/error/500.vue +8 -0
- package/dist/package/src/views/error/pending.vue +16 -0
- package/dist/package/src/views/login/components/LoginForm.vue +797 -0
- package/dist/package/src/views/login/index.scss +103 -0
- package/dist/package/src/views/login/index.vue +108 -0
- package/dist/package/src/vite-env.d.ts +3 -0
- package/dist/package/types/generated/auto-imports.d.ts +124 -0
- package/dist/package/types/generated/components.d.ts +151 -0
- package/package.json +199 -0
- package/tsconfig.json +21 -0
- package/types/generated/auto-imports.d.ts +124 -0
- package/types/generated/components.d.ts +151 -0
- package/vite.config.ts +239 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import service from "../../utils/request";
|
|
2
|
+
import type {
|
|
3
|
+
CaptchaRequest,
|
|
4
|
+
CaptchaResponse,
|
|
5
|
+
LogoutRequest,
|
|
6
|
+
LoginRequest,
|
|
7
|
+
LoginResponse,
|
|
8
|
+
PasswordPublicKeyRequest,
|
|
9
|
+
PasswordPublicKeyResponse,
|
|
10
|
+
RefreshTokenRequest,
|
|
11
|
+
RefreshTokenResponse,
|
|
12
|
+
VerifyCaptchaRequest,
|
|
13
|
+
VerifyCaptchaResponse,
|
|
14
|
+
LoginService
|
|
15
|
+
} from "../../rpc/base/v1/login";
|
|
16
|
+
import type { Empty } from "../../rpc/google/protobuf/empty";
|
|
17
|
+
|
|
18
|
+
const CAPTCHA_URL = "/v1/base/captcha";
|
|
19
|
+
const CAPTCHA_VERIFY_URL = "/v1/base/captcha/verify";
|
|
20
|
+
const PASSWORD_PUBLIC_KEY_URL = "/v1/base/password-public-key";
|
|
21
|
+
const SESSION_URL = "/v1/base/session";
|
|
22
|
+
const TOKEN_URL = "/v1/base/token";
|
|
23
|
+
|
|
24
|
+
/** 登录公共服务 */
|
|
25
|
+
export class LoginServiceImpl implements LoginService {
|
|
26
|
+
/** 验证码 */
|
|
27
|
+
Captcha(request: CaptchaRequest): Promise<CaptchaResponse> {
|
|
28
|
+
return service<CaptchaRequest, CaptchaResponse>({
|
|
29
|
+
url: `${CAPTCHA_URL}`,
|
|
30
|
+
method: "get",
|
|
31
|
+
params: request,
|
|
32
|
+
headers: { Authorization: "no-auth" }
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/** 验证码预校验 */
|
|
36
|
+
VerifyCaptcha(request: VerifyCaptchaRequest): Promise<VerifyCaptchaResponse> {
|
|
37
|
+
return service<VerifyCaptchaRequest, VerifyCaptchaResponse>({
|
|
38
|
+
url: `${CAPTCHA_VERIFY_URL}`,
|
|
39
|
+
method: "post",
|
|
40
|
+
data: request,
|
|
41
|
+
headers: { Authorization: "no-auth" }
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/** 获取密码临时公钥 */
|
|
45
|
+
PasswordPublicKey(request: PasswordPublicKeyRequest): Promise<PasswordPublicKeyResponse> {
|
|
46
|
+
return service<PasswordPublicKeyRequest, PasswordPublicKeyResponse>({
|
|
47
|
+
url: `${PASSWORD_PUBLIC_KEY_URL}`,
|
|
48
|
+
method: "get",
|
|
49
|
+
params: request,
|
|
50
|
+
headers: { Authorization: "no-auth" }
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
/** 登录 */
|
|
54
|
+
Login(request: LoginRequest): Promise<LoginResponse> {
|
|
55
|
+
return service<LoginRequest, LoginResponse>({
|
|
56
|
+
url: `${SESSION_URL}`,
|
|
57
|
+
method: "post",
|
|
58
|
+
data: request,
|
|
59
|
+
headers: { Authorization: "no-auth" }
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
/** 登出 */
|
|
63
|
+
Logout(request: LogoutRequest): Promise<Empty> {
|
|
64
|
+
return service<LogoutRequest, Empty>({
|
|
65
|
+
url: `${SESSION_URL}`,
|
|
66
|
+
method: "delete",
|
|
67
|
+
data: request
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
/** 刷新认证令牌 */
|
|
71
|
+
RefreshToken(request: RefreshTokenRequest): Promise<RefreshTokenResponse> {
|
|
72
|
+
return service<RefreshTokenRequest, RefreshTokenResponse>({
|
|
73
|
+
url: `${TOKEN_URL}`,
|
|
74
|
+
method: "post",
|
|
75
|
+
data: request,
|
|
76
|
+
headers: { Authorization: "no-auth" }
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export const defLoginService = new LoginServiceImpl();
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import service from "../../utils/request";
|
|
2
|
+
import type {
|
|
3
|
+
CreateOauthAuthorizationRequest,
|
|
4
|
+
CreateOauthAuthorizationResponse,
|
|
5
|
+
ExchangeOauthTicketRequest,
|
|
6
|
+
ExchangeOauthTicketResponse,
|
|
7
|
+
ListOauthProviderRequest,
|
|
8
|
+
ListOauthProviderResponse
|
|
9
|
+
} from "../../rpc/base/v1/oauth";
|
|
10
|
+
|
|
11
|
+
const OAUTH_PROVIDER_URL = "/v1/base/oauth/provider";
|
|
12
|
+
const OAUTH_AUTHORIZATION_URL = "/v1/base/oauth/authorization";
|
|
13
|
+
const OAUTH_TICKET_URL = "/v1/base/oauth/ticket";
|
|
14
|
+
|
|
15
|
+
/** OauthServiceImpl 三方登录服务。 */
|
|
16
|
+
export class OauthServiceImpl {
|
|
17
|
+
/** 查询三方登录方式 */
|
|
18
|
+
ListOauthProvider(request: ListOauthProviderRequest): Promise<ListOauthProviderResponse> {
|
|
19
|
+
return service<ListOauthProviderRequest, ListOauthProviderResponse>({
|
|
20
|
+
url: `${OAUTH_PROVIDER_URL}`,
|
|
21
|
+
method: "get",
|
|
22
|
+
params: request,
|
|
23
|
+
headers: { Authorization: "no-auth" }
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** 创建三方登录授权地址 */
|
|
28
|
+
CreateOauthAuthorization(request: CreateOauthAuthorizationRequest): Promise<CreateOauthAuthorizationResponse> {
|
|
29
|
+
return service<CreateOauthAuthorizationRequest, CreateOauthAuthorizationResponse>({
|
|
30
|
+
url: `${OAUTH_AUTHORIZATION_URL}`,
|
|
31
|
+
method: "post",
|
|
32
|
+
data: request,
|
|
33
|
+
headers: { Authorization: "no-auth" }
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** 兑换三方登录票据 */
|
|
38
|
+
ExchangeOauthTicket(request: ExchangeOauthTicketRequest): Promise<ExchangeOauthTicketResponse> {
|
|
39
|
+
return service<ExchangeOauthTicketRequest, ExchangeOauthTicketResponse>({
|
|
40
|
+
url: `${OAUTH_TICKET_URL}`,
|
|
41
|
+
method: "post",
|
|
42
|
+
data: request,
|
|
43
|
+
headers: { Authorization: "no-auth" }
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** defOauthService 三方登录服务实例。 */
|
|
50
|
+
export const defOauthService = new OauthServiceImpl();
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import service from "../../utils/request";
|
|
2
|
+
import type {
|
|
3
|
+
GetUserInfoRequest,
|
|
4
|
+
ListUserButtonRequest,
|
|
5
|
+
TreeRouteResponse,
|
|
6
|
+
TreeUserMenuRequest,
|
|
7
|
+
UserInfoForm
|
|
8
|
+
} from "../../rpc/system/admin/v1/auth";
|
|
9
|
+
import type { StringValues } from "../../rpc/common/v1/types";
|
|
10
|
+
|
|
11
|
+
const AUTH_URL = "/v1/admin/auth";
|
|
12
|
+
|
|
13
|
+
/** AuthServiceImpl 管理端运行壳认证服务。 */
|
|
14
|
+
export class AuthServiceImpl {
|
|
15
|
+
/** 获取当前登录用户。 */
|
|
16
|
+
GetUserInfo(request: GetUserInfoRequest): Promise<UserInfoForm> {
|
|
17
|
+
return service<GetUserInfoRequest, UserInfoForm>({
|
|
18
|
+
url: `${AUTH_URL}/user`,
|
|
19
|
+
method: "get",
|
|
20
|
+
params: request
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** 获取当前用户菜单。 */
|
|
25
|
+
TreeUserMenu(request: TreeUserMenuRequest): Promise<TreeRouteResponse> {
|
|
26
|
+
return service<TreeUserMenuRequest, TreeRouteResponse>({
|
|
27
|
+
url: `${AUTH_URL}/menu/tree`,
|
|
28
|
+
method: "get",
|
|
29
|
+
params: request
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** 获取当前用户按钮权限。 */
|
|
34
|
+
ListUserButton(request: ListUserButtonRequest): Promise<StringValues> {
|
|
35
|
+
return service<ListUserButtonRequest, StringValues>({
|
|
36
|
+
url: `${AUTH_URL}/buttons`,
|
|
37
|
+
method: "get",
|
|
38
|
+
params: request
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** defAuthService 管理端运行壳认证服务实例。 */
|
|
45
|
+
export const defAuthService = new AuthServiceImpl();
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import service from "../../utils/request";
|
|
2
|
+
import type { OptionBaseDictRequest, OptionBaseDictResponse } from "../../rpc/system/admin/v1/base_dict";
|
|
3
|
+
|
|
4
|
+
const BASE_DICT_URL = "/v1/admin/base/dict";
|
|
5
|
+
|
|
6
|
+
/** BaseDictServiceImpl 管理端运行壳字典服务。 */
|
|
7
|
+
export class BaseDictServiceImpl {
|
|
8
|
+
/** 查询全局字典选项。 */
|
|
9
|
+
OptionBaseDict(request: OptionBaseDictRequest): Promise<OptionBaseDictResponse> {
|
|
10
|
+
return service<OptionBaseDictRequest, OptionBaseDictResponse>({
|
|
11
|
+
url: `${BASE_DICT_URL}/option`,
|
|
12
|
+
method: "get",
|
|
13
|
+
params: request
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** defBaseDictService 管理端运行壳字典服务实例。 */
|
|
19
|
+
export const defBaseDictService = new BaseDictServiceImpl();
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import service from "../../utils/request";
|
|
2
|
+
import type { SelectOptionResponse } from "../../rpc/common/v1/common";
|
|
3
|
+
import type { OptionBaseTenantRequest } from "../../rpc/system/admin/v1/base_tenant";
|
|
4
|
+
|
|
5
|
+
const BASE_TENANT_URL = "/v1/admin/base/tenant";
|
|
6
|
+
|
|
7
|
+
/** BaseTenantServiceImpl 管理端运行壳租户服务。 */
|
|
8
|
+
export class BaseTenantServiceImpl {
|
|
9
|
+
/** 查询租户选项。 */
|
|
10
|
+
OptionBaseTenant(request: OptionBaseTenantRequest): Promise<SelectOptionResponse> {
|
|
11
|
+
return service<OptionBaseTenantRequest, SelectOptionResponse>({
|
|
12
|
+
url: `${BASE_TENANT_URL}/option`,
|
|
13
|
+
method: "get",
|
|
14
|
+
params: request
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** defBaseTenantService 管理端运行壳租户服务实例。 */
|
|
20
|
+
export const defBaseTenantService = new BaseTenantServiceImpl();
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
@font-face {
|
|
2
|
+
font-family: iconfont; /* Project id 2667653 */
|
|
3
|
+
src: url("iconfont.ttf?t=1719667796161") format("truetype");
|
|
4
|
+
}
|
|
5
|
+
.iconfont {
|
|
6
|
+
font-family: iconfont !important;
|
|
7
|
+
font-size: 20px;
|
|
8
|
+
font-style: normal;
|
|
9
|
+
-webkit-font-smoothing: antialiased;
|
|
10
|
+
-moz-osx-font-smoothing: grayscale;
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
}
|
|
13
|
+
.icon-yiwen::before {
|
|
14
|
+
font-size: 15px;
|
|
15
|
+
content: "\e693";
|
|
16
|
+
}
|
|
17
|
+
.icon-xiala::before {
|
|
18
|
+
content: "\e62b";
|
|
19
|
+
}
|
|
20
|
+
.icon-tuichu::before {
|
|
21
|
+
content: "\e645";
|
|
22
|
+
}
|
|
23
|
+
.icon-zhuti::before {
|
|
24
|
+
font-size: 22.4px;
|
|
25
|
+
content: "\e638";
|
|
26
|
+
}
|
|
27
|
+
.icon-sousuo::before {
|
|
28
|
+
content: "\e611";
|
|
29
|
+
}
|
|
30
|
+
.icon-contentright::before {
|
|
31
|
+
content: "\e8c9";
|
|
32
|
+
}
|
|
33
|
+
.icon-contentleft::before {
|
|
34
|
+
content: "\e8ca";
|
|
35
|
+
}
|
|
36
|
+
.icon-fangda::before {
|
|
37
|
+
content: "\e826";
|
|
38
|
+
}
|
|
39
|
+
.icon-suoxiao::before {
|
|
40
|
+
content: "\e641";
|
|
41
|
+
}
|
|
42
|
+
.icon-zhongyingwen::before {
|
|
43
|
+
content: "\e8cb";
|
|
44
|
+
}
|
|
45
|
+
.icon-huiche::before {
|
|
46
|
+
content: "\e637";
|
|
47
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" baseProfile="full" width="100%" height="100%" viewBox="0 0 1400 800">
|
|
2
|
+
|
|
3
|
+
<rect x="1300" y="400" rx="40" ry="40" width="150" height="150" stroke="rgb(129, 201, 149)" fill="rgb(129, 201, 149)">
|
|
4
|
+
<animateTransform attributeType="XML" attributeName="transform" begin="0s" dur="35s" type="rotate" from="0 1450 550" to="360 1450 550" repeatCount="indefinite"/>
|
|
5
|
+
</rect>
|
|
6
|
+
|
|
7
|
+
<path d="M 100 350 A 150 150 0 1 1 400 350 Q400 370 380 370 L 250 370 L 120 370 Q100 370 100 350" fill="#a2b3ff">
|
|
8
|
+
<animateMotion path="M 800 -200 L 800 -300 L 800 -200" dur="20s" begin="0s" repeatCount="indefinite"/>
|
|
9
|
+
<animateTransform attributeType="XML" attributeName="transform" begin="0s" dur="30s" type="rotate" values="0 210 530 ; -30 210 530 ; 0 210 530" keyTimes="0 ; 0.5 ; 1" repeatCount="indefinite"/>
|
|
10
|
+
</path>
|
|
11
|
+
|
|
12
|
+
<circle cx="150" cy="150" r="180" stroke="#85FFBD" fill="#85FFBD">
|
|
13
|
+
<animateMotion path="M 0 0 L 40 20 Z" dur="5s" repeatCount="indefinite"/>
|
|
14
|
+
</circle>
|
|
15
|
+
|
|
16
|
+
<!-- 三角形 -->
|
|
17
|
+
<path d="M 165 580 L 270 580 Q275 578 270 570 L 223 483 Q220 480 217 483 L 165 570 Q160 578 165 580" fill="#a2b3ff">
|
|
18
|
+
<animateTransform attributeType="XML" attributeName="transform" begin="0s" dur="35s" type="rotate" from="0 210 530" to="360 210 530" repeatCount="indefinite"/>
|
|
19
|
+
</path>
|
|
20
|
+
|
|
21
|
+
<!-- <circle cx="1200" cy="600" r="30" stroke="rgb(241, 243, 244)" fill="rgb(241, 243, 244)">-->
|
|
22
|
+
<!-- <animateMotion path="M 0 0 L -20 40 Z" dur="9s" repeatCount="indefinite"/>-->
|
|
23
|
+
<!-- </circle>-->
|
|
24
|
+
|
|
25
|
+
<path d="M 100 350 A 40 40 0 1 1 180 350 L 180 430 A 40 40 0 1 1 100 430 Z" fill="#3054EB">
|
|
26
|
+
<animateMotion path="M 140 390 L 180 360 L 140 390" dur="20s" begin="0s" repeatCount="indefinite"/>
|
|
27
|
+
<animateTransform attributeType="XML" attributeName="transform" begin="0s" dur="30s" type="rotate" values="0 140 390; -60 140 390; 0 140 390" keyTimes="0 ; 0.5 ; 1" repeatCount="indefinite"/>
|
|
28
|
+
</path>
|
|
29
|
+
|
|
30
|
+
<rect x="400" y="600" rx="40" ry="40" width="100" height="100" stroke="rgb(129, 201, 149)" fill="#3054EB">
|
|
31
|
+
<animateTransform attributeType="XML" attributeName="transform" begin="0s" dur="35s" type="rotate" from="-30 550 750" to="330 550 750" repeatCount="indefinite"/>
|
|
32
|
+
</rect>
|
|
33
|
+
</svg>
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 261.76 226.69"><path d="M161.096.001l-30.225 52.351L100.647.001H-.005l130.877 226.688L261.749.001z" fill="#41b883"/><path d="M161.096.001l-30.225 52.351L100.647.001H52.346l78.526 136.01L209.398.001z" fill="#34495e"/></svg>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useAuthButtons } from "./hooks/useAuthButtons";
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { createApp } from "vue";
|
|
2
|
+
import App from "./App.vue";
|
|
3
|
+
import "./styles/reset.scss";
|
|
4
|
+
import "./styles/common.scss";
|
|
5
|
+
import "./assets/iconfont/iconfont.scss";
|
|
6
|
+
import "./assets/fonts/font.scss";
|
|
7
|
+
import "element-plus/dist/index.css";
|
|
8
|
+
import "element-plus/theme-chalk/dark/css-vars.css";
|
|
9
|
+
import "./styles/element-dark.scss";
|
|
10
|
+
import "./styles/element.scss";
|
|
11
|
+
import "virtual:svg-icons-register";
|
|
12
|
+
import * as Icons from "@element-plus/icons-vue";
|
|
13
|
+
import { ElLoading } from "element-plus";
|
|
14
|
+
import directives from "./directives/index";
|
|
15
|
+
import router from "./routers";
|
|
16
|
+
import pinia from "./stores";
|
|
17
|
+
import Dict from "./components/Dict/index.vue";
|
|
18
|
+
import DictLabel from "./components/Dict/DictLabel.vue";
|
|
19
|
+
import SvgIcon from "./components/SvgIcon/index.vue";
|
|
20
|
+
import errorHandler from "./utils/errorHandler";
|
|
21
|
+
import { useConfigStore } from "./stores/modules/config";
|
|
22
|
+
import { kratosAdminModule } from "./modules/kratosAdmin";
|
|
23
|
+
import { registerAdminModules } from "./modules";
|
|
24
|
+
import type { AdminModule } from "./modules";
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* 管理端启动参数。
|
|
28
|
+
*/
|
|
29
|
+
export interface AdminBootstrapOptions {
|
|
30
|
+
/** 业务模块列表。 */
|
|
31
|
+
modules?: AdminModule[];
|
|
32
|
+
/** Vue 应用挂载节点。 */
|
|
33
|
+
mount?: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* 创建并启动管理端应用,业务项目可通过 modules 注册自己的页面。
|
|
38
|
+
*/
|
|
39
|
+
export async function bootstrapAdminApp(options: AdminBootstrapOptions = {}) {
|
|
40
|
+
registerAdminModules([kratosAdminModule, ...(options.modules ?? [])]);
|
|
41
|
+
|
|
42
|
+
const app = createApp(App);
|
|
43
|
+
|
|
44
|
+
app.config.errorHandler = errorHandler;
|
|
45
|
+
|
|
46
|
+
// 后端菜单图标以字符串形式返回,需要在运行时全局注册后才能被动态组件解析。
|
|
47
|
+
Object.keys(Icons).forEach(key => {
|
|
48
|
+
app.component(key, Icons[key as keyof typeof Icons]);
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
// 注册字典相关全局组件。
|
|
52
|
+
app.component("Dict", Dict);
|
|
53
|
+
app.component("DictLabel", DictLabel);
|
|
54
|
+
app.component("SvgIcon", SvgIcon);
|
|
55
|
+
|
|
56
|
+
// 按需加载模式不会自动注册 v-loading 指令,需要显式挂载。
|
|
57
|
+
app.directive("loading", ElLoading.directive);
|
|
58
|
+
|
|
59
|
+
app.use(directives).use(pinia).use(router);
|
|
60
|
+
|
|
61
|
+
try {
|
|
62
|
+
await useConfigStore().loadDisplayConfig();
|
|
63
|
+
} catch {
|
|
64
|
+
// 配置接口失败时继续使用本地默认配置,避免阻断应用启动。
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
app.mount(options.mount ?? "#app");
|
|
68
|
+
return app;
|
|
69
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<article class="data-panel-card" :class="cardClass">
|
|
3
|
+
<div class="data-panel-card__header">
|
|
4
|
+
<div>
|
|
5
|
+
<h3 class="data-panel-card__title">{{ title }}</h3>
|
|
6
|
+
<p v-if="description" class="data-panel-card__desc">{{ description }}</p>
|
|
7
|
+
</div>
|
|
8
|
+
<slot name="extra" />
|
|
9
|
+
</div>
|
|
10
|
+
<div class="data-panel-card__body">
|
|
11
|
+
<slot />
|
|
12
|
+
</div>
|
|
13
|
+
</article>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script setup lang="ts">
|
|
17
|
+
import { computed } from "vue";
|
|
18
|
+
|
|
19
|
+
const props = withDefaults(
|
|
20
|
+
defineProps<{
|
|
21
|
+
title: string;
|
|
22
|
+
description?: string;
|
|
23
|
+
primary?: boolean;
|
|
24
|
+
}>(),
|
|
25
|
+
{
|
|
26
|
+
description: "",
|
|
27
|
+
primary: false
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
const cardClass = computed(() => ({
|
|
32
|
+
"data-panel-card--primary": props.primary,
|
|
33
|
+
"data-panel-card--secondary": !props.primary
|
|
34
|
+
}));
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
<style scoped lang="scss">
|
|
38
|
+
.data-panel-card {
|
|
39
|
+
padding: 18px;
|
|
40
|
+
background: var(--admin-page-card-bg);
|
|
41
|
+
border: 1px solid var(--admin-page-card-border);
|
|
42
|
+
border-radius: var(--admin-page-radius);
|
|
43
|
+
box-shadow: var(--admin-page-shadow);
|
|
44
|
+
}
|
|
45
|
+
.data-panel-card__header {
|
|
46
|
+
display: flex;
|
|
47
|
+
gap: 16px;
|
|
48
|
+
align-items: flex-start;
|
|
49
|
+
justify-content: space-between;
|
|
50
|
+
margin-bottom: 12px;
|
|
51
|
+
}
|
|
52
|
+
.data-panel-card__title {
|
|
53
|
+
margin: 0;
|
|
54
|
+
font-size: 16px;
|
|
55
|
+
font-weight: 600;
|
|
56
|
+
color: var(--admin-page-text-primary);
|
|
57
|
+
}
|
|
58
|
+
.data-panel-card__desc {
|
|
59
|
+
margin: 6px 0 0;
|
|
60
|
+
font-size: 13px;
|
|
61
|
+
line-height: 1.7;
|
|
62
|
+
color: var(--admin-page-text-secondary);
|
|
63
|
+
}
|
|
64
|
+
.data-panel-card__body {
|
|
65
|
+
height: 360px;
|
|
66
|
+
}
|
|
67
|
+
</style>
|