收藏
回答

小程序开发 | 详情页面的"navigationBarTitleText": ""应该如何设置?

"navigationBarTitleText": ""

wx.setNavigationBarTitle({

          title: "{{line}}"

上面是我写的,上一面传过来数据line,我现在想要把{{line}}作为详情页面的标题


 let line = options.line;

 let date = options.date;

      if(line && date){

        this.setData({

          line,

          date

        })

      };

         var that = this

         let key = that.data.line;

好像都不起作用,请问应该如何解决,谢谢!

回答关注问题邀请回答
收藏

2 个回答

  • brave
    brave
    2020-08-02
    wx.setNavigationBarTitle({
      title: this.data.line
    })
    
    2020-08-02
    有用 3
    回复 5
    • 败者为寇
      败者为寇
      2020-08-02
      感谢!
      2020-08-02
      回复
    • 败者为寇
      败者为寇
      2020-08-02
      还想问您一个问题就是文字竖排 flex-direction: column;
        justify-content: center;好像不起作用
      2020-08-02
      回复
    • brave
      brave
      2020-08-02回复败者为寇
      文字水平居中? text-align: center;
      2020-08-02
      回复
    • 败者为寇
      败者为寇
      2020-08-02回复brave
      文字纵向排列
      2020-08-02
      回复
    • 可sin~
      可sin~
      2022-08-03
      请教大佬,如果是两行文字,该怎么换行?
      2022-08-03
      回复
  • 猛男陈阔
    猛男陈阔
    2020-08-02
    //设置标题
    wx.setNavigationBarTitle({
      title: this.data.line
    })
    console.log(this.data.line)
    
    2020-08-02
    有用 1
    回复 1
    • 可sin~
      可sin~
      2022-08-03
      请教大佬,如果是两行文字,该怎么换行?
      2022-08-03
      回复
登录 后发表内容
问题标签