示例圖:
在page.json配置即可
{
"path": "pages/index/logs",
"style": {
"navigationBarTitleText": "日志",
"app-plus": {
"titleNView": {
"buttons": [{
"text": "德基店",
"fontSize": "14px",
"color": "#222"
},{
"text": "\ue672",
"fontSrc": "/static/uni.ttf",
"fontSize": "18px",
"color": "#222"
},{
"type": "share",
"fontSize": "20px"
}
]
}
}
}
},
自定義頁面跳轉
onNavigationBarButtonTap(e) { //監聽自定義導航欄按鈕跳轉頁面
uni.navigateTo({
url:'jsHistoryAdjustment'
})
},
右側按鈕寬度調整
用寬度調整文字和圖標之間的距離:"width": "80px"
更多導航欄請點這里https://ask.dcloud.net.cn/article/34921