标签:java outer router vuerouter component rgb asc port 生效
const routers= [ { path:‘/‘, name:‘F‘, component:FP }, { path:‘/secondpage‘, component:()=>import(‘../views/secondpage.vue‘) }, { path:‘/thirdpage‘, component:()=>import(‘../views/thirdpage.vue‘) } ] const router = new VueRouter({ routers })
const routers = [ { path:‘/‘, name:‘F‘, component:FP }, { path:‘/secondpage‘, component:()=>import(‘../views/secondpage.vue‘) }, { path:‘/thirdpage‘, component:()=>import(‘../views/thirdpage.vue‘) } ] const router = new VueRouter({ routes:routers })
这是vue-router里面的集合配置,其中new VueRouter({})中要给routes赋值,不是给routers赋值
ES6的简写用惯了就出事了
标签:java outer router vuerouter component rgb asc port 生效
原文地址:https://www.cnblogs.com/gzeal/p/14769311.html