最常用的是router-link to::<router-link to="网址路径">或者<router-link :to=属性>
利用事件来跳转
<button @click="goToMenu" class="btn btn-success">let is go</button> </div> </template> <script> export default{ methods:{ goToMenu(){ //跳转到上一次流浪的页面 //this.$router.go(-1) //指定跳转的地址 //this.$router.replace('/menu') //指定跳转的路由的名字下 //this.$router.replace({name:'menuLink'}) //最常用的用push来跳转 //this.$router.push('/menu') this.$router.push({name:'menuLink'}) }