index.js
409 字节
import { createRouter, createWebHistory } from 'vue-router'
import Layout from '@/views/Layout.vue'
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{
path: '/',
name: 'home',
component: Layout
},
{
path: '/login',
name: 'login',
component: () => import('@/views/Login.vue')
}
]
})
export default router