vue
薛中然
向着光亮的地方
展开
-
vue-router 之打开新的页面
1.不传参数 let myurl="/contractc-info/detail/" + contType + "/" + scope.row.pk_contract; //是你的自定义的路由字符串拼接 let routeData = this.$router.resolve({ path: myurl }); window.open(routeData.href, '_blank')...原创 2018-08-09 19:01:52 · 5630 阅读 · 2 评论 -
Vue-路由使用
一.路由获取 let id = this.$route :获取当前的路由 let activityId=this.$route.query.activityId; :获取路由中的参数 activityId 二.路由监听 1.watch() // 监听,当路由发生变化的时候执行 watch:{ $route(to,from){ console.log(to.path...原创 2018-08-08 13:46:11 · 151 阅读 · 0 评论