#鸿蒙学习大百科#如何设置RichEditor无输入内容时的一个提示内容?

如何设置RichEditor无输入内容时的一个提示内容?

HarmonyOS
2024-10-26 09:15:51
849浏览
收藏 0
回答 1
回答 1
按赞同
/
按时间
海底捞天王
@Entry
@Component
struct Index {
  controller: RichEditorController = new RichEditorController();
  options: RichEditorOptions = { controller: this.controller };

  build() {
    Column() {
      RichEditor(this.options)
        .placeholder("请输入些什么吧", {//占位符
          fontColor: Color.Orange,
          font: {
            size: 15,
            weight: FontWeight.Normal,
            family: "HarmonyOS Sans",
            style: FontStyle.Normal
          }
        })
        .caretColor(Color.Orange)//光标手柄颜色
        .width(300)
        .height(300)
    }
    .width('100%')
    .height('100%')
    .justifyContent(FlexAlign.Center)
  }
}
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
分享
微博
QQ
微信
回复
2024-10-26 16:40:49


相关问题