海底i
2021-06-18 15:28
以下是router里面的index.js文件代码:
import { createRouter, createWebHistory } from 'vue-router'
import Home from '../views/Home.vue'
import First from '../views/First.vue'
const routes = [
{
path: '/',
component: First
},
{
path: '/about',
name: 'About',
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
}
]
你用的cli版本是4吧,建议和老师保持一致
vue-cli全集
44773 学习 · 230 问题
相似问题