实现如图所示:

Taro设置顶部标题文字

 

 

方法一:

在文件夹中建立,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: "职位详情"
        })
    }

}    

 

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-07
  • 2021-04-18
  • 2021-04-19
  • 2021-12-23
猜你喜欢
  • 2021-07-15
  • 2021-12-18
  • 2021-05-18
  • 2022-02-28
  • 2021-11-01
  • 2022-12-23
  • 2021-09-02
相关资源
相似解决方案