src/router/index.js
@@ -1,13 +1,18 @@ import { createMemoryHistory, createRouter } from 'vue-router' import { createMemoryHistory, createRouter } from 'vue-router'; const routes = [ { path: '/', component: () => import('@/views/home/index.vue') }, ] { path: '/', redirect: '/index' }, { path: '/index', component: () => import('@/views/home/index.vue') }, { path: '/menu', component: () => import('@/views/menu/index.vue') }, ]; const router = createRouter({ history: createMemoryHistory(), routes, }) }); export default router;