vue路由跳转 返回上一级 this.$router.go(-1) 和返回到指定页面this.$router.push('/home')...
生活随笔
收集整理的這篇文章主要介紹了
vue路由跳转 返回上一级 this.$router.go(-1) 和返回到指定页面this.$router.push('/home')...
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1,點擊返回上一頁
<button @click="goback">goback</button> methods:{
goback(){}
this.$router.go(-1)
}
2,點擊跳轉到/Foo2頁面 <button @click="ToLink1">goback</button> ToLink1(){
this.$router.push('/foo2') 最常用
或者this.$router.push({name:'Foo1'})對象的方法 ?
<button @click="goback">goback</button> methods:{
goback(){}
this.$router.go(-1)
}
2,點擊跳轉到/Foo2頁面 <button @click="ToLink1">goback</button> ToLink1(){
this.$router.push('/foo2') 最常用
或者this.$router.push({name:'Foo1'})對象的方法 ?
轉載于:https://www.cnblogs.com/zyyweb/p/9578392.html
總結
以上是生活随笔為你收集整理的vue路由跳转 返回上一级 this.$router.go(-1) 和返回到指定页面this.$router.push('/home')...的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 计算机网络spoc作业4
- 下一篇: 一道不知名的题目