|
|
@@ -50,7 +50,7 @@ export default {
|
|
|
|
|
|
```html
|
|
|
<template>
|
|
|
- <nut-textarea v-model="value" rows="10" autosize />
|
|
|
+ <nut-textarea v-model="value" :rows="1" autosize />
|
|
|
</template>
|
|
|
```
|
|
|
:::
|
|
|
@@ -60,8 +60,8 @@ export default {
|
|
|
|
|
|
```html
|
|
|
<template>
|
|
|
- <nut-textarea readonly model-value="textarea只读状态" />
|
|
|
- <nut-textarea disabled model-value="textarea禁用状态" limit-show max-length="20" />
|
|
|
+ <nut-textarea readonly model-value="textarea 只读状态" />
|
|
|
+ <nut-textarea disabled model-value="textarea 禁用状态" />
|
|
|
</template>
|
|
|
```
|
|
|
:::
|
|
|
@@ -71,16 +71,16 @@ export default {
|
|
|
|
|
|
| 参数 | 说明 | 类型 | 默认值 |
|
|
|
|-------------|--------------------------------------------------|----------------|----------------|
|
|
|
-| v-model | input value, supports two-way binding | string | -|
|
|
|
-| placeholder | Set placeholder prompt text | string | `Please enter content` |
|
|
|
-| max-length | limit the longest input characters | string \| number | - |
|
|
|
-| rows | height of textarea, priority is higher than autosize attribute `only supports H5` | string \| number | `2` |
|
|
|
-| limit-show | Whether textarea displays input characters. Must be used with `max-length` | boolean | `false` |
|
|
|
-| autosize | whether to adapt to the height of the content, or to pass in an object, such as `{ maxHeight: 200, minHeight: 100 }`, the unit is `px` | boolean \| {maxHeight?: number; minHeight?: number} | `false` |
|
|
|
-| text-align | text position, optional values `left`, `center`, `right` | string | - |
|
|
|
-| readonly | read-only property | boolean | `false` |
|
|
|
-| disabled | disabled attribute | boolean | `false` |
|
|
|
-| autofocus | get focus automatically | boolean | `false` |
|
|
|
+| v-model | 输入值,支持双向绑定 | string | `-` |
|
|
|
+| placeholder | 设置占位提示文字 | string | `'请输入内容'` |
|
|
|
+| max-length | 限制最长输入字符 | string \| number | - |
|
|
|
+| rows | textarea的高度,优先级高于autosize属性 `仅支持 H5` | string \| number | `2` |
|
|
|
+| limit-show | textarea是否展示输入字符。须配合`max-length`使用 | boolean | `false` |
|
|
|
+| autosize | 是否自适应内容高度,也可传入对象, 如 { maxHeight: 200, minHeight: 100 },单位为px | boolean \| {maxHeight?: number; minHeight?: number} | `false` |
|
|
|
+| text-align | 文本位置,可选值`left`,`center`,`right` | string | `left` |
|
|
|
+| readonly | 只读属性 | boolean | `false` |
|
|
|
+| disabled | 禁用属性 | boolean | `false` |
|
|
|
+| autofocus | 自动获取焦点 | boolean | `false` |
|
|
|
|
|
|
|
|
|
### Events
|