NumberKeyboard
Install
Usage
Default Keyboard
IdNumber Keyboard
Use extra-key prop to set the content of bottom left button.
Keyboard With Title
Use title prop to set keyboard title.
Bind Value
API
Props
| Attribute |
Description |
Type |
Default |
| v-model (value) |
Current value |
string |
- |
| show |
Whether to show keyboard |
boolean |
- |
| title |
Keyboard title |
string |
- |
| theme |
Keyboard theme,can be set to custom |
string |
default |
| maxlength |
Value maxlength |
number | string |
- |
| transition |
Whether to show transition animation |
boolean |
true |
| z-index |
Keyboard z-index |
number | string |
100 |
extra-key v2.8.2 |
Content of bottom left key |
string | string[] |
'' |
| close-button-text |
Close button text |
string |
- |
| delete-button-text |
Delete button text |
string |
Delete Icon |
close-button-loading v2.7.0 |
Whether to show loading close button in custom theme |
boolean |
false |
show-delete-key v2.5.9 |
Whether to show delete button |
boolean |
true |
| hide-on-click-outside |
Whether to hide keyboard when outside is clicked |
boolean |
true |
get-container v2.10.0 |
Return the mount node for NumberKeyboard |
string | () => Element |
- |
| safe-area-inset-bottom |
Whether to enable bottom safe area adaptation |
boolean |
true |
Events
| Event |
Description |
Arguments |
| input |
Emitted when keydown |
key: Content of the key |
| delete |
Emitted when the delete key is pressed |
- |
| close |
Emitted when the close button is clicked |
- |
| blur |
Emitted when the close button is clicked or the keyboard is blured |
- |
| show |
Emitted when keyboard is fully displayed |
- |
| hide |
Emitted when keyboard is fully hidden |
- |
Slots
| Name |
Description |
| delete |
Custom delete key content |
| extra-key |
Custom extra key content |
| title-left |
Custom title left content |
Less Variables
How to use: Custom Theme.
| Name |
Default Value |
Description |
| @number-keyboard-background-color |
@gray-2 |
- |
| @number-keyboard-key-height |
48px |
- |
| @number-keyboard-key-font-size |
28px |
- |
| @number-keyboard-key-active-color |
@gray-3 |
- |
| @number-keyboard-delete-font-size |
@font-size-lg |
- |
| @number-keyboard-title-color |
@gray-7 |
- |
| @number-keyboard-title-height |
34px |
- |
| @number-keyboard-title-font-size |
@font-size-lg |
- |
| @number-keyboard-close-padding |
0 @padding-md |
- |
| @number-keyboard-close-color |
@text-link-color |
- |
| @number-keyboard-close-font-size |
@font-size-md |
- |
| @number-keyboard-button-text-color |
@white |
- |
| @number-keyboard-button-background-color |
@blue |
- |
| @number-keyboard-cursor-color |
@text-color |
- |
| @number-keyboard-cursor-width |
1px |
- |
| @number-keyboard-cursor-height |
40% |
- |
| @number-keyboard-cursor-animation-duration |
1s |
- |
| @number-keyboard-z-index |
100 |
- |