一、全局设置
app.json:
"window": {
"navigationBarTitleText": "标题",
}
二、单页设置
index.json:
{
"navigationBarTitleText": "",
}
三、动态设置
index.js:
wx.setNavigationBarTitle({
title: '当前页面'
})
参数
Object object
| 属性 | 类型 | 默认值 | 必填 | 说明 |
|---|---|---|---|---|
| title | string | 是 | 页面标题 | |
| success | function | 否 | 接口调用成功的回调函数 | |
| fail | function | 否 | 接口调用失败的回调函数 | |
| complete | function | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |