import { createRouter, createWebHistory } from 'vue-router' const routes = [ { path: '/', redirect: 'homePage' }, { path: '/homePage', name: 'homePage', component: () => import('../views/homePage.vue'), // children: [ // {name: 'AiEmotion', path: '/AiEmotion', component: () => import('@/views/AiEmotion.vue')} // ] }, { path: '/choujiang', name: 'choujiang', component: () => import('../views/choujiang/index.vue'), }, { path: '/zhongchou', name: 'zhongchou', component: () => import('../views/zhongchou/index.vue'), } ] // 创建路由实例 const router = createRouter({ history: createWebHistory(import.meta.env.VITE_PUBLIC_PATH), routes }) // 导出 export default router