mpvue開發微信小程序路由跳轉底部導航tabBar

mpvue開發微信小程序時,用標籤屬性做路由跳轉的話,open-type屬性值要注意:

tabBar 微信自帶底部導航


1.open-type="switchTab" 跳轉tabBar路由
2.open-type="navigate" 跳轉非tabBar路由(默認值)

<a href="/pages/index/main" open-type="switchTab" class="home">去往首頁-way1</a>
<a href="/pages/counter/main" open-type="navigate" class="home">去往counter</a>
<navigator open-type="navigateBack" delta="1">返回非tabBar</navigator>
<navigator url="/pages/index/main" open-type="switchTab" delta="1">跳轉tabBar</navigator>

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章