vue页面跳转

方法一:

1.给元素绑定点击监听

@click="goToPage"

2.在methods中写路由跳转函数

goToPage(){
this.$router.push('/test/index');
},

方法二:

给需要页面跳转的button加上router-link

<router-link to="/test/index" >
<mt-button >button</mt-button>
</router-link>
posted @ 2020-07-08 16:41  栗子米  阅读(493)  评论(0编辑  收藏  举报