HarmonyOS Next开发中AreaText中placeholder内容显示不全是怎么回事?

HarmonyOS Next开发中AreaText中placeholder内容显示不全是怎么回事?

代码:

TextArea({
              placeholder:"请输入消息内容", text: this.msgContent
            })
              .backgroundColor($r('app.color.white'))
              .placeholderColor($r('app.color.input_hint'))
              .enterKeyType(EnterKeyType.Send)
              .caretColor(Color.Blue)
              .padding({left:10, right:10})
              .fontSize(14)
              .fontColor($r('app.color.black'))
              .align(Alignment.Center)
              .maxLines(5)
              .border({
                width: 0.5,
                color: $r('app.color.gray_ccc'),
                radius: 4,
              })
              .constraintSize({minHeight:40})
              .onChange((value:string)=>{
                this.msgContent = value;
              })

image.png

阅读 308
1 个回答

调大 .constraintSize({minHeight:40}) (调成80)后正常

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进