1 標簽跳轉
<router-link to='two'><button>點我到第二個頁面</button></router-link>
2 點擊事件跳轉
html : <button @click="hreftwo" class="test-one">點我到第二個頁面</button>
js : methods:{ //跳轉頁面 hreftwo(){ this.$router.push({path:'/two'}) } }
<router-link to='two'><button>點我到第二個頁面</button></router-link>
html : <button @click="hreftwo" class="test-one">點我到第二個頁面</button>
js : methods:{ //跳轉頁面 hreftwo(){ this.$router.push({path:'/two'}) } }
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。