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) {
// Tools /
// Tools
let toolsPath = '/app/tools' //
let toolsPath = '/tools'
try {
const resolved = router.resolve({ name: 'Tools' })
if (resolved.matched.length > 0) {

View File

@ -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')
},