* feat(textarea-item): support formation (#699) * doc(textarea-item): support formation |
||
|---|---|---|
| .. | ||
| demo | ||
| test | ||
| README.en-US.md | ||
| README.md | ||
| component.js | ||
| index.vue | ||
README.en-US.md
| title | preview |
|---|---|
| TextareaItem | https://didi.github.io/mand-mobile/examples/#/TextareaItem |
Multi-line text input 2.5.0+
Import
import { TextareaItem } from 'mand-mobile'
Vue.component(TextareaItem.name, TextareaItem)
Code Examples
API
TextareaItem Props
| 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 2.5.3+ | clearable | Boolean | false |
- |
| rows | rows | String/Number | '3' |
- |
| error | error message | String | - | - |
| formation 2.5.13+ | 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 |
TextareaItem Slots
footer
the slot of footer
TextareaItem Events
focus()
Input gets focus
blur()
Input loses focus
getValue()
Get value of input
TextItem Events
@focus(name)
Textarea gets focus
@blur(name)
Textarea loses blur
@change(name, value)
Change the value of Textarea
@keyup(name, event)
key press
@keydown(name, event)
key release