标签:param 获取 console 入参 htm 变量定义 temp html www.
(1) 设置好路由配置
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>
data: function() { return { deviceId:123, dataId:456 } }
<a v-link="{ name: ‘history‘, params: { deviceId: deviceId, dataId: dataId }}">history</a>
ready: function(){ console.log(‘deviceid: ‘ + this.$route.params.deviceId); console.log(‘dataId: ‘ + this.$route.params.dataId); }
原文链接:http://www.bubuko.com/infodetail-2227472.html
标签:param 获取 console 入参 htm 变量定义 temp html www.
原文地址:http://www.cnblogs.com/karila/p/7520245.html