simplify route structure by moving AppLayout to root path
This commit is contained in:
parent
f494f32a20
commit
b43502ec69
@ -125,7 +125,7 @@ const breadcrumbItems = computed(() => {
|
||||
if (route.meta?.toolName) {
|
||||
// 工具路由:显示 Tools / 工具名称
|
||||
// 自动解析 Tools 路由的路径(用于面包屑链接)
|
||||
let toolsPath = '/app/tools' // 默认值
|
||||
let toolsPath = '/tools'
|
||||
try {
|
||||
const resolved = router.resolve({ name: 'Tools' })
|
||||
if (resolved.matched.length > 0) {
|
||||
|
||||
@ -17,19 +17,19 @@ const router = createRouter({
|
||||
meta: { requiresAuth: false }
|
||||
},
|
||||
{
|
||||
path: '/',
|
||||
path: '',
|
||||
name: 'HomePage',
|
||||
component: () => import('../../views/HomePage.vue'),
|
||||
meta: { requiresAuth: false }
|
||||
},
|
||||
{
|
||||
path: '/app',
|
||||
path: '/',
|
||||
name: 'AppLayout',
|
||||
component: () => import('../layouts/AppLayout.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
path: 'dashboard',
|
||||
name: 'Dashboard',
|
||||
component: () => import('../../views/Dashboard.vue')
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user