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'})對象的方法
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'})對象的方法
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。