实现如图所示:
方法一:
在文件夹中建立,xxxx.config.js或xxxx.config.ts然后在文件中写
export default {
navigationBarTitleText: "职位详情",
};
方法二:在当前要设置的页面的jsx或tsx中添加
import Taro, { Config } from "@tarojs/taro" export default class JobDetail extends Component<any, any> { config = { navigationBarTitleText: '职位详情' } constructor(props) {} componentWillMount() { Taro.setNavigationBarTitle({ title: "职位详情" }) } }