共计 440 个字符,预计需要花费 2 分钟才能阅读完成。
一、
const routes = [
// 上面两个花括号里因为创立我的项目自带没删,就正文掉
// {
// path: ‘/’,
// name: ‘Home’,
// component: Home
// },
// {
// 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’)
// },
// 上面两个花括号里用于通过名字点击跳转
{
path: '/search',
name: 'search',
component: search
},
{
path: '/home',
name: 'home',
component: home
},
正文完