vue路由跳转

vue路由跳转 返回上一级 this. r o u t e r . g o ( 1 ) t h i s . router.go(-1) 和返回到指定页面this. router.push(’/home’)
1,点击返回上一页
<button @click=“goback”>goback
methods:{
goback(){}
this.KaTeX parse error: Expected 'EOF', got '}' at position 15: router.go(-1) }̲ 2,点击跳转到/Foo2页面…router.push(’/foo2’) 最常用
或者this.$router.push({name:‘Foo1’})对象的方法

参考:https://www.cnblogs.com/zyyweb/p/9578392.html

猜你喜欢

转载自blog.csdn.net/weixin_39407291/article/details/89550414
今日推荐