代码如下let routes = [
{
path: '/goods', component: goods
},
{
path: '/ratings', component: ratings
},
{
path: '/sellers', component: sellers
}
]
const router = new VueRouter({
routes,
linkActiveClass: 'active'})new Vue({
router,
render: h => h(App)
}).$mount('#app')
router.go('/goods')
添加回答
举报
0/150
提交
取消