这篇文章主要介绍了vue页面跳转如何实现的相关知识,内容详细易懂,操作简单快捷,具有一定借鉴价值,相信大家阅读完这篇vue页面跳转如何实现文章都会有所收获,下面我们一起来看看吧。
1.使用a标签跳转
<a href="https://www.baidu.com"><button>点击跳转</button></a>
2.使用this.$router.push()函数跳转
<template>
<div id='test'>
<button @click='goTo()'>点击跳转</button>
</div>
</template>
<script>
export default{
name:'test',
methods:{
goTo(){
this.$router.push('/testDemo');3.使用router-link标签跳转
<router-link :to="{path:'testDemo',query:{setid:123456}}">
<button>点击跳转</button>
</router-link>关于“vue页面跳转如何实现”这篇文章的内容就介绍到这里,感谢各位的阅读!相信大家对“vue页面跳转如何实现”知识都有一定的了解,大家如果还想学习更多知识,欢迎关注天达云行业资讯频道。