@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,234 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<RenderTableColumn v-bind="column" />
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script setup lang="ts" name="TableColumn">
|
|
6
|
+
import { h, inject, isProxy, markRaw, ref, toRaw, useSlots } from "vue";
|
|
7
|
+
import { ElButton, ElImage, ElSwitch, ElTableColumn, ElTag, ElText } from "element-plus";
|
|
8
|
+
import DictLabel from "../../../components/Dict/DictLabel.vue";
|
|
9
|
+
import { ColumnProps, HeaderRenderScope, RenderScope, TableActionProps } from "../../../components/ProTable/interface";
|
|
10
|
+
import type { TableAlign } from "../../../utils/proTable";
|
|
11
|
+
import { filterEnum, formatValue, handleProp, handleRowAccordingToProp } from "../../../utils";
|
|
12
|
+
import { formatPrice } from "../../../utils/utils";
|
|
13
|
+
|
|
14
|
+
const props = defineProps<{
|
|
15
|
+
column: ColumnProps;
|
|
16
|
+
resolveAlign?: (column: ColumnProps) => TableAlign;
|
|
17
|
+
}>();
|
|
18
|
+
|
|
19
|
+
const slots = useSlots();
|
|
20
|
+
|
|
21
|
+
const enumMap = inject("enumMap", ref(new Map()));
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* 透传给 Element Plus 前移除图标组件上的响应式代理,避免 Vue 对组件对象发出性能告警。
|
|
25
|
+
*/
|
|
26
|
+
const normalizeActionIcon = (icon: unknown): any => {
|
|
27
|
+
if (!icon || (typeof icon !== "object" && typeof icon !== "function")) return icon;
|
|
28
|
+
const rawIcon = isProxy(icon) ? toRaw(icon) : icon;
|
|
29
|
+
return typeof rawIcon === "object" ? markRaw(rawIcon) : rawIcon;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
// 渲染表格数据
|
|
33
|
+
const renderCellData = (item: ColumnProps, scope: RenderScope<any>) => {
|
|
34
|
+
return enumMap.value.get(item.prop) && item.isFilterEnum
|
|
35
|
+
? filterEnum(handleRowAccordingToProp(scope.row, item.prop!), enumMap.value.get(item.prop)!, item.fieldNames)
|
|
36
|
+
: formatValue(handleRowAccordingToProp(scope.row, item.prop!));
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
// 获取 tag 类型
|
|
40
|
+
const getTagType = (item: ColumnProps, scope: RenderScope<any>) => {
|
|
41
|
+
return (
|
|
42
|
+
filterEnum(handleRowAccordingToProp(scope.row, item.prop!), enumMap.value.get(item.prop), item.fieldNames, "tag") || "primary"
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* 渲染字典列内容,统一复用 DictLabel 组件处理标签与文本展示。
|
|
48
|
+
*/
|
|
49
|
+
const renderDictCellData = (item: ColumnProps, scope: RenderScope<any>) => {
|
|
50
|
+
if (!item.dictCode || !item.prop) return null;
|
|
51
|
+
return h(DictLabel, { code: item.dictCode, modelValue: handleRowAccordingToProp(scope.row, item.prop) });
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* 解析列级自定义参数,统一兼容静态对象与函数返回值。
|
|
56
|
+
*/
|
|
57
|
+
const resolveColumnParams = (params: any, scope: RenderScope<any>) => {
|
|
58
|
+
if (!params) return undefined;
|
|
59
|
+
return typeof params === "function" ? params(scope) : params;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* 根据 prop 将开关值同步回行数据,兼容多级路径字段。
|
|
64
|
+
*/
|
|
65
|
+
const setRowValueByProp = (row: Record<string, any>, prop: string, value: any) => {
|
|
66
|
+
if (!prop.includes(".")) {
|
|
67
|
+
row[prop] = value;
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
const propList = prop.split(".");
|
|
71
|
+
const lastProp = propList.pop() as string;
|
|
72
|
+
let currentRow = row;
|
|
73
|
+
propList.forEach(item => {
|
|
74
|
+
if (typeof currentRow[item] !== "object" || currentRow[item] === null) {
|
|
75
|
+
currentRow[item] = {};
|
|
76
|
+
}
|
|
77
|
+
currentRow = currentRow[item];
|
|
78
|
+
});
|
|
79
|
+
currentRow[lastProp] = value;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* 统一解析按钮显隐与禁用状态,避免渲染分支里重复判断。
|
|
84
|
+
*/
|
|
85
|
+
const getBooleanValue = (value: boolean | ((scope: RenderScope<any>) => boolean) | undefined, scope: RenderScope<any>) => {
|
|
86
|
+
if (typeof value === "function") return value(scope);
|
|
87
|
+
return Boolean(value);
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* 渲染图片预览列,统一处理缩略图与大图预览。
|
|
92
|
+
*/
|
|
93
|
+
const renderImageCell = (item: ColumnProps, scope: RenderScope<any>) => {
|
|
94
|
+
const imageProps = item.imageProps ?? {};
|
|
95
|
+
const src =
|
|
96
|
+
typeof imageProps.src === "function"
|
|
97
|
+
? imageProps.src(scope)
|
|
98
|
+
: (imageProps.src ?? handleRowAccordingToProp(scope.row, item.prop!));
|
|
99
|
+
const previewSrc = typeof imageProps.previewSrc === "function" ? imageProps.previewSrc(scope) : (imageProps.previewSrc ?? src);
|
|
100
|
+
if (!src || src === "--") return "--";
|
|
101
|
+
const thumbWidth = typeof imageProps.width === "number" ? `${imageProps.width}px` : (imageProps.width ?? "60px");
|
|
102
|
+
const thumbHeight = typeof imageProps.height === "number" ? `${imageProps.height}px` : (imageProps.height ?? "60px");
|
|
103
|
+
return h(
|
|
104
|
+
ElImage,
|
|
105
|
+
{
|
|
106
|
+
src,
|
|
107
|
+
previewSrcList: [previewSrc],
|
|
108
|
+
previewTeleported: true,
|
|
109
|
+
zoomRate: 1.2,
|
|
110
|
+
maxScale: 7,
|
|
111
|
+
minScale: 0.2,
|
|
112
|
+
showProgress: true,
|
|
113
|
+
initialIndex: 0,
|
|
114
|
+
fit: "cover",
|
|
115
|
+
style: {
|
|
116
|
+
width: thumbWidth,
|
|
117
|
+
height: thumbHeight,
|
|
118
|
+
borderRadius: "4px"
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
error: () => h(ElText, { type: "info", size: "small" }, () => "无图")
|
|
123
|
+
}
|
|
124
|
+
);
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* 渲染状态开关列,并在切换后回调页面业务方法。
|
|
129
|
+
*/
|
|
130
|
+
const renderStatusCell = (item: ColumnProps, scope: RenderScope<any>) => {
|
|
131
|
+
if (!item.prop || !item.statusProps) return renderCellData(item, scope);
|
|
132
|
+
const statusProps = item.statusProps;
|
|
133
|
+
const params = resolveColumnParams(statusProps.params, scope);
|
|
134
|
+
return h(ElSwitch, {
|
|
135
|
+
modelValue: handleRowAccordingToProp(scope.row, item.prop),
|
|
136
|
+
inlinePrompt: true,
|
|
137
|
+
activeValue: statusProps.activeValue,
|
|
138
|
+
inactiveValue: statusProps.inactiveValue,
|
|
139
|
+
activeText: statusProps.activeText,
|
|
140
|
+
inactiveText: statusProps.inactiveText,
|
|
141
|
+
disabled: getBooleanValue(statusProps.disabled, scope),
|
|
142
|
+
beforeChange: () => statusProps.beforeChange?.(scope, params) ?? true,
|
|
143
|
+
"onUpdate:modelValue": value => {
|
|
144
|
+
setRowValueByProp(scope.row, item.prop!, value);
|
|
145
|
+
statusProps.onChange?.(value, scope, params);
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* 渲染金额列,统一将分单位金额转换为元字符串,并支持简单前后缀。
|
|
152
|
+
*/
|
|
153
|
+
const renderMoneyCell = (item: ColumnProps, scope: RenderScope<any>) => {
|
|
154
|
+
const moneyProps = item.moneyProps ?? {};
|
|
155
|
+
const rawValue =
|
|
156
|
+
typeof moneyProps.value === "function"
|
|
157
|
+
? moneyProps.value(scope)
|
|
158
|
+
: (moneyProps.value ?? handleRowAccordingToProp(scope.row, item.prop!));
|
|
159
|
+
if (rawValue === undefined || rawValue === null || rawValue === "") return "--";
|
|
160
|
+
const amount = typeof rawValue === "number" ? rawValue : Number(rawValue);
|
|
161
|
+
if (!Number.isFinite(amount)) return String(rawValue);
|
|
162
|
+
return `${moneyProps.prefix ?? ""}${formatPrice(amount)}${moneyProps.suffix ?? ""}`;
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* 渲染操作按钮列,统一处理显隐、禁用与透传参数。
|
|
167
|
+
*/
|
|
168
|
+
const renderActionsCell = (item: ColumnProps, scope: RenderScope<any>) => {
|
|
169
|
+
if (!item.actions?.length) return "--";
|
|
170
|
+
const visibleActions = item.actions.filter(action => !getBooleanValue(action.hidden, scope));
|
|
171
|
+
if (!visibleActions.length) return "--";
|
|
172
|
+
return visibleActions.map((action: TableActionProps) => {
|
|
173
|
+
const params = resolveColumnParams(action.params, scope);
|
|
174
|
+
return h(
|
|
175
|
+
ElButton,
|
|
176
|
+
{
|
|
177
|
+
key: action.label,
|
|
178
|
+
type: action.type ?? "primary",
|
|
179
|
+
link: action.link ?? true,
|
|
180
|
+
icon: normalizeActionIcon(action.icon),
|
|
181
|
+
disabled: getBooleanValue(action.disabled, scope),
|
|
182
|
+
onClick: () => action.onClick(scope, params)
|
|
183
|
+
},
|
|
184
|
+
{ default: () => action.label }
|
|
185
|
+
);
|
|
186
|
+
});
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* 渲染预置列类型,统一收敛图片、状态和操作按钮等通用场景。
|
|
191
|
+
*/
|
|
192
|
+
const renderPresetCell = (item: ColumnProps, scope: RenderScope<any>) => {
|
|
193
|
+
switch (item.cellType) {
|
|
194
|
+
case "image":
|
|
195
|
+
return renderImageCell(item, scope);
|
|
196
|
+
case "status":
|
|
197
|
+
return renderStatusCell(item, scope);
|
|
198
|
+
case "actions":
|
|
199
|
+
return renderActionsCell(item, scope);
|
|
200
|
+
case "money":
|
|
201
|
+
return renderMoneyCell(item, scope);
|
|
202
|
+
default:
|
|
203
|
+
return null;
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
const RenderTableColumn = (item: ColumnProps) => {
|
|
208
|
+
if (!item.isShow) return null;
|
|
209
|
+
return h(
|
|
210
|
+
ElTableColumn,
|
|
211
|
+
{
|
|
212
|
+
...item,
|
|
213
|
+
align: item.align ?? props.resolveAlign?.(item) ?? "left",
|
|
214
|
+
showOverflowTooltip: item.showOverflowTooltip ?? item.prop !== "operation"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
default: (scope: RenderScope<any>) => {
|
|
218
|
+
if (item._children) return item._children.map(child => RenderTableColumn(child));
|
|
219
|
+
if (item.render) return item.render(scope);
|
|
220
|
+
if (item.prop && slots[handleProp(item.prop)]) return slots[handleProp(item.prop)]!(scope);
|
|
221
|
+
if (item.cellType) return renderPresetCell(item, scope);
|
|
222
|
+
if (item.dictCode) return renderDictCellData(item, scope);
|
|
223
|
+
if (item.tag) return h(ElTag, { type: getTagType(item, scope) }, { default: () => renderCellData(item, scope) });
|
|
224
|
+
return renderCellData(item, scope);
|
|
225
|
+
},
|
|
226
|
+
header: (scope: HeaderRenderScope<any>) => {
|
|
227
|
+
if (item.headerRender) return item.headerRender(scope);
|
|
228
|
+
if (item.prop && slots[`${handleProp(item.prop)}Header`]) return slots[`${handleProp(item.prop)}Header`]!(scope);
|
|
229
|
+
return item.label;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
);
|
|
233
|
+
};
|
|
234
|
+
</script>
|