這篇文章主要介紹了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頁面跳轉如何實現”知識都有一定的了解,大家如果還想學習更多知識,歡迎關注億速云行業資訊頻道。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。