uniapp——頭部導航欄配置


示例圖:

 

 

 

在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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM