baidu / amis

前端低代码框架,通过 JSON 配置就能生成各种页面。
https://baidu.github.io/amis/
Apache License 2.0
17.38k stars 2.52k forks source link

textarea 如何设置输入框高度?使用style, className,inputClassName 三种样式设置均无法正确设置输入框的高度 #10805

Closed wangerg closed 3 months ago

wangerg commented 3 months ago

使用style, className,inputClassName 三种样式设置均无法正确设置输入框的高度,都只能设置外围的样式高度,输入框的样式高度一直保持不变,不知道是否有其他方法。

image

{
                        "name": "textarea",
                        "type": "textarea",
                        "label": "多行文本",
                        style:{
                          "height":"500px",
                        },
                        className:"h-full",
                        inputClassName: "h-full bg-gray-200",
                      }
github-actions[bot] commented 3 months ago

👍 Thanks for this! 🏷 I have applied any labels matching special text in your issue.

Please review the labels and make any necessary changes.

2betop commented 3 months ago

估计得配置 minRows

wangerg commented 3 months ago

人傻了,没想到这个属性,配置minRows得以解决