方式一:配置所有页面统一标题navigationBarTitleText.(优先级最低),位置:pages.json
"globalStyle": {"navigationBarTextStyle": "black","navigationBarTitleText": "跃玩生活",// "navigationBarBackgroundColor": "#2759EF","app-plus": {"bounce": "none"},"backgroundColor": "#F8F8F8"},
方式二:配置某个页面的标题.(优先级中等),位置:pages.json
{"path": "pages/mine/userInfo","style": {"navigationBarTitleText": "个人信息","navigationStyle": "custom","navigationBarBackgroundColor": "white"}},
方式三:动态修改当前页面的标题.(优先级最高),任意位置.
uni.setNavigationBarTitle({title: option.title})
也可以使用document.title = '标题'设置,但在uniapp中不建议使用.