mand-mobile
Version:
A Vue.js 2.0 Mobile UI Toolkit
71 lines (50 loc) • 3.27 kB
Markdown
---
title: TextareaItem
preview: https://didi.github.io/mand-mobile/examples/#/TextareaItem
---
Multi-line text input <sup class="version-after">2.5.0+</sup>
```javascript
import { TextareaItem } from 'mand-mobile'
Vue.component(TextareaItem.name, TextareaItem)
```
<!-- DEMO -->
| Props | Description | Type | Default | Note |
| ------------------------------------------------- | ----------------------------------------------- | ------------- | ------- | ------------------ |
| title | title of textarea | String | - | - |
| placeholder | placeholder of textarea | String | - | - |
| v-model | value of textarea | String | - | |
| max-length | max length of textarea | String/Number | - | - |
| autosize | Dose the Textarea resize with content | Boolean | `false` | - |
| max-height | The max height of textarea with `autosize=true` | String/Number | `'40'` | rely on `autosize` |
| solid | the width of title is fixed or not | Boolean | `true` | |
| readonly | readonly | Boolean | `false` | - |
| disabled | disabled | Boolean | `false` | - |
| clearable <sup class="version-after">2.5.3+</sup> | clearable | Boolean | `false` | - |
| rows | rows | String/Number | `'3'` | - |
| error | error message | String | - | - |
|formation <sup class="version-after">2.5.13+</sup> |input text formatting callback function|Function(name, curValue, curPos): {value: curValue, range: curPos}|-|passing parameter `name` is the name of input, `curValue` is input value, `curPos` is the current position of input cursor, and returned `value` is formatted value. `range` is the position of input cursor after formatting|
the slot of footer
Input gets focus
Input loses focus
Get value of input
Textarea gets focus
Textarea loses blur
Change the value of Textarea
key press
key release