From b335e7511b90988e5dbe3d42402ad6d52b646e43 Mon Sep 17 00:00:00 2001 From: vben Date: Sat, 13 Feb 2021 11:15:06 +0800 Subject: [PATCH] chore: fix the error-log list as the system route --- .../Application/src/AppLocalePicker.vue | 2 +- .../Application/src/search/AppSearch.vue | 2 +- src/enums/pageEnum.ts | 2 +- .../default/header/components/index.ts | 2 - .../header/components/lock/LockAction.less | 30 --- .../header/components/lock/LockAction.tsx | 72 ------- .../default/header/components/lock/index.vue | 38 ---- .../header/components/user-dropdown/index.vue | 39 ++-- src/layouts/default/header/index.vue | 14 +- src/layouts/default/menu/index.less | 22 -- src/layouts/default/menu/index.tsx | 172 --------------- src/layouts/default/menu/index.vue | 196 ++++++++++++++++++ src/layouts/default/setting/index.vue | 6 +- src/layouts/default/sider/LayoutSider.vue | 2 +- src/layouts/default/sider/index.vue | 3 +- .../default/tabs/components/TabContent.vue | 5 +- src/locales/lang/en/routes/basic.ts | 1 + src/locales/lang/zh_CN/routes/basic.ts | 1 + src/router/constant.ts | 22 ++ src/store/modules/permission.ts | 4 +- src/views/demo/page/list/card/index.vue | 2 +- 21 files changed, 264 insertions(+), 373 deletions(-) delete mode 100644 src/layouts/default/header/components/lock/LockAction.less delete mode 100644 src/layouts/default/header/components/lock/LockAction.tsx delete mode 100644 src/layouts/default/header/components/lock/index.vue delete mode 100644 src/layouts/default/menu/index.less delete mode 100644 src/layouts/default/menu/index.tsx create mode 100644 src/layouts/default/menu/index.vue diff --git a/src/components/Application/src/AppLocalePicker.vue b/src/components/Application/src/AppLocalePicker.vue index fa111c0f..644d2941 100644 --- a/src/components/Application/src/AppLocalePicker.vue +++ b/src/components/Application/src/AppLocalePicker.vue @@ -11,7 +11,7 @@ :overlayClassName="`${prefixCls}-overlay`" > - + {{ getLangText }} diff --git a/src/components/Application/src/search/AppSearch.vue b/src/components/Application/src/search/AppSearch.vue index ffe030f1..952bbda6 100644 --- a/src/components/Application/src/search/AppSearch.vue +++ b/src/components/Application/src/search/AppSearch.vue @@ -10,7 +10,7 @@ export default defineComponent({ name: 'AppSearch', - components: { AppSearchModal, Tooltip, SearchOutlined }, + components: { AppSearchModal, Tooltip }, setup() { const showModal = ref(false); const { prefixCls } = useDesign('app-search'); diff --git a/src/enums/pageEnum.ts b/src/enums/pageEnum.ts index 912c46f6..8169e666 100644 --- a/src/enums/pageEnum.ts +++ b/src/enums/pageEnum.ts @@ -6,5 +6,5 @@ export enum PageEnum { // error page path ERROR_PAGE = '/exception', // error log page path - ERROR_LOG_PAGE = '/feat/error-log', + ERROR_LOG_PAGE = '/error-log/list', } diff --git a/src/layouts/default/header/components/index.ts b/src/layouts/default/header/components/index.ts index fb628706..1a22f6a2 100644 --- a/src/layouts/default/header/components/index.ts +++ b/src/layouts/default/header/components/index.ts @@ -10,6 +10,4 @@ export const FullScreen = createAsyncComponent(() => import('./FullScreen.vue')) export const Notify = createAsyncComponent(() => import('./notify/index.vue')); -export const LockItem = createAsyncComponent(() => import('./lock/index.vue')); - export const ErrorAction = createAsyncComponent(() => import('./ErrorAction.vue')); diff --git a/src/layouts/default/header/components/lock/LockAction.less b/src/layouts/default/header/components/lock/LockAction.less deleted file mode 100644 index ffd25bbb..00000000 --- a/src/layouts/default/header/components/lock/LockAction.less +++ /dev/null @@ -1,30 +0,0 @@ -.lock-modal { - &__entry { - position: relative; - height: 240px; - padding: 130px 30px 60px 30px; - background: #fff; - border-radius: 10px; - } - - &__header { - position: absolute; - top: 0; - left: calc(50% - 45px); - width: auto; - text-align: center; - - &-img { - width: 70px; - border-radius: 50%; - } - - &-name { - margin-top: 5px; - } - } - - &__footer { - text-align: center; - } -} diff --git a/src/layouts/default/header/components/lock/LockAction.tsx b/src/layouts/default/header/components/lock/LockAction.tsx deleted file mode 100644 index 51483b5a..00000000 --- a/src/layouts/default/header/components/lock/LockAction.tsx +++ /dev/null @@ -1,72 +0,0 @@ -import './LockAction.less'; - -import { defineComponent } from 'vue'; -import { BasicModal, useModalInner } from '/@/components/Modal/index'; -import { Button } from '/@/components/Button'; -import { BasicForm, useForm } from '/@/components/Form/index'; - -import headerImg from '/@/assets/images/header.jpg'; - -import { userStore } from '/@/store/modules/user'; -import { useI18n } from '/@/hooks/web/useI18n'; -import { lockStore } from '/@/store/modules/lock'; - -const prefixCls = 'lock-modal'; -export default defineComponent({ - name: 'LockModal', - setup(_, { attrs }) { - const { t } = useI18n(); - const [register, { closeModal }] = useModalInner(); - - const [registerForm, { validateFields, resetFields }] = useForm({ - showActionButtonGroup: false, - schemas: [ - { - field: 'password', - label: t('layout.header.lockScreenPassword'), - component: 'InputPassword', - required: true, - }, - ], - }); - - async function lock() { - const values = (await validateFields()) as any; - const password: string | undefined = values.password; - closeModal(); - - lockStore.commitLockInfoState({ - isLock: true, - pwd: password, - }); - await resetFields(); - } - - return () => ( - - {() => ( -
-
- -

{userStore.getUserInfoState.realName}

-
- - - -
- -
-
- )} -
- ); - }, -}); diff --git a/src/layouts/default/header/components/lock/index.vue b/src/layouts/default/header/components/lock/index.vue deleted file mode 100644 index 37b2ff4d..00000000 --- a/src/layouts/default/header/components/lock/index.vue +++ /dev/null @@ -1,38 +0,0 @@ - - diff --git a/src/layouts/default/header/components/user-dropdown/index.vue b/src/layouts/default/header/components/user-dropdown/index.vue index 4b4f89a8..12151e43 100644 --- a/src/layouts/default/header/components/user-dropdown/index.vue +++ b/src/layouts/default/header/components/user-dropdown/index.vue @@ -12,18 +12,24 @@ + + + diff --git a/src/layouts/default/setting/index.vue b/src/layouts/default/setting/index.vue index 4d81b8fa..8ad7a8c9 100644 --- a/src/layouts/default/setting/index.vue +++ b/src/layouts/default/setting/index.vue @@ -1,20 +1,20 @@