[new feature] Number: support v-model (#3531)

This commit is contained in:
neverland
2019-06-17 15:19:21 +08:00
committed by GitHub
parent 6ec870abce
commit ce3dfc859a
6 changed files with 131 additions and 3 deletions
+29
View File
@@ -59,12 +59,41 @@ export default {
/>
```
### Bind Value
```html
<van-field
readonly
clickable
:value="value"
@touchstart.native.stop="show = true"
/>
<van-number-keyboard
v-model="value"
:show="show"
@blur="show = false"
/>
```
```javascript
export default {
data() {
return {
show: false,
value: ''
}
}
}
```
## API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|
| v-model | Current value | `String` | - |
| show | Whether to show keyboard | `Boolean` | - |
| theme | Keyboard themecan be set to `default` `custom` | `String` | `default` |
| title | Keyboard title | `String` | - |