标签:
使用vue-router 来实现webapp的页面跳转,有时候需要传递参数,做法如下:router.map({
‘/history/:deviceId/:dataId‘: {
name: ‘history‘, // give the route a name component: { ... }
}
}) <a v-link="{ name: ‘history‘, params: { deviceId: 123, dataId:456 }}">history</a> <a v-link="{ name: ‘history‘, params: { deviceId: deviceId, dataId: dataId }}">history</a>标签:
原文地址:http://www.cnblogs.com/strinkbug/p/5779531.html