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; 
        }) 
    } 
  } 
}
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
HarmonyOS
2024-06-03 23:42:47
1.2w浏览
收藏 0
回答 1
回答 1
按赞同
/
按时间
北风_小浦

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

文档链接:

TextArea

分享
微博
QQ
微信
回复
2024-06-04 22:37:01


相关问题
启动调试行为不一致
742浏览 • 1回复 待解决
HarmonyOS Text组件文本上下间距不一致
455浏览 • 1回复 待解决
HarmonyOS 单位不一致问题
524浏览 • 1回复 待解决
鸿蒙安卓有什么不一样
6784浏览 • 3回复 待解决
Web组件获取高度不一样
2760浏览 • 1回复 待解决
Path组件绘制线条粗细不一致
2332浏览 • 1回复 待解决
签名不一致报错怎么回事?
3293浏览 • 1回复 待解决
#鸿蒙通关秘籍#HSPHAR有啥不一样
505浏览 • 1回复 待解决
water flow 出现gap不一致问题
1095浏览 • 1回复 待解决
依赖hsp出包,报错versionname不一致
544浏览 • 1回复 待解决