//跳转到上一次浏览的页面 this.$router.go(-1) //跳转指定的地址 this.$router.replace('/login') //跳转指定路由的名字 this.$router.replace({name:'loginLink'}) //push方式跳转指定的地址 this.$router.push('/login') //push方式跳转指定路由的名字 this.$router.push({name:'loginLink'})
vue路由跳转的几种方式
最新推荐文章于 2025-05-08 10:50:17 发布