中国优质的IT技术网站
专业IT技术创作平台
IT职业在线教育平台
如何设置RichEditor无输入内容时的一个提示内容?
微信扫码分享
@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) } }