index.js
515 字节
import { createRouter, createWebHistory } from 'vue-router'
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{
path: '/',
name: 'home',
component: () => import('../views/layout/index.vue'),
},
{
path: '/test',
name: 'about',
component: () => import('../views/test.vue'),
},
{
path: '/test1',
name: 'test1',
component: () => import('../views/test1.vue'),
},
],
})
export default router