import { createRouter, createWebHistory } from 'vue-router' import Layout from '@/layout/index.vue' const router = createRouter({ history: createWebHistory(), routes: [ { path: '/', component: Layout, children: [ { path: '', name: 'Home', // 这里可以替换为实际的主页组件 component: () => import('@/views/Home.vue') } ] } ] }) export default router