标签:style 路由 span out nbsp div vue pat router
创建 Router 实例的时候,在 routes
配置中给某个路由设置名称
const router = new VueRouter({ routes: [ { path: ‘/user/:userId‘, name: ‘user‘, component: User } ] })
<router-link :to="{ name: ‘user‘, params: { userId: 123 }}">User</router-link>
router.push({ name: ‘user‘, params: { userId: 123 }})
标签:style 路由 span out nbsp div vue pat router
原文地址:http://www.cnblogs.com/avidya/p/7644689.html