vue路由跳转 返回上一级 this.$router.go(-1) 和返回到指定页面this.$router.push('/home')
1,点击返回上一页 <button @click="goBack">goback</button>
methods:{
goBack: function(){
/** 返回上一级页面用 this.$router.go(-1); **/
this.$router.go(-1);
},
2,点击跳转到/Foo2页面
this.$router.push({
path:'/user/forget'
});
this.$router.push('/foo2') 最常用 或者this.$router.push({name:'Foo1'})对象的方法