x***@gmail.com
x***@gmail.com
  • 发布:2023-06-03 12:45
  • 更新:2025-12-12 13:34
  • 阅读:711

#插件讨论# 【 uni-easyinput 增强输入框 - DCloud前端团队 】type=textarea 不能设置高度吗

分类:uni-app
2023-06-03 12:45 负责人:无 分享
已邀请:
HRK_01

HRK_01

可以设置高度,将auto-height关闭然后通过style.height设置即可

m***@163.com

m***@163.com

不行,设置了样式高度,还是改变不了

2***@qq.com

2***@qq.com - 嗯嗯嗯,撂了吧,我写bug呢。

可以设置,确实挺神奇的,得这么干

.uni-easyinput input {  
    height: 50px;  
}
牛奶包子

牛奶包子

uni-easyinput 组件中,当 type="textarea" 时,可以通过以下方式设置高度:

使用 autoHeight 属性让高度随内容自动调整(动态高度)。
通过 CSS 直接设置样式,例如:

   <uni-easyinput type="textarea" style="height: 200px;"></uni-easyinput>  

或通过 class 外部控制样式。

更多细节可参考官方文档:多行文本自动高度

内容为 AI 生成,仅供参考

要回复问题请先登录注册