
需求:导航栏上面,有三个功能、1.返回按钮、2.开灯按钮、3.扫一扫功能
{
"path": "pages/faultReporting/faultReporting",
"style": {
"navigationBarTitleText": "设备上传",
"app-plus": {
"titleNView": {
"buttons": [{
"index": "0",
"text": "扫一扫",
"fontSize": "15px",
"color": "#e8e8e8",
"width": "auto"
},
{
"index": "1",
"text": "开灯",
"fontSize": "15px",
"color": "#e1e1e1",
"width": "auto",
"float": "left"
}
]
}
}
}
},
官方的属性介绍

注意:这个是可以用字体图标的。(字体图标在iconfont搞一套自己的)
页面监听
onNavigationBarButtonTap(function(e) {
console.log(e);
})
打印的数据
