Commit 2b0c8ec31f9e90ecdbe673948c3b3a3019a8f5fb
1 parent
1d5b9d8f
fix: router error
Showing
2 changed files
with
8 additions
and
8 deletions
yudao-ui-admin-vue3/src/components/UserInfo/src/UserInfo.vue
| ... | ... | @@ -7,6 +7,7 @@ import { resetRouter } from '@/router' |
| 7 | 7 | import { useRouter } from 'vue-router' |
| 8 | 8 | import { useDesign } from '@/hooks/web/useDesign' |
| 9 | 9 | import { useTagsViewStore } from '@/store/modules/tagsView' |
| 10 | +import avatarImg from '@/assets/imgs/avatar.gif' | |
| 10 | 11 | |
| 11 | 12 | const tagsViewStore = useTagsViewStore() |
| 12 | 13 | |
| ... | ... | @@ -22,9 +23,9 @@ const { push, replace } = useRouter() |
| 22 | 23 | |
| 23 | 24 | const user = wsCache.get('user') |
| 24 | 25 | |
| 25 | -const avatar = user?.user?.avatar ? user.user.avatar : '@/assets/imgs/avatar.gif' | |
| 26 | +const avatar = user.user.avatar ? user.user.avatar : avatarImg | |
| 26 | 27 | |
| 27 | -const userName = user?.user?.nickname ? user.user.nickname : 'Admin' | |
| 28 | +const userName = user.user.nickname ? user.user.nickname : 'Admin' | |
| 28 | 29 | |
| 29 | 30 | const loginOut = () => { |
| 30 | 31 | ElMessageBox.confirm(t('common.loginOutMessage'), t('common.reminder'), { | ... | ... |
yudao-ui-admin-vue3/src/router/modules/remaining.ts
| ... | ... | @@ -43,7 +43,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ |
| 43 | 43 | { |
| 44 | 44 | path: '/user', |
| 45 | 45 | component: Layout, |
| 46 | - name: 'User', | |
| 46 | + name: 'UserInfo', | |
| 47 | 47 | meta: { |
| 48 | 48 | hidden: true |
| 49 | 49 | }, |
| ... | ... | @@ -53,9 +53,10 @@ const remainingRouter: AppRouteRecordRaw[] = [ |
| 53 | 53 | component: () => import('@/views/Profile/Index.vue'), |
| 54 | 54 | name: 'Profile', |
| 55 | 55 | meta: { |
| 56 | + canTo: true, | |
| 56 | 57 | hidden: true, |
| 58 | + noTagsView: true, | |
| 57 | 59 | icon: 'ep:user', |
| 58 | - canTo: true, | |
| 59 | 60 | title: t('common.profile') |
| 60 | 61 | } |
| 61 | 62 | } |
| ... | ... | @@ -64,7 +65,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ |
| 64 | 65 | { |
| 65 | 66 | path: '/codegen', |
| 66 | 67 | component: Layout, |
| 67 | - name: 'Codegen', | |
| 68 | + name: 'CodegenEdit', | |
| 68 | 69 | meta: { |
| 69 | 70 | hidden: true |
| 70 | 71 | }, |
| ... | ... | @@ -74,7 +75,6 @@ const remainingRouter: AppRouteRecordRaw[] = [ |
| 74 | 75 | component: () => import('@/views/infra/codegen/EditTable.vue'), |
| 75 | 76 | name: 'EditTable', |
| 76 | 77 | meta: { |
| 77 | - noTagsView: true, | |
| 78 | 78 | noCache: true, |
| 79 | 79 | hidden: true, |
| 80 | 80 | canTo: true, |
| ... | ... | @@ -88,7 +88,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ |
| 88 | 88 | { |
| 89 | 89 | path: '/job', |
| 90 | 90 | component: Layout, |
| 91 | - name: 'Job', | |
| 91 | + name: 'JobL', | |
| 92 | 92 | meta: { |
| 93 | 93 | hidden: true |
| 94 | 94 | }, |
| ... | ... | @@ -98,7 +98,6 @@ const remainingRouter: AppRouteRecordRaw[] = [ |
| 98 | 98 | component: () => import('@/views/infra/job/JobLog.vue'), |
| 99 | 99 | name: 'JobLog', |
| 100 | 100 | meta: { |
| 101 | - noTagsView: true, | |
| 102 | 101 | noCache: true, |
| 103 | 102 | hidden: true, |
| 104 | 103 | canTo: true, | ... | ... |