路由守卫 :https://juejin.cn/post/6944244998397231134
页面传参
一、标签跳转及传参
:to后面可以跟字符串也可以跟对象。
页面接参方式如下
使用path + 路径,query + 参数。则用this.$route.query.id取值。
使用name +路由名称,params + 参数。则用this.$route.params.id取值。
二、$router.push
路由守卫 :https://juejin.cn/post/6944244998397231134
一、标签跳转及传参
:to后面可以跟字符串也可以跟对象。
页面接参方式如下
使用path + 路径,query + 参数。则用this.$route.query.id取值。
使用name +路由名称,params + 参数。则用this.$route.params.id取值。
二、$router.push