API
Props
name | type | default | description | required version |
value | string | input value, use v-model for binding | -- | |
type | string | text | input type, one of text ,number ,email ,password ,tel | -- |
is-type | string function | custom validating function, should return {valid:true} or {valid:false, msg: error msg} | -- | |
required | boolean | false | if is required | -- |
title | string | label text | -- | |
placeholder | string | placeholder | -- | |
show-clear | boolean | true | if show clear icon | -- |
min | number | minlength for input | -- | |
max | number | maxlength for input | -- | |
disabled | boolean | false | if input is disabled | -- |
readonly | boolean | false | if input is readonly | -- |
debounce | number | debounce time | -- | |
placeholder-align | string | left | placeholder align value | v2.1.1-rc.8 |
text-align | string | left | text-align setting for value | -- |
label-width | string | set label width which will not be overwritten by $parent.labelWidth | v2.2.1-rc.4 | |
mask | string | (beta) value mask, 9 for DIGIT, A for ALPHA, S for ALPHA AND DIGIT | v2.6.1 | |
should-toast-error | string | true | whether toast error when clicking on error icon | v2.6.3 |
Events
name | params | description | required version |
@on-blur | (value, $event) | -- | -- |
@on-focus | (value, $event) | -- | -- |
@on-enter | (value, $event) | -- | -- |
@on-change | (value) | -- | -- |
@on-click-error-icon | (error) | fires when clicking error icon | v2.6.3 |
@on-click-clear-icon | -- | fires when clicking clear icon | v2.9.0 |
Slots
name | description | required version |
label | -- | |
restricted-label | -- | |
right | -- | |
right-full-height | v2.8.1 |
Functions
name | params | description | required version |
focus | get input focus | ||
blur | remove focus from input | ||
reset | (value = '') | reset input value and clear errors | v2.1.1-rc.10 |
Contributors
Contributors
Total commits quantity: 94,Total contributors quantity: 13
airylandunclaylichunqiang万刚Plortinus光君zhangsn小散wgwangxinsh55graysheeepgreedying__FresHmaNChangelog
Releases
- v2.9.2 [fix] fix corsor misplce when set mask #2810
- v2.9.0 [fix] fix wrong valid when value is empty string #2415
- v2.9.0 [fix] fix disabled style in iOS #2458
- v2.9.0 [change] show clear icon only when input gets focus #2567
- v2.9.0 [feature] add event:on-click-clear-icon #2603
- v2.9.0 [enhance] scroll input element into view when getting focus #2604
- v2.8.1 [feature] add slot:right-full-height for containing captcha #2475
- v2.8.0 [fix] fix not show clear button when initial value is zero #2482
- v2.7.9 [enhance] support china union 166 prefix phone number
- v2.7.7 [fix] Fix error message not change bugs #2348
- v2.7.6 [feature] add disabled class #2279
- v2.7.4 [fix] fix ssr DOM not matched issue #2201
- v2.7.1 [fix] fix valid is false when value is zero #2134
- v2.7.1 [fix] fix event:on-blur not fires #2146
- v2.6.5 [enhance] fix validating logic for is-type:china-mobile with mask #2040
- v2.6.3 [enhance] toast error when clicking error icon #2009
- v2.6.1 [enhance] set label for attribute #1983
- v2.6.1 [feature] support prop:mask
- v2.5.6 [fix] Fix is-type validating logic #1776
- v2.5.5 [feature] Add $event param for on-focus on-blur event #1770
- v2.5.5 [fix] Fix empty value checking logic #1759
- v2.3.1 [feature] Add blur function #1422
- v2.2.1-rc.4 [feature] Support labelWidth #1186
- v2.1.1-rc.10 [feature] Support reset method #947 @erguotou520
- v2.1.1-rc.8 [feature] Support prop:placeholder-align