vue 页面跳转的两种方式
1,標(biāo)簽跳轉(zhuǎn)
??? <router-link to='two.html'><button>點(diǎn)我到第二個(gè)頁(yè)面</button></router-link>
2,點(diǎn)擊事件跳轉(zhuǎn)
?? html :
????? <button @click="hreftwo" class="test-one">點(diǎn)我到第二個(gè)頁(yè)面</button>
?? js :
????? methods:{ //跳轉(zhuǎn)頁(yè)面
????????????????? ? hreftwo(){
????????????????????????????? this.$router.push({ path:'/two.html'? })
??????????????????????????????? }
?????????????????????? }
3,如果你要的只是點(diǎn)擊跳轉(zhuǎn)返回上一頁(yè),請(qǐng)看我另一篇博文
?????? 鏈接:https://www.cnblogs.com/lgnblog/p/9957661.html
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
轉(zhuǎn)載于:https://www.cnblogs.com/lgnblog/p/10084121.html
總結(jié)
以上是生活随笔為你收集整理的vue 页面跳转的两种方式的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: bzoj1402 Ticket to R
- 下一篇: Vuex 使用了 module 后的访问