⚡ 1、布局大小存储改为本地存储2、多语言默认语言改为配置文件
This commit is contained in:
+34
-30
@@ -28,10 +28,11 @@ export const constantRoutes = [
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: '/redirect/:path(.*)',
|
||||
component: () => import('@/views/redirect/index.vue')
|
||||
}]
|
||||
{
|
||||
path: '/redirect/:path(.*)',
|
||||
component: () => import('@/views/redirect/index.vue')
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/login',
|
||||
@@ -49,7 +50,7 @@ export const constantRoutes = [
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: "/:pathMatch(.*)*",
|
||||
path: '/:pathMatch(.*)*',
|
||||
component: () => import('@/views/error/404'),
|
||||
hidden: true
|
||||
},
|
||||
@@ -63,12 +64,13 @@ export const constantRoutes = [
|
||||
component: Layout,
|
||||
redirect: '/index',
|
||||
children: [
|
||||
{
|
||||
path: '/index',
|
||||
component: () => import('@/views/index'),
|
||||
name: 'Index',
|
||||
meta: { title: '首页', icon: 'dashboard', affix: true, titleKey: 'menu.home' }
|
||||
}]
|
||||
{
|
||||
path: '/index',
|
||||
component: () => import('@/views/index'),
|
||||
name: 'Index',
|
||||
meta: { title: '首页', icon: 'dashboard', affix: true, titleKey: 'menu.home' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/user',
|
||||
@@ -76,12 +78,13 @@ export const constantRoutes = [
|
||||
hidden: true,
|
||||
redirect: 'noredirect',
|
||||
children: [
|
||||
{
|
||||
path: 'profile',
|
||||
component: () => import('@/views/system/user/profile/index'),
|
||||
name: 'Profile',
|
||||
meta: { title: '个人中心', icon: 'user', titleKey: 'menu.personalCenter' }
|
||||
}]
|
||||
{
|
||||
path: 'profile',
|
||||
component: () => import('@/views/system/user/profile/index'),
|
||||
name: 'Profile',
|
||||
meta: { title: '个人中心', icon: 'user', titleKey: 'menu.personalCenter' }
|
||||
}
|
||||
]
|
||||
},
|
||||
// 不用可删掉
|
||||
{
|
||||
@@ -90,18 +93,19 @@ export const constantRoutes = [
|
||||
hidden: false,
|
||||
meta: { title: '组件示例', icon: 'icon', noCache: 'fasle' },
|
||||
children: [
|
||||
{
|
||||
path: 'icon',
|
||||
component: () => import('@/views/components/icons/index'),
|
||||
name: 'icon',
|
||||
meta: { title: '图标icon', icon: 'icon1', noCache: 'fasle', titleKey: 'menu.icon' }
|
||||
}]
|
||||
},
|
||||
];
|
||||
{
|
||||
path: 'icon',
|
||||
// component: () => import('@/views/components/icons/index'),
|
||||
component: () => import('@/views/business/GenDemo'),
|
||||
name: 'icon',
|
||||
meta: { title: '图标icon', icon: 'icon1', noCache: 'fasle', titleKey: 'menu.icon' }
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(
|
||||
import.meta.env.VITE_APP_ROUTER_PREFIX),
|
||||
history: createWebHistory(import.meta.env.VITE_APP_ROUTER_PREFIX),
|
||||
routes: constantRoutes,
|
||||
scrollBehavior(to, from, savedPosition) {
|
||||
if (savedPosition) {
|
||||
@@ -109,7 +113,7 @@ const router = createRouter({
|
||||
} else {
|
||||
return { top: 0 }
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
export default router;
|
||||
export default router
|
||||
|
||||
Reference in New Issue
Block a user