Vue路由
路由传值的方法和区别区别this.$router:VueRouter 的实例,要导航到不同的URL,就要使用$router.push()this.$route:当前router 跳转的对象,可以获取到name、path、query、params等。{ path: '/home', name: 'home', component: Home},传参使用$router.push 拼接参数传参。// userName=one 就是传递的参数this.$router.push('/
转载
2021-07-05 10:36:56 ·
40 阅读 ·
0 评论