1.在page.json中找到对应的页面路径
2.在 style 中添加以下代码
{
"path": "pages/views/workbench/Calculate/postwork/billmana/detail",
"style": {
"navigationBarTitleText": "账单管理详情",
"app-plus": {
"bounce": "none",
"titleNView": {
"buttons": [
{
"text": "编辑",
"fontSize": "24rpx",
"float": "right"
}
]
}
}
}
},
3.现在按钮就有了,但是怎么添加按钮点击事件呐?继续看下去
4.在页面中添加一个函数与 methods()同级,添加以下代码就行了
onNavigationBarButtonTap(e) {
console.log(e);
},