1、在page.json页面
{
"path": "pages/index/attend",
"style": {
"navigationBarTitleText": "关注分组",
"app-plus": {
"titleNView": {
"buttons": [{
"text": "确定",
"fontSize": "32rpx",
"fontWeight": "700"
}]
}
}
}
},
2、在对应的html页面(与生命周期同级)
onShow() {
},
// 触发确定按钮
onNavigationBarButtonTap(event) {
if (event.text == '确定') {
this.ensure()
}
}
ensure() {
对应的方法
}