@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,38 @@
|
|
|
1
|
+
import { ref } from "vue";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @description 获取本地时间
|
|
5
|
+
*/
|
|
6
|
+
export const useTime = () => {
|
|
7
|
+
const year = ref(0); // 年份
|
|
8
|
+
const month = ref(0); // 月份
|
|
9
|
+
const week = ref(""); // 星期几
|
|
10
|
+
const day = ref(0); // 天数
|
|
11
|
+
const hour = ref<number | string>(0); // 小时
|
|
12
|
+
const minute = ref<number | string>(0); // 分钟
|
|
13
|
+
const second = ref<number | string>(0); // 秒
|
|
14
|
+
const nowTime = ref<string>(""); // 当前时间
|
|
15
|
+
|
|
16
|
+
// 更新时间
|
|
17
|
+
const updateTime = () => {
|
|
18
|
+
const date = new Date();
|
|
19
|
+
year.value = date.getFullYear();
|
|
20
|
+
month.value = date.getMonth() + 1;
|
|
21
|
+
week.value = "日一二三四五六".charAt(date.getDay());
|
|
22
|
+
day.value = date.getDate();
|
|
23
|
+
hour.value =
|
|
24
|
+
(date.getHours() + "")?.padStart(2, "0") ||
|
|
25
|
+
new Intl.NumberFormat(undefined, { minimumIntegerDigits: 2 }).format(date.getHours());
|
|
26
|
+
minute.value =
|
|
27
|
+
(date.getMinutes() + "")?.padStart(2, "0") ||
|
|
28
|
+
new Intl.NumberFormat(undefined, { minimumIntegerDigits: 2 }).format(date.getMinutes());
|
|
29
|
+
second.value =
|
|
30
|
+
(date.getSeconds() + "")?.padStart(2, "0") ||
|
|
31
|
+
new Intl.NumberFormat(undefined, { minimumIntegerDigits: 2 }).format(date.getSeconds());
|
|
32
|
+
nowTime.value = `${year.value}年${month.value}月${day.value} ${hour.value}:${minute.value}:${second.value}`;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
updateTime();
|
|
36
|
+
|
|
37
|
+
return { year, month, day, hour, minute, second, week, nowTime };
|
|
38
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference path="./vite-env.d.ts" />
|
|
2
|
+
/// <reference path="./typings/global.d.ts" />
|
|
3
|
+
/// <reference path="./typings/utils.d.ts" />
|
|
4
|
+
/// <reference path="../types/generated/auto-imports.d.ts" />
|
|
5
|
+
/// <reference path="../types/generated/components.d.ts" />
|
|
6
|
+
|
|
7
|
+
export * from "./modules";
|
|
8
|
+
export { kratosAdminModule } from "./modules/kratosAdmin";
|
|
9
|
+
export { bootstrapAdminApp } from "./bootstrap";
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
.el-container {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
:deep(.el-header) {
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: space-between;
|
|
9
|
+
height: 55px;
|
|
10
|
+
padding: 0 15px 0 0;
|
|
11
|
+
background-color: var(--el-header-bg-color);
|
|
12
|
+
border-bottom: 1px solid var(--el-header-border-color);
|
|
13
|
+
.header-lf {
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
white-space: nowrap;
|
|
18
|
+
.logo {
|
|
19
|
+
flex-shrink: 0;
|
|
20
|
+
width: 210px;
|
|
21
|
+
margin-right: 16px;
|
|
22
|
+
.logo-img {
|
|
23
|
+
width: 28px;
|
|
24
|
+
object-fit: contain;
|
|
25
|
+
}
|
|
26
|
+
.logo-text {
|
|
27
|
+
margin-left: 6px;
|
|
28
|
+
font-size: 21.5px;
|
|
29
|
+
font-weight: bold;
|
|
30
|
+
color: var(--el-header-logo-text-color);
|
|
31
|
+
white-space: nowrap;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
.classic-content {
|
|
37
|
+
display: flex;
|
|
38
|
+
height: calc(100% - 55px);
|
|
39
|
+
:deep(.el-aside) {
|
|
40
|
+
width: auto;
|
|
41
|
+
background-color: var(--el-menu-bg-color);
|
|
42
|
+
border-right: 1px solid var(--el-aside-border-color);
|
|
43
|
+
.aside-box {
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
height: 100%;
|
|
47
|
+
transition: width 0.3s ease;
|
|
48
|
+
.el-menu {
|
|
49
|
+
width: 100%;
|
|
50
|
+
overflow-x: hidden;
|
|
51
|
+
border-right: none;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
.classic-main {
|
|
56
|
+
display: flex;
|
|
57
|
+
flex-direction: column;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<!-- 经典布局 -->
|
|
2
|
+
<template>
|
|
3
|
+
<el-container class="layout">
|
|
4
|
+
<el-header>
|
|
5
|
+
<div class="header-lf mask-image">
|
|
6
|
+
<div class="logo flx-center">
|
|
7
|
+
<img class="logo-img" :src="logoUrl" alt="logo" />
|
|
8
|
+
<span class="logo-text">{{ title }}</span>
|
|
9
|
+
</div>
|
|
10
|
+
<ToolBarLeft />
|
|
11
|
+
</div>
|
|
12
|
+
<div class="header-ri">
|
|
13
|
+
<ToolBarRight />
|
|
14
|
+
</div>
|
|
15
|
+
</el-header>
|
|
16
|
+
<el-container class="classic-content">
|
|
17
|
+
<el-aside>
|
|
18
|
+
<div class="aside-box" :style="{ width: isCollapse ? '65px' : '210px' }">
|
|
19
|
+
<el-scrollbar>
|
|
20
|
+
<el-menu
|
|
21
|
+
:router="false"
|
|
22
|
+
:default-active="activeMenu"
|
|
23
|
+
:collapse="isCollapse"
|
|
24
|
+
:unique-opened="accordion"
|
|
25
|
+
:collapse-transition="false"
|
|
26
|
+
>
|
|
27
|
+
<SubMenu :menu-list="menuList" />
|
|
28
|
+
</el-menu>
|
|
29
|
+
</el-scrollbar>
|
|
30
|
+
</div>
|
|
31
|
+
</el-aside>
|
|
32
|
+
<el-container class="classic-main">
|
|
33
|
+
<Main />
|
|
34
|
+
</el-container>
|
|
35
|
+
</el-container>
|
|
36
|
+
</el-container>
|
|
37
|
+
</template>
|
|
38
|
+
|
|
39
|
+
<script setup lang="ts" name="layoutClassic">
|
|
40
|
+
import { computed } from "vue";
|
|
41
|
+
import { useRoute } from "vue-router";
|
|
42
|
+
import { useAuthStore } from "../../stores/modules/auth";
|
|
43
|
+
import { useConfigStore } from "../../stores/modules/config";
|
|
44
|
+
import { useGlobalStore } from "../../stores/modules/global";
|
|
45
|
+
import Main from "../../layouts/components/Main/index.vue";
|
|
46
|
+
import SubMenu from "../../layouts/components/Menu/SubMenu.vue";
|
|
47
|
+
import ToolBarLeft from "../../layouts/components/Header/ToolBarLeft.vue";
|
|
48
|
+
import ToolBarRight from "../../layouts/components/Header/ToolBarRight.vue";
|
|
49
|
+
|
|
50
|
+
const route = useRoute();
|
|
51
|
+
const authStore = useAuthStore();
|
|
52
|
+
const configStore = useConfigStore();
|
|
53
|
+
const globalStore = useGlobalStore();
|
|
54
|
+
const accordion = computed(() => globalStore.accordion);
|
|
55
|
+
const isCollapse = computed(() => globalStore.isCollapse);
|
|
56
|
+
const menuList = computed(() => authStore.showMenuListGet);
|
|
57
|
+
const activeMenu = computed(() => route.path as string);
|
|
58
|
+
const title = computed(() => configStore.display.sysName || import.meta.env.VITE_GLOB_APP_TITLE);
|
|
59
|
+
const logoUrl = computed(() => configStore.display.adminLogo);
|
|
60
|
+
</script>
|
|
61
|
+
|
|
62
|
+
<style scoped lang="scss">
|
|
63
|
+
@use "./index.scss" as *;
|
|
64
|
+
</style>
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
.el-container {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
.aside-split {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-shrink: 0;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
width: 70px;
|
|
9
|
+
height: 100%;
|
|
10
|
+
background-color: var(--el-menu-bg-color);
|
|
11
|
+
border-right: 1px solid var(--el-aside-border-color);
|
|
12
|
+
.logo {
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
height: 55px;
|
|
15
|
+
.logo-img {
|
|
16
|
+
width: 32px;
|
|
17
|
+
object-fit: contain;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
.el-scrollbar {
|
|
21
|
+
height: calc(100% - 55px);
|
|
22
|
+
.split-list {
|
|
23
|
+
flex: 1;
|
|
24
|
+
.split-item {
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
align-items: center;
|
|
28
|
+
justify-content: center;
|
|
29
|
+
height: 70px;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
transition: all 0.3s ease;
|
|
32
|
+
.el-icon {
|
|
33
|
+
font-size: 20px;
|
|
34
|
+
}
|
|
35
|
+
.title {
|
|
36
|
+
margin-top: 6px;
|
|
37
|
+
font-size: 12px;
|
|
38
|
+
}
|
|
39
|
+
.el-icon,
|
|
40
|
+
.title {
|
|
41
|
+
color: var(--el-menu-text-color);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
.split-active {
|
|
45
|
+
background-color: var(--el-color-primary) !important;
|
|
46
|
+
.el-icon,
|
|
47
|
+
.title {
|
|
48
|
+
color: #ffffff !important;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
.not-aside {
|
|
55
|
+
width: 0 !important;
|
|
56
|
+
border-right: none !important;
|
|
57
|
+
}
|
|
58
|
+
.el-aside {
|
|
59
|
+
display: flex;
|
|
60
|
+
flex-direction: column;
|
|
61
|
+
height: 100%;
|
|
62
|
+
overflow: hidden;
|
|
63
|
+
background-color: var(--el-menu-bg-color);
|
|
64
|
+
border-right: 1px solid var(--el-aside-border-color);
|
|
65
|
+
transition: width 0.3s ease;
|
|
66
|
+
.el-scrollbar {
|
|
67
|
+
height: calc(100% - 55px);
|
|
68
|
+
.el-menu {
|
|
69
|
+
width: 100%;
|
|
70
|
+
overflow-x: hidden;
|
|
71
|
+
border-right: none;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
.logo {
|
|
75
|
+
box-sizing: border-box;
|
|
76
|
+
height: 55px;
|
|
77
|
+
.logo-text {
|
|
78
|
+
font-size: 24px;
|
|
79
|
+
font-weight: bold;
|
|
80
|
+
color: var(--el-aside-logo-text-color);
|
|
81
|
+
white-space: nowrap;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
.el-header {
|
|
86
|
+
box-sizing: border-box;
|
|
87
|
+
display: flex;
|
|
88
|
+
align-items: center;
|
|
89
|
+
justify-content: space-between;
|
|
90
|
+
height: 55px;
|
|
91
|
+
padding: 0 15px;
|
|
92
|
+
background-color: var(--el-header-bg-color);
|
|
93
|
+
border-bottom: 1px solid var(--el-border-color-light);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
<!-- 分栏布局 -->
|
|
2
|
+
<template>
|
|
3
|
+
<el-container class="layout">
|
|
4
|
+
<div class="aside-split">
|
|
5
|
+
<div class="logo flx-center">
|
|
6
|
+
<img class="logo-img" :src="logoUrl" alt="logo" />
|
|
7
|
+
</div>
|
|
8
|
+
<el-scrollbar>
|
|
9
|
+
<div class="split-list">
|
|
10
|
+
<div
|
|
11
|
+
v-for="item in menuList"
|
|
12
|
+
:key="getRouteMenuKey(item)"
|
|
13
|
+
class="split-item"
|
|
14
|
+
:class="{ 'split-active': splitActive === getRouteMenuKey(item) }"
|
|
15
|
+
@click="changeSubMenu(item)"
|
|
16
|
+
>
|
|
17
|
+
<el-icon>
|
|
18
|
+
<component :is="getRouteMetaIcon(item.meta)"></component>
|
|
19
|
+
</el-icon>
|
|
20
|
+
<span class="title">{{ getRouteMetaTitle(item.meta) }}</span>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
</el-scrollbar>
|
|
24
|
+
</div>
|
|
25
|
+
<el-aside :class="{ 'not-aside': !subMenuList.length }" :style="{ width: isCollapse ? '65px' : '210px' }">
|
|
26
|
+
<div class="logo flx-center">
|
|
27
|
+
<span v-show="subMenuList.length" class="logo-text">{{ isCollapse ? collapseTitle : title }}</span>
|
|
28
|
+
</div>
|
|
29
|
+
<el-scrollbar>
|
|
30
|
+
<el-menu
|
|
31
|
+
:router="false"
|
|
32
|
+
:default-active="activeMenu"
|
|
33
|
+
:collapse="isCollapse"
|
|
34
|
+
:unique-opened="accordion"
|
|
35
|
+
:collapse-transition="false"
|
|
36
|
+
>
|
|
37
|
+
<SubMenu :menu-list="subMenuList" />
|
|
38
|
+
</el-menu>
|
|
39
|
+
</el-scrollbar>
|
|
40
|
+
</el-aside>
|
|
41
|
+
<el-container>
|
|
42
|
+
<el-header>
|
|
43
|
+
<ToolBarLeft />
|
|
44
|
+
<ToolBarRight />
|
|
45
|
+
</el-header>
|
|
46
|
+
<Main />
|
|
47
|
+
</el-container>
|
|
48
|
+
</el-container>
|
|
49
|
+
</template>
|
|
50
|
+
|
|
51
|
+
<script setup lang="ts" name="layoutColumns">
|
|
52
|
+
import { ref, computed, watch } from "vue";
|
|
53
|
+
import { useRoute, useRouter } from "vue-router";
|
|
54
|
+
import { useAuthStore } from "../../stores/modules/auth";
|
|
55
|
+
import { useConfigStore } from "../../stores/modules/config";
|
|
56
|
+
import { useGlobalStore } from "../../stores/modules/global";
|
|
57
|
+
import type { RouteItem } from "../../rpc/system/admin/v1/auth";
|
|
58
|
+
import { getRouteMenuKey, getRouteMetaIcon, getRouteMetaTitle, getRouteTarget, isExternalPath, isRouteMenuActive } from "../../utils";
|
|
59
|
+
import Main from "../../layouts/components/Main/index.vue";
|
|
60
|
+
import ToolBarLeft from "../../layouts/components/Header/ToolBarLeft.vue";
|
|
61
|
+
import ToolBarRight from "../../layouts/components/Header/ToolBarRight.vue";
|
|
62
|
+
import SubMenu from "../../layouts/components/Menu/SubMenu.vue";
|
|
63
|
+
|
|
64
|
+
const route = useRoute();
|
|
65
|
+
const router = useRouter();
|
|
66
|
+
const authStore = useAuthStore();
|
|
67
|
+
const configStore = useConfigStore();
|
|
68
|
+
const globalStore = useGlobalStore();
|
|
69
|
+
const accordion = computed(() => globalStore.accordion);
|
|
70
|
+
const isCollapse = computed(() => globalStore.isCollapse);
|
|
71
|
+
const menuList = computed(() => authStore.showMenuListGet.filter(item => Boolean(item.path) || Boolean(item.children?.length)));
|
|
72
|
+
const activeMenu = computed(() => route.path as string);
|
|
73
|
+
const title = computed(() => configStore.display.sysName || import.meta.env.VITE_GLOB_APP_TITLE);
|
|
74
|
+
const collapseTitle = computed(() => title.value.slice(0, 1).toUpperCase() || "S");
|
|
75
|
+
const logoUrl = computed(() => configStore.display.adminLogo);
|
|
76
|
+
|
|
77
|
+
const subMenuList = ref<RouteItem[]>([]);
|
|
78
|
+
const splitActive = ref("");
|
|
79
|
+
watch(
|
|
80
|
+
() => [menuList, route],
|
|
81
|
+
() => {
|
|
82
|
+
// 当前菜单没有数据直接 return
|
|
83
|
+
if (!menuList.value.length) return;
|
|
84
|
+
const menuItem = menuList.value.find((item: RouteItem) => isRouteMenuActive(item, route.path));
|
|
85
|
+
if (!menuItem) return (subMenuList.value = []);
|
|
86
|
+
splitActive.value = getRouteMenuKey(menuItem);
|
|
87
|
+
if (menuItem.children?.length) return (subMenuList.value = menuItem.children);
|
|
88
|
+
subMenuList.value = [];
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
deep: true,
|
|
92
|
+
immediate: true
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
|
|
96
|
+
/** 切换分栏布局的二级菜单。 */
|
|
97
|
+
const changeSubMenu = (item: RouteItem) => {
|
|
98
|
+
splitActive.value = getRouteMenuKey(item);
|
|
99
|
+
if (item.children?.length) return (subMenuList.value = item.children);
|
|
100
|
+
subMenuList.value = [];
|
|
101
|
+
const target = getRouteTarget(item);
|
|
102
|
+
if (!target) return;
|
|
103
|
+
if (isExternalPath(target)) {
|
|
104
|
+
window.open(target, "_blank", "noopener,noreferrer");
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
router.push(target);
|
|
108
|
+
};
|
|
109
|
+
</script>
|
|
110
|
+
|
|
111
|
+
<style scoped lang="scss">
|
|
112
|
+
@use "./index.scss" as *;
|
|
113
|
+
</style>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
.el-container {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
:deep(.el-header) {
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: space-between;
|
|
9
|
+
height: 55px;
|
|
10
|
+
padding: 0 15px 0 0;
|
|
11
|
+
background-color: var(--el-header-bg-color);
|
|
12
|
+
border-bottom: 1px solid var(--el-header-border-color);
|
|
13
|
+
.logo {
|
|
14
|
+
width: 210px;
|
|
15
|
+
margin-right: 30px;
|
|
16
|
+
.logo-img {
|
|
17
|
+
width: 28px;
|
|
18
|
+
object-fit: contain;
|
|
19
|
+
}
|
|
20
|
+
.logo-text {
|
|
21
|
+
margin-left: 6px;
|
|
22
|
+
font-size: 21.5px;
|
|
23
|
+
font-weight: bold;
|
|
24
|
+
color: var(--el-header-logo-text-color);
|
|
25
|
+
white-space: nowrap;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
.el-menu {
|
|
29
|
+
flex: 1;
|
|
30
|
+
height: 100%;
|
|
31
|
+
overflow: hidden;
|
|
32
|
+
border-bottom: none;
|
|
33
|
+
.el-sub-menu__hide-arrow {
|
|
34
|
+
width: 65px;
|
|
35
|
+
height: 55px;
|
|
36
|
+
}
|
|
37
|
+
.el-menu-item.is-active {
|
|
38
|
+
color: #ffffff !important;
|
|
39
|
+
}
|
|
40
|
+
.is-active {
|
|
41
|
+
background-color: var(--el-color-primary) !important;
|
|
42
|
+
border-bottom-color: var(--el-color-primary) !important;
|
|
43
|
+
&::before {
|
|
44
|
+
width: 0;
|
|
45
|
+
}
|
|
46
|
+
.el-sub-menu__title {
|
|
47
|
+
color: #ffffff !important;
|
|
48
|
+
background-color: var(--el-color-primary) !important;
|
|
49
|
+
border-bottom-color: var(--el-color-primary) !important;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@media screen and (width <= 730px) {
|
|
56
|
+
.logo {
|
|
57
|
+
display: none !important;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<!-- 横向布局 -->
|
|
2
|
+
<template>
|
|
3
|
+
<el-container class="layout">
|
|
4
|
+
<el-header>
|
|
5
|
+
<div class="logo flx-center">
|
|
6
|
+
<img class="logo-img" :src="logoUrl" alt="logo" />
|
|
7
|
+
<span class="logo-text">{{ title }}</span>
|
|
8
|
+
</div>
|
|
9
|
+
<el-menu mode="horizontal" :router="false" :default-active="activeMenu">
|
|
10
|
+
<!-- 不能直接使用 SubMenu 组件,无法触发 el-menu 隐藏省略功能 -->
|
|
11
|
+
<template v-for="subItem in menuList" :key="getRouteMenuKey(subItem)">
|
|
12
|
+
<el-sub-menu v-if="subItem.children?.length" :index="getRouteMenuKey(subItem)">
|
|
13
|
+
<template #title>
|
|
14
|
+
<el-icon>
|
|
15
|
+
<component :is="getRouteMetaIcon(subItem.meta)"></component>
|
|
16
|
+
</el-icon>
|
|
17
|
+
<span>{{ getRouteMetaTitle(subItem.meta) }}</span>
|
|
18
|
+
</template>
|
|
19
|
+
<SubMenu :menu-list="subItem.children" />
|
|
20
|
+
</el-sub-menu>
|
|
21
|
+
<el-menu-item v-else :index="getRouteMenuKey(subItem)" @click="handleClickMenu(subItem)">
|
|
22
|
+
<el-icon>
|
|
23
|
+
<component :is="getRouteMetaIcon(subItem.meta)"></component>
|
|
24
|
+
</el-icon>
|
|
25
|
+
<template #title>
|
|
26
|
+
<span>{{ getRouteMetaTitle(subItem.meta) }}</span>
|
|
27
|
+
</template>
|
|
28
|
+
</el-menu-item>
|
|
29
|
+
</template>
|
|
30
|
+
</el-menu>
|
|
31
|
+
<ToolBarRight />
|
|
32
|
+
</el-header>
|
|
33
|
+
<Main />
|
|
34
|
+
</el-container>
|
|
35
|
+
</template>
|
|
36
|
+
|
|
37
|
+
<script setup lang="ts" name="layoutTransverse">
|
|
38
|
+
import { computed } from "vue";
|
|
39
|
+
import { useAuthStore } from "../../stores/modules/auth";
|
|
40
|
+
import { useConfigStore } from "../../stores/modules/config";
|
|
41
|
+
import { useRoute, useRouter } from "vue-router";
|
|
42
|
+
import type { RouteItem } from "../../rpc/system/admin/v1/auth";
|
|
43
|
+
import { getRouteMenuKey, getRouteMetaIcon, getRouteMetaTitle, getRouteTarget, isExternalPath } from "../../utils";
|
|
44
|
+
import Main from "../../layouts/components/Main/index.vue";
|
|
45
|
+
import ToolBarRight from "../../layouts/components/Header/ToolBarRight.vue";
|
|
46
|
+
import SubMenu from "../../layouts/components/Menu/SubMenu.vue";
|
|
47
|
+
|
|
48
|
+
const route = useRoute();
|
|
49
|
+
const router = useRouter();
|
|
50
|
+
const authStore = useAuthStore();
|
|
51
|
+
const configStore = useConfigStore();
|
|
52
|
+
const menuList = computed(() => authStore.showMenuListGet);
|
|
53
|
+
const activeMenu = computed(() => route.path as string);
|
|
54
|
+
const title = computed(() => configStore.display.sysName || import.meta.env.VITE_GLOB_APP_TITLE);
|
|
55
|
+
const logoUrl = computed(() => configStore.display.adminLogo);
|
|
56
|
+
|
|
57
|
+
const handleClickMenu = (subItem: RouteItem) => {
|
|
58
|
+
const target = getRouteTarget(subItem);
|
|
59
|
+
if (!target) return;
|
|
60
|
+
if (isExternalPath(target)) {
|
|
61
|
+
window.open(target, "_blank", "noopener,noreferrer");
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
router.push(target);
|
|
65
|
+
};
|
|
66
|
+
</script>
|
|
67
|
+
|
|
68
|
+
<style scoped lang="scss">
|
|
69
|
+
@use "./index.scss" as *;
|
|
70
|
+
</style>
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
.el-container {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
:deep(.el-aside) {
|
|
5
|
+
width: auto;
|
|
6
|
+
background-color: var(--el-menu-bg-color);
|
|
7
|
+
border-right: 1px solid var(--el-aside-border-color);
|
|
8
|
+
.aside-box {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
height: 100%;
|
|
12
|
+
transition: width 0.3s ease;
|
|
13
|
+
.el-scrollbar {
|
|
14
|
+
height: calc(100% - 55px);
|
|
15
|
+
.el-menu {
|
|
16
|
+
width: 100%;
|
|
17
|
+
overflow-x: hidden;
|
|
18
|
+
border-right: none;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
.logo {
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
height: 55px;
|
|
26
|
+
padding: 0 12px;
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
&--text-only {
|
|
29
|
+
justify-content: flex-start;
|
|
30
|
+
}
|
|
31
|
+
.logo-img {
|
|
32
|
+
flex-shrink: 0;
|
|
33
|
+
width: 28px;
|
|
34
|
+
object-fit: contain;
|
|
35
|
+
}
|
|
36
|
+
.logo-text {
|
|
37
|
+
display: block;
|
|
38
|
+
flex: 1;
|
|
39
|
+
width: 100%;
|
|
40
|
+
min-width: 0;
|
|
41
|
+
overflow: hidden;
|
|
42
|
+
text-overflow: ellipsis;
|
|
43
|
+
font-size: 18px;
|
|
44
|
+
font-weight: bold;
|
|
45
|
+
line-height: 1;
|
|
46
|
+
color: var(--el-aside-logo-text-color);
|
|
47
|
+
white-space: nowrap;
|
|
48
|
+
}
|
|
49
|
+
.logo-text--with-icon {
|
|
50
|
+
margin-left: 8px;
|
|
51
|
+
}
|
|
52
|
+
.logo-text--full {
|
|
53
|
+
flex: none;
|
|
54
|
+
width: 100%;
|
|
55
|
+
text-align: center;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
.el-header {
|
|
61
|
+
box-sizing: border-box;
|
|
62
|
+
display: flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
justify-content: space-between;
|
|
65
|
+
height: 55px;
|
|
66
|
+
padding: 0 15px;
|
|
67
|
+
background-color: var(--el-header-bg-color);
|
|
68
|
+
border-bottom: 1px solid var(--el-header-border-color);
|
|
69
|
+
}
|
|
70
|
+
}
|