@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,111 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="tabs-box">
|
|
3
|
+
<div class="tabs-menu">
|
|
4
|
+
<el-tabs v-model="tabsMenuValue" type="card" @tab-click="tabClick" @tab-remove="tabRemove">
|
|
5
|
+
<el-tab-pane v-for="item in tabsMenuList" :key="item.path" :label="item.title" :name="item.path" :closable="item.close">
|
|
6
|
+
<template #label>
|
|
7
|
+
<el-icon v-if="item.icon && tabsIcon" class="tabs-icon">
|
|
8
|
+
<component :is="item.icon"></component>
|
|
9
|
+
</el-icon>
|
|
10
|
+
{{ item.title }}
|
|
11
|
+
</template>
|
|
12
|
+
</el-tab-pane>
|
|
13
|
+
</el-tabs>
|
|
14
|
+
<MoreButton />
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script setup lang="ts">
|
|
20
|
+
import Sortable from "sortablejs";
|
|
21
|
+
import { ref, computed, watch, onMounted } from "vue";
|
|
22
|
+
import { useRoute, useRouter } from "vue-router";
|
|
23
|
+
import { useGlobalStore } from "../../../stores/modules/global";
|
|
24
|
+
import { useTabsStore } from "../../../stores/modules/tabs";
|
|
25
|
+
import { useAuthStore } from "../../../stores/modules/auth";
|
|
26
|
+
import { TabsPaneContext, TabPaneName } from "element-plus";
|
|
27
|
+
import { getRouteMetaAffix, getRouteMetaFull, getRouteMetaIcon, getRouteMetaKeepAlive, getRouteMetaTitle } from "../../../utils";
|
|
28
|
+
import MoreButton from "./components/MoreButton.vue";
|
|
29
|
+
import { getAdminTabPath } from "../../../modules";
|
|
30
|
+
|
|
31
|
+
const route = useRoute();
|
|
32
|
+
const router = useRouter();
|
|
33
|
+
const tabStore = useTabsStore();
|
|
34
|
+
const authStore = useAuthStore();
|
|
35
|
+
const globalStore = useGlobalStore();
|
|
36
|
+
|
|
37
|
+
const tabsMenuValue = ref(getAdminTabPath(route));
|
|
38
|
+
const tabsMenuList = computed(() => tabStore.tabsMenuList);
|
|
39
|
+
const tabsIcon = computed(() => globalStore.tabsIcon);
|
|
40
|
+
|
|
41
|
+
onMounted(() => {
|
|
42
|
+
tabsDrop();
|
|
43
|
+
initTabs();
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
// 监听路由的变化(防止浏览器后退/前进不变化 tabsMenuValue)
|
|
47
|
+
watch(
|
|
48
|
+
() => route.fullPath,
|
|
49
|
+
() => {
|
|
50
|
+
if (route.meta.full) return;
|
|
51
|
+
const tabPath = getAdminTabPath(route);
|
|
52
|
+
tabsMenuValue.value = tabPath;
|
|
53
|
+
const tabsParams = {
|
|
54
|
+
icon: route.meta.icon as string,
|
|
55
|
+
title: route.meta.title as string,
|
|
56
|
+
path: tabPath,
|
|
57
|
+
name: route.name as string,
|
|
58
|
+
close: !route.meta.affix,
|
|
59
|
+
isKeepAlive: route.meta.keepAlive as boolean
|
|
60
|
+
};
|
|
61
|
+
tabStore.addTabs(tabsParams);
|
|
62
|
+
},
|
|
63
|
+
{ immediate: true }
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
// 初始化固定标签
|
|
67
|
+
const initTabs = () => {
|
|
68
|
+
authStore.flatMenuListGet.forEach(item => {
|
|
69
|
+
if (item.path && item.name && getRouteMetaAffix(item.meta) && !getRouteMetaFull(item.meta)) {
|
|
70
|
+
const tabsParams = {
|
|
71
|
+
icon: getRouteMetaIcon(item.meta),
|
|
72
|
+
title: getRouteMetaTitle(item.meta),
|
|
73
|
+
path: item.path,
|
|
74
|
+
name: item.name,
|
|
75
|
+
close: !getRouteMetaAffix(item.meta),
|
|
76
|
+
isKeepAlive: getRouteMetaKeepAlive(item.meta)
|
|
77
|
+
};
|
|
78
|
+
tabStore.addTabs(tabsParams);
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
// tabs 拖拽排序
|
|
84
|
+
const tabsDrop = () => {
|
|
85
|
+
Sortable.create(document.querySelector(".el-tabs__nav") as HTMLElement, {
|
|
86
|
+
draggable: ".el-tabs__item",
|
|
87
|
+
animation: 300,
|
|
88
|
+
onEnd({ newIndex, oldIndex }) {
|
|
89
|
+
const tabsList = [...tabStore.tabsMenuList];
|
|
90
|
+
const currRow = tabsList.splice(oldIndex as number, 1)[0];
|
|
91
|
+
tabsList.splice(newIndex as number, 0, currRow);
|
|
92
|
+
tabStore.setTabs(tabsList);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
// Tab Click
|
|
98
|
+
const tabClick = (tabItem: TabsPaneContext) => {
|
|
99
|
+
const fullPath = tabItem.props.name as string;
|
|
100
|
+
router.push(fullPath);
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
// Remove Tab
|
|
104
|
+
const tabRemove = (fullPath: TabPaneName) => {
|
|
105
|
+
tabStore.removeTabs(fullPath as string, fullPath === getAdminTabPath(route));
|
|
106
|
+
};
|
|
107
|
+
</script>
|
|
108
|
+
|
|
109
|
+
<style scoped lang="scss">
|
|
110
|
+
@use "./index.scss" as *;
|
|
111
|
+
</style>
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
.divider {
|
|
2
|
+
margin-top: 15px;
|
|
3
|
+
.el-icon {
|
|
4
|
+
position: relative;
|
|
5
|
+
top: 2px;
|
|
6
|
+
right: 5px;
|
|
7
|
+
font-size: 15px;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
.theme-item {
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: space-between;
|
|
14
|
+
padding: 0 5px;
|
|
15
|
+
margin: 14px 0;
|
|
16
|
+
span {
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
font-size: 14px;
|
|
20
|
+
.el-icon {
|
|
21
|
+
margin-left: 3px;
|
|
22
|
+
font-size: 15px;
|
|
23
|
+
color: var(--el-text-color-regular);
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
.layout-box {
|
|
29
|
+
position: relative;
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-wrap: wrap;
|
|
32
|
+
justify-content: space-between;
|
|
33
|
+
padding: 15px 7px 0;
|
|
34
|
+
.layout-item {
|
|
35
|
+
position: relative;
|
|
36
|
+
box-sizing: border-box;
|
|
37
|
+
width: 100px;
|
|
38
|
+
height: 70px;
|
|
39
|
+
padding: 6px;
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
border-radius: 5px;
|
|
42
|
+
box-shadow: 0 0 5px 1px var(--el-border-color-dark);
|
|
43
|
+
transition: all 0.2s;
|
|
44
|
+
.layout-dark {
|
|
45
|
+
background-color: var(--el-color-primary);
|
|
46
|
+
border-radius: 3px;
|
|
47
|
+
}
|
|
48
|
+
.layout-light {
|
|
49
|
+
background-color: var(--el-color-primary-light-5);
|
|
50
|
+
border-radius: 3px;
|
|
51
|
+
}
|
|
52
|
+
.layout-content {
|
|
53
|
+
background-color: var(--el-color-primary-light-8);
|
|
54
|
+
border: 1px dashed var(--el-color-primary);
|
|
55
|
+
border-radius: 3px;
|
|
56
|
+
}
|
|
57
|
+
.el-icon {
|
|
58
|
+
position: absolute;
|
|
59
|
+
right: 10px;
|
|
60
|
+
bottom: 10px;
|
|
61
|
+
color: var(--el-color-primary);
|
|
62
|
+
transition: all 0.2s;
|
|
63
|
+
}
|
|
64
|
+
&:hover {
|
|
65
|
+
box-shadow: 0 0 5px 1px var(--el-text-color-secondary);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
.is-active {
|
|
69
|
+
box-shadow: 0 0 0 2px var(--el-color-primary) !important;
|
|
70
|
+
}
|
|
71
|
+
.layout-vertical {
|
|
72
|
+
display: flex;
|
|
73
|
+
justify-content: space-between;
|
|
74
|
+
margin-bottom: 20px;
|
|
75
|
+
.layout-dark {
|
|
76
|
+
width: 20%;
|
|
77
|
+
}
|
|
78
|
+
.layout-container {
|
|
79
|
+
display: flex;
|
|
80
|
+
flex-direction: column;
|
|
81
|
+
justify-content: space-between;
|
|
82
|
+
width: 72%;
|
|
83
|
+
.layout-light {
|
|
84
|
+
height: 20%;
|
|
85
|
+
}
|
|
86
|
+
.layout-content {
|
|
87
|
+
height: 67%;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
.layout-classic {
|
|
92
|
+
display: flex;
|
|
93
|
+
flex-direction: column;
|
|
94
|
+
justify-content: space-between;
|
|
95
|
+
margin-bottom: 20px;
|
|
96
|
+
.layout-dark {
|
|
97
|
+
height: 22%;
|
|
98
|
+
}
|
|
99
|
+
.layout-container {
|
|
100
|
+
display: flex;
|
|
101
|
+
justify-content: space-between;
|
|
102
|
+
height: 70%;
|
|
103
|
+
.layout-light {
|
|
104
|
+
width: 20%;
|
|
105
|
+
}
|
|
106
|
+
.layout-content {
|
|
107
|
+
width: 70%;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
.layout-transverse {
|
|
112
|
+
display: flex;
|
|
113
|
+
flex-direction: column;
|
|
114
|
+
justify-content: space-between;
|
|
115
|
+
margin-bottom: 15px;
|
|
116
|
+
.layout-dark {
|
|
117
|
+
height: 20%;
|
|
118
|
+
}
|
|
119
|
+
.layout-content {
|
|
120
|
+
height: 67%;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
.layout-columns {
|
|
124
|
+
display: flex;
|
|
125
|
+
justify-content: space-between;
|
|
126
|
+
margin-bottom: 15px;
|
|
127
|
+
.layout-dark {
|
|
128
|
+
width: 14%;
|
|
129
|
+
}
|
|
130
|
+
.layout-light {
|
|
131
|
+
width: 17%;
|
|
132
|
+
}
|
|
133
|
+
.layout-content {
|
|
134
|
+
width: 55%;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-drawer v-model="drawerVisible" title="布局设置" size="290px">
|
|
3
|
+
<!-- 布局样式 -->
|
|
4
|
+
<el-divider class="divider" content-position="center">
|
|
5
|
+
<el-icon><Notification /></el-icon>
|
|
6
|
+
布局样式
|
|
7
|
+
</el-divider>
|
|
8
|
+
<div class="layout-box">
|
|
9
|
+
<el-tooltip effect="dark" content="纵向" placement="top" :show-after="200">
|
|
10
|
+
<div :class="['layout-item layout-vertical', { 'is-active': layout == 'vertical' }]" @click="setLayout('vertical')">
|
|
11
|
+
<div class="layout-dark"></div>
|
|
12
|
+
<div class="layout-container">
|
|
13
|
+
<div class="layout-light"></div>
|
|
14
|
+
<div class="layout-content"></div>
|
|
15
|
+
</div>
|
|
16
|
+
<el-icon v-if="layout == 'vertical'">
|
|
17
|
+
<CircleCheckFilled />
|
|
18
|
+
</el-icon>
|
|
19
|
+
</div>
|
|
20
|
+
</el-tooltip>
|
|
21
|
+
<el-tooltip effect="dark" content="经典" placement="top" :show-after="200">
|
|
22
|
+
<div :class="['layout-item layout-classic', { 'is-active': layout == 'classic' }]" @click="setLayout('classic')">
|
|
23
|
+
<div class="layout-dark"></div>
|
|
24
|
+
<div class="layout-container">
|
|
25
|
+
<div class="layout-light"></div>
|
|
26
|
+
<div class="layout-content"></div>
|
|
27
|
+
</div>
|
|
28
|
+
<el-icon v-if="layout == 'classic'">
|
|
29
|
+
<CircleCheckFilled />
|
|
30
|
+
</el-icon>
|
|
31
|
+
</div>
|
|
32
|
+
</el-tooltip>
|
|
33
|
+
<el-tooltip effect="dark" content="横向" placement="top" :show-after="200">
|
|
34
|
+
<div :class="['layout-item layout-transverse', { 'is-active': layout == 'transverse' }]" @click="setLayout('transverse')">
|
|
35
|
+
<div class="layout-dark"></div>
|
|
36
|
+
<div class="layout-content"></div>
|
|
37
|
+
<el-icon v-if="layout == 'transverse'">
|
|
38
|
+
<CircleCheckFilled />
|
|
39
|
+
</el-icon>
|
|
40
|
+
</div>
|
|
41
|
+
</el-tooltip>
|
|
42
|
+
<el-tooltip effect="dark" content="分栏" placement="top" :show-after="200">
|
|
43
|
+
<div :class="['layout-item layout-columns', { 'is-active': layout == 'columns' }]" @click="setLayout('columns')">
|
|
44
|
+
<div class="layout-dark"></div>
|
|
45
|
+
<div class="layout-light"></div>
|
|
46
|
+
<div class="layout-content"></div>
|
|
47
|
+
<el-icon v-if="layout == 'columns'">
|
|
48
|
+
<CircleCheckFilled />
|
|
49
|
+
</el-icon>
|
|
50
|
+
</div>
|
|
51
|
+
</el-tooltip>
|
|
52
|
+
</div>
|
|
53
|
+
<div class="theme-item">
|
|
54
|
+
<span>
|
|
55
|
+
侧边栏反转色
|
|
56
|
+
<el-tooltip effect="dark" content="侧边栏颜色变为深色模式" placement="top">
|
|
57
|
+
<el-icon><QuestionFilled /></el-icon>
|
|
58
|
+
</el-tooltip>
|
|
59
|
+
</span>
|
|
60
|
+
<el-switch v-model="asideInverted" @change="setAsideTheme" />
|
|
61
|
+
</div>
|
|
62
|
+
<div class="theme-item mb50">
|
|
63
|
+
<span>
|
|
64
|
+
头部反转色
|
|
65
|
+
<el-tooltip effect="dark" content="头部颜色变为深色模式" placement="top">
|
|
66
|
+
<el-icon><QuestionFilled /></el-icon>
|
|
67
|
+
</el-tooltip>
|
|
68
|
+
</span>
|
|
69
|
+
<el-switch v-model="headerInverted" @change="setHeaderTheme" />
|
|
70
|
+
</div>
|
|
71
|
+
|
|
72
|
+
<!-- 全局主题 -->
|
|
73
|
+
<el-divider class="divider" content-position="center">
|
|
74
|
+
<el-icon><ColdDrink /></el-icon>
|
|
75
|
+
全局主题
|
|
76
|
+
</el-divider>
|
|
77
|
+
<div class="theme-item">
|
|
78
|
+
<span>主题颜色</span>
|
|
79
|
+
<el-color-picker v-model="primary" :predefine="colorList" @change="changePrimary" />
|
|
80
|
+
</div>
|
|
81
|
+
<div class="theme-item">
|
|
82
|
+
<span>暗黑模式</span>
|
|
83
|
+
<SwitchDark />
|
|
84
|
+
</div>
|
|
85
|
+
<div class="theme-item">
|
|
86
|
+
<span>灰色模式</span>
|
|
87
|
+
<el-switch v-model="isGrey" @change="changeGreyOrWeak('grey', !!$event)" />
|
|
88
|
+
</div>
|
|
89
|
+
<div class="theme-item mb40">
|
|
90
|
+
<span>色弱模式</span>
|
|
91
|
+
<el-switch v-model="isWeak" @change="changeGreyOrWeak('weak', !!$event)" />
|
|
92
|
+
</div>
|
|
93
|
+
|
|
94
|
+
<!-- 界面设置 -->
|
|
95
|
+
<el-divider class="divider" content-position="center">
|
|
96
|
+
<el-icon><Setting /></el-icon>
|
|
97
|
+
界面设置
|
|
98
|
+
</el-divider>
|
|
99
|
+
<div class="theme-item">
|
|
100
|
+
<span>菜单折叠</span>
|
|
101
|
+
<el-switch v-model="isCollapse" />
|
|
102
|
+
</div>
|
|
103
|
+
<div class="theme-item">
|
|
104
|
+
<span>菜单手风琴</span>
|
|
105
|
+
<el-switch v-model="accordion" />
|
|
106
|
+
</div>
|
|
107
|
+
<div class="theme-item">
|
|
108
|
+
<span>水印</span>
|
|
109
|
+
<el-switch v-model="watermark" />
|
|
110
|
+
</div>
|
|
111
|
+
<div class="theme-item">
|
|
112
|
+
<span>面包屑</span>
|
|
113
|
+
<el-switch v-model="breadcrumb" />
|
|
114
|
+
</div>
|
|
115
|
+
<div class="theme-item">
|
|
116
|
+
<span>面包屑图标</span>
|
|
117
|
+
<el-switch v-model="breadcrumbIcon" />
|
|
118
|
+
</div>
|
|
119
|
+
<div class="theme-item">
|
|
120
|
+
<span>标签栏</span>
|
|
121
|
+
<el-switch v-model="tabs" />
|
|
122
|
+
</div>
|
|
123
|
+
<div class="theme-item">
|
|
124
|
+
<span>标签栏图标</span>
|
|
125
|
+
<el-switch v-model="tabsIcon" />
|
|
126
|
+
</div>
|
|
127
|
+
<div class="theme-item">
|
|
128
|
+
<span>页脚</span>
|
|
129
|
+
<el-switch v-model="footer" />
|
|
130
|
+
</div>
|
|
131
|
+
</el-drawer>
|
|
132
|
+
</template>
|
|
133
|
+
|
|
134
|
+
<script setup lang="ts">
|
|
135
|
+
import { ref } from "vue";
|
|
136
|
+
import { storeToRefs } from "pinia";
|
|
137
|
+
import { useTheme } from "../../../hooks/useTheme";
|
|
138
|
+
import { useGlobalStore } from "../../../stores/modules/global";
|
|
139
|
+
import { LayoutType } from "../../../stores/interface";
|
|
140
|
+
import { DEFAULT_PRIMARY } from "../../../config";
|
|
141
|
+
import mittBus from "../../../utils/mittBus";
|
|
142
|
+
import SwitchDark from "../../../components/SwitchDark/index.vue";
|
|
143
|
+
|
|
144
|
+
const { changePrimary, changeGreyOrWeak, setAsideTheme, setHeaderTheme } = useTheme();
|
|
145
|
+
|
|
146
|
+
const globalStore = useGlobalStore();
|
|
147
|
+
const {
|
|
148
|
+
layout,
|
|
149
|
+
primary,
|
|
150
|
+
isGrey,
|
|
151
|
+
isWeak,
|
|
152
|
+
asideInverted,
|
|
153
|
+
headerInverted,
|
|
154
|
+
isCollapse,
|
|
155
|
+
accordion,
|
|
156
|
+
watermark,
|
|
157
|
+
breadcrumb,
|
|
158
|
+
breadcrumbIcon,
|
|
159
|
+
tabs,
|
|
160
|
+
tabsIcon,
|
|
161
|
+
footer
|
|
162
|
+
} = storeToRefs(globalStore);
|
|
163
|
+
|
|
164
|
+
// 预定义主题颜色
|
|
165
|
+
const colorList = [
|
|
166
|
+
DEFAULT_PRIMARY,
|
|
167
|
+
"#daa96e",
|
|
168
|
+
"#0c819f",
|
|
169
|
+
"#409eff",
|
|
170
|
+
"#27ae60",
|
|
171
|
+
"#ff5c93",
|
|
172
|
+
"#e74c3c",
|
|
173
|
+
"#fd726d",
|
|
174
|
+
"#f39c12",
|
|
175
|
+
"#9b59b6"
|
|
176
|
+
];
|
|
177
|
+
|
|
178
|
+
// 设置布局方式
|
|
179
|
+
const setLayout = (val: LayoutType) => {
|
|
180
|
+
globalStore.setGlobalState("layout", val);
|
|
181
|
+
setAsideTheme();
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
// 打开主题设置
|
|
185
|
+
const drawerVisible = ref(false);
|
|
186
|
+
mittBus.on("openThemeDrawer", () => (drawerVisible.value = true));
|
|
187
|
+
</script>
|
|
188
|
+
|
|
189
|
+
<style scoped lang="scss">
|
|
190
|
+
@use "./index.scss" as *;
|
|
191
|
+
</style>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<!-- 💥 这里是一次性加载 LayoutComponents -->
|
|
2
|
+
<template>
|
|
3
|
+
<el-watermark id="watermark" :font="font" :content="watermarkContent">
|
|
4
|
+
<component :is="LayoutComponents[layout]" />
|
|
5
|
+
<ThemeDrawer />
|
|
6
|
+
</el-watermark>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script setup lang="ts" name="Layout">
|
|
10
|
+
import { computed, reactive, watch, type Component } from "vue";
|
|
11
|
+
import { LayoutType } from "../stores/interface";
|
|
12
|
+
import { useGlobalStore } from "../stores/modules/global";
|
|
13
|
+
import { useConfigStore } from "../stores/modules/config";
|
|
14
|
+
import ThemeDrawer from "./components/ThemeDrawer/index.vue";
|
|
15
|
+
import LayoutVertical from "./LayoutVertical/index.vue";
|
|
16
|
+
import LayoutClassic from "./LayoutClassic/index.vue";
|
|
17
|
+
import LayoutTransverse from "./LayoutTransverse/index.vue";
|
|
18
|
+
import LayoutColumns from "./LayoutColumns/index.vue";
|
|
19
|
+
|
|
20
|
+
const LayoutComponents: Record<LayoutType, Component> = {
|
|
21
|
+
vertical: LayoutVertical,
|
|
22
|
+
classic: LayoutClassic,
|
|
23
|
+
transverse: LayoutTransverse,
|
|
24
|
+
columns: LayoutColumns
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const globalStore = useGlobalStore();
|
|
28
|
+
const configStore = useConfigStore();
|
|
29
|
+
|
|
30
|
+
const isDark = computed(() => globalStore.isDark);
|
|
31
|
+
const layout = computed(() => globalStore.layout);
|
|
32
|
+
const watermark = computed(() => globalStore.watermark);
|
|
33
|
+
const watermarkContent = computed(() => {
|
|
34
|
+
if (!watermark.value) return "";
|
|
35
|
+
|
|
36
|
+
const watermarkTextList = [configStore.display.sysName, configStore.display.watermark].filter(Boolean);
|
|
37
|
+
return watermarkTextList.length ? watermarkTextList : "";
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
const font = reactive({ color: "rgba(0, 0, 0, .15)" });
|
|
41
|
+
watch(isDark, () => (font.color = isDark.value ? "rgba(255, 255, 255, .15)" : "rgba(0, 0, 0, .15)"), {
|
|
42
|
+
immediate: true
|
|
43
|
+
});
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<style scoped lang="scss">
|
|
47
|
+
.layout {
|
|
48
|
+
min-width: 600px;
|
|
49
|
+
}
|
|
50
|
+
</style>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<!-- 💥 这里是异步加载 LayoutComponents -->
|
|
2
|
+
<template>
|
|
3
|
+
<el-watermark id="watermark" :font="font" :content="watermarkContent">
|
|
4
|
+
<suspense>
|
|
5
|
+
<template #default>
|
|
6
|
+
<component :is="LayoutComponents[layout]" />
|
|
7
|
+
</template>
|
|
8
|
+
<template #fallback>
|
|
9
|
+
<Loading />
|
|
10
|
+
</template>
|
|
11
|
+
</suspense>
|
|
12
|
+
<ThemeDrawer />
|
|
13
|
+
</el-watermark>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script setup lang="ts" name="layoutAsync">
|
|
17
|
+
import { computed, defineAsyncComponent, reactive, watch, type Component } from "vue";
|
|
18
|
+
import { LayoutType } from "../stores/interface";
|
|
19
|
+
import { useGlobalStore } from "../stores/modules/global";
|
|
20
|
+
import { useConfigStore } from "../stores/modules/config";
|
|
21
|
+
import Loading from "../components/Loading/index.vue";
|
|
22
|
+
import ThemeDrawer from "./components/ThemeDrawer/index.vue";
|
|
23
|
+
|
|
24
|
+
const LayoutComponents: Record<LayoutType, Component> = {
|
|
25
|
+
vertical: defineAsyncComponent(() => import("./LayoutVertical/index.vue")),
|
|
26
|
+
classic: defineAsyncComponent(() => import("./LayoutClassic/index.vue")),
|
|
27
|
+
transverse: defineAsyncComponent(() => import("./LayoutTransverse/index.vue")),
|
|
28
|
+
columns: defineAsyncComponent(() => import("./LayoutColumns/index.vue"))
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const globalStore = useGlobalStore();
|
|
32
|
+
const configStore = useConfigStore();
|
|
33
|
+
|
|
34
|
+
const isDark = computed(() => globalStore.isDark);
|
|
35
|
+
const layout = computed(() => globalStore.layout);
|
|
36
|
+
const watermark = computed(() => globalStore.watermark);
|
|
37
|
+
const watermarkContent = computed(() => {
|
|
38
|
+
if (!watermark.value) return "";
|
|
39
|
+
|
|
40
|
+
const watermarkTextList = [configStore.display.sysName, configStore.display.watermark].filter(Boolean);
|
|
41
|
+
return watermarkTextList.length ? watermarkTextList : "";
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
const font = reactive({ color: "rgba(0, 0, 0, .15)" });
|
|
45
|
+
watch(isDark, () => (font.color = isDark.value ? "rgba(255, 255, 255, .15)" : "rgba(0, 0, 0, .15)"), {
|
|
46
|
+
immediate: true
|
|
47
|
+
});
|
|
48
|
+
</script>
|
|
49
|
+
|
|
50
|
+
<style scoped lang="scss">
|
|
51
|
+
.layout {
|
|
52
|
+
min-width: 600px;
|
|
53
|
+
}
|
|
54
|
+
</style>
|