阅读量:147
在vue中实现页面跳转的方式有:1.使用a标签跳转;2.使用this.$router.push()函数跳转;3.使用router-link标签跳转;

在vue中实现页面跳转的方式有以下几种
1.使用a标签跳转
<button>点击跳转</button>
2.使用this.$router.push()函数跳转
<button @click='goTo()'>点击跳转</button>
[removed]
export default{
name:'test',
methods:{
goTo(){
this.$router.push('/testDemo');
3.使用router-link标签跳转
<button>点击跳转</button>