textarea的placeholder和text 大小不一样,textinput也是,最后的长度不一致

@Entry 
@Component 
struct Index { 
  build() { 
    Column(){ 
      TextArea({ placeholder: '您的意见是我们前进的动力' } 
      ) 
        .placeholderColor($r('app.color.white')) 
        .fontColor($r('app.color.title_color')) 
      .fontSize(14) 
        .padding(0) 
        .backgroundColor(Color.Transparent) 
        .height(100) 
        .maxLength(1000) 
        .margin({ top: 16 }) 
        .onChange((value: string) => { 
          this.content = value; 
          this.count = value.length; 
        }) 
    } 
  } 
}
HarmonyOS
2024-06-03 23:42:47
浏览
收藏 0
回答 1
待解决
回答 1
按赞同
/
按时间
leeixndong

设置字体大小属性fontSize(14)不能控制placeholder文字大小及样式,可以使用placeholderFont属性控制placeholder字体样式。

文档链接:

TextArea

分享
微博
QQ
微信
回复
2024-06-04 22:37:01
相关问题
鸿蒙安卓有什么不一样
4827浏览 • 3回复 待解决
Web组件获取高度不一样
572浏览 • 1回复 待解决
Path组件绘制线条粗细不一致
459浏览 • 1回复 待解决
water flow 出现gap不一致问题
299浏览 • 1回复 待解决
签名不一致报错怎么回事?
1411浏览 • 1回复 待解决
napi里面,相同输入输出不一致
381浏览 • 1回复 待解决
文字空行高度与字体高度不一致
692浏览 • 1回复 待解决