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'})对象的方法