1.this.$router.push({name:'Home'})
2.this.$router.push({path:'/view'})
3.this.$router.replace({name:'Home'})
4.this.$router.replace({path:'/view'})
本文介绍了Vue.js中使用this.$router进行页面跳转的方法,包括push和replace两种方式,并提供了具体的代码示例。
1.this.$router.push({name:'Home'})
2.this.$router.push({path:'/view'})
3.this.$router.replace({name:'Home'})
4.this.$router.replace({path:'/view'})
转载于:https://www.cnblogs.com/luguankun/p/10664496.html

被折叠的 条评论
为什么被折叠?