感谢您的反馈!
多行输入框。
| 参数 | 说明 | 类型 | 默认值 |
| value | 当前值 | String/Number | - |
| defaultValue | 初始化值 | String/Number | - |
| onChange | 发生改变的时候触发的回调 |
Function | - |
| onKeyDown | 键盘按下的时候触发的回调 |
Function | - |
| disabled | 禁用状态 | Boolean | false |
| maxLength | 最大长度 | Number | null |
| hasLimitHint | 是否展现最大长度样式 | Boolean | false |
| cutString | 当设置了maxLength时,是否截断超出字符串 | Boolean | true |
| readOnly | 只读 | Boolean | false |
| trim | onChange返回会自动去除头尾空字符 | Boolean | false |
| placeholder | 输入提示 | String | - |
| onFocus | 获取焦点时候触发的回调 | Function | - |
| onBlur | 失去焦点时候触发的回调 | Function | - |
| name | name | String | - |
| state | 状态 可选值: 'error'(错误) |
Enum | - |
| hasBorder | 是否有边框 | Boolean | true |
| autoHeight | 自动高度 true / {minRows: 2, maxRows: 4} | Boolean/Object | false |
| rows | 多行文本框高度 (不要直接用height设置多行文本框的高度, ie9 10会有兼容性问题) |
Number | 4 |
<view class="com-wrap">
<view class="com-title">简单</view>
<textarea placeholder="TextArea" aria-label="TextArea"></textarea>
<view class="com-title">最大长度</view>
<textarea placeholder="TextArea"
maxLength="100"
rows={4}
hasLimitHint
/></textarea>
<view class="com-title">禁用状态</view>
<textarea disabled aria-label="disabled" placeholder="medium" maxLength="10" hasLimitHint></textarea>
<view class="com-title">自动高度</view>
<textarea autoHeight trim aria-label="auto height" placeholder="autoHeight" />
</view>