注意:在视图层使用把this去掉,使用“Mustache”语法 (双大括号) 的文本插值
如:{{$route.params.id}}
完整路径:
window.location.href
路由路径:
this.$route.path
路由路径参数
this.$route.params
/user/:id → /user/12
this.$route.params.id;//12
注意:在视图层使用把this去掉,使用“Mustache”语法 (双大括号) 的文本插值
如:{{$route.params.id}}
完整路径:
window.location.href
路由路径:
this.$route.path
路由路径参数
this.$route.params
/user/:id → /user/12
this.$route.params.id;//12