查看uni-app官網,buttons配置即可
例子:
{ "pages": [ //pages數組中第一項表示應用啟動頁,參考:https://uniapp.dcloud.io/collocation/pages { "path": "pages/index/index", "style": { "app-plus": { "titleNView": { "searchInput": { "align": "center", "backgroundColor": "#eee", "borderRadius": "5px", // 只能用px作單位 "placeholder": "請輸入內容", "placeholderColor": "#ccc" }, "buttons": [{ "color": "#F0AD4E", "colorPressed": "#eee", "float": "left", "fontSize": "22px", "fontSrc": "/static/iconfont.ttf", // 字體文件 "text": "\ue65d" // 字體圖標\u 開頭,加上字體圖標unicode后面四位 }, { "color": "#333", "colorPressed": "#eee", "float": "right", "fontSize": "22px", "fontSrc": "/static/iconfont.ttf", // 字體文件 "text": "\ue678" // 字體圖標\u 開頭,加上字體圖標unicode后面四位 } ] } } } } ], "globalStyle": { "navigationBarTextStyle": "black", "navigationBarTitleText": "uni-app", "navigationBarBackgroundColor": "#F8F8F8", "backgroundColor": "#F8F8F8" } }
效果: