uniapp,textarea设置高度不生效

https://uniapp.dcloud.io/component/textarea

textarea

多行输入框。

属性说明

属性名 类型 默认值 说明 平台差异说明
value String 输入框的内容
placeholder String 输入框为空时占位符
placeholder-style String 指定 placeholder 的样式
placeholder-class String textarea-placeholder 指定 placeholder 的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/ 字节跳动小程序不支持
disabled Boolean false 是否禁用
maxlength Number 140 最大输入长度,设置为 -1 的时候不限制最大长度
focus Boolean false 获取焦点 在 H5 平台能否聚焦以及软键盘是否跟随弹出,取决于当前浏览器本身的实现。nvue 页面不支持,需使用组件的 focus()、blur() 方法控制焦点
auto-height Boolean false 是否自动增高,设置auto-height时,style.height不生效
#### [textarea](https://uniapp.dcloud.io/component/textarea?id=textarea)

多行输入框。

**属性说明**

| 属性名 | 类型 | 默认值 | 说明 | 平台差异说明 |
| --- | --- | --- | --- | --- |
| value | String |  | 输入框的内容 |  |
| placeholder | String |  | 输入框为空时占位符 |  |
| placeholder-style | String |  | 指定 placeholder 的样式 |  |
| placeholder-class | String | textarea-placeholder | 指定 placeholder 的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/ | 字节跳动小程序不支持 |
| disabled | Boolean | false | 是否禁用 |  |
| maxlength | Number | 140 | 最大输入长度,设置为 -1 的时候不限制最大长度 |  |
| focus | Boolean | false | 获取焦点 | 在 H5 平台能否聚焦以及软键盘是否跟随弹出,取决于当前浏览器本身的实现。nvue 页面不支持,需使用组件的 focus()、blur() 方法控制焦点 |
| auto-height | Boolean | false | 是否自动增高,设置auto-height时,style.height不生效 |

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容