simplify route structure by moving AppLayout to root path

This commit is contained in:
jingrow 2025-12-22 02:03:26 +08:00
parent f494f32a20
commit b43502ec69
2 changed files with 4 additions and 4 deletions

View File

@ -125,7 +125,7 @@ const breadcrumbItems = computed(() => {
if (route.meta?.toolName) { if (route.meta?.toolName) {
// Tools / // Tools /
// Tools // Tools
let toolsPath = '/app/tools' // let toolsPath = '/tools'
try { try {
const resolved = router.resolve({ name: 'Tools' }) const resolved = router.resolve({ name: 'Tools' })
if (resolved.matched.length > 0) { if (resolved.matched.length > 0) {

View File

@ -17,19 +17,19 @@ const router = createRouter({
meta: { requiresAuth: false } meta: { requiresAuth: false }
}, },
{ {
path: '/', path: '',
name: 'HomePage', name: 'HomePage',
component: () => import('../../views/HomePage.vue'), component: () => import('../../views/HomePage.vue'),
meta: { requiresAuth: false } meta: { requiresAuth: false }
}, },
{ {
path: '/app', path: '/',
name: 'AppLayout', name: 'AppLayout',
component: () => import('../layouts/AppLayout.vue'), component: () => import('../layouts/AppLayout.vue'),
meta: { requiresAuth: true }, meta: { requiresAuth: true },
children: [ children: [
{ {
path: '', path: 'dashboard',
name: 'Dashboard', name: 'Dashboard',
component: () => import('../../views/Dashboard.vue') component: () => import('../../views/Dashboard.vue')
}, },