mand-mobile
Version:
A Vue.js 2.0 Mobile UI Toolkit
65 lines (47 loc) • 1.82 kB
Markdown
---
title: NumberKeyboard
preview: https://didi.github.io/mand-mobile/examples/#/number-keyboard
---
Generally used for financial scenarios such as password, verification code or payment amount input
```javascript
import { NumberKeyboard } from 'mand-mobile'
Vue.component(NumberKeyboard.name, NumberKeyboard)
```
<!-- DEMO -->
|Props | Description | Type | Default | Note |
|----|-----|------|------|------|
|v-model|display keyboard or not|Boolean|`false`|-|
|is-view|inline display in page, otherwise it shows as `Popup`|Boolean|`false`|-|
|type|keyboard type|String|`professional`|`professional` with confirmation key and decimal point is often used for price or amount input, `simple` is generally used for password or verification code input|
|disorder|if numeric keys of keyboard are out of order|Boolean|`false`| -|
|is-hide-confirm|automatically hide the keyboard when confirming|Boolean|`true`| -|
|text-render|customize value of specified key|Function(value: string): string|-|replaceable key `0,1,...9,.`|
|ok-text|text of confirmation key|String|`confirm`|-|
|disabled <sup class="version-after">2.6.0+|to disable the keyboard|Boolean|`false`|-|
|duplicate-zero <sup class="version-after">2.6.0+</sup>|show `00` key|Boolean|`false`|This props is valid only when `type` is `professional` |
```html
<md-number-keyboard>
<md-icon name="security"></md-icon> 安全支付
</md-number-keyboard>
```
Display keyboard
Hide keyboard
Click numeric key
|Props | Description | Type|
|----|-----|------|
|val | value | Number|
Click delete key
Click confirmation key