Input Number
Input numerical values with a customizable range.
Basic usage
TIP
When inputting invalid string to the input box, input value will emit NaN to the upper layer as result of error
Disabled
Steps
Allows you to define incremental steps.
Step strictly
Precision
TIP
The value of precision must be a non negative integer and should not be less than the decimal places of step.
Size
Use attribute size to set additional sizes with large or small.
Controls Position
Attributes
| Attribute | Description | Type | Accepted Values | Default |
|---|---|---|---|---|
| model-value / v-model | binding value | number / undefined | — | — |
| min | the minimum allowed value | number | — | -Infinity |
| max | the maximum allowed value | number | — | Infinity |
| step | incremental step | number | — | 1 |
| step-strictly | whether input value can only be multiple of step | boolean | — | false |
| precision | precision of input value | number | — | — |
| size | size of the component | string | large/small | default |
| disabled | whether the component is disabled | boolean | — | false |
| controls | whether to enable the control buttons | boolean | — | true |
| controls-position | position of the control buttons | string | right | - |
| name | same as name in native input | string | — | — |
| label | label text | string | — | — |
| placeholder | placeholder in input | string | - | - |
Events
| Event Name | Description | Parameters |
|---|---|---|
| change | triggers when the value changes | (currentValue: number | NaN, oldValue: number | NaN) |
| blur | triggers when Input blurs | (event: Event) |
| focus | triggers when Input focuses | (event: Event) |
Methods
| Method | Description | Parameters |
|---|---|---|
| focus | get focus the input component | - |
| blur | remove focus the input component | — |