# Stepper ### Install ``` javascript import { Stepper } from 'vant'; Vue.use(Stepper); ``` ## Usage ### Basic Usage ```html ``` ```javascript export default { data() { return { value: 1 } } } ``` ### Step ```html ``` ### Range ```html ``` ### Integer ```html ``` ### Disabled ```html ``` ### Async Change ```html ``` ```javascript export default { data() { return { value: 1 } }, methods: { onChange(value) { Toast.loading({ forbidClick: true }); setTimeout(() => { Toast.clear(); this.value = value; }, 500); } } } ``` ### Custom Size ```html ``` ## API ### Props | Attribute | Description | Type | Default | |------|------|------|------| | v-model | Current value | `string | number` | Min value | | min | Min value | `string | number` | `1` | | max | Max value | `string | number` | - | | step | Value change step | `string | number` | `1` | | integer | Whether to allow only integers | `boolean` | `false` | | disabled | Disable value change | `boolean` | `false` | | disable-input | Disable input | `boolean` | `false` | | async-change | Whether to enable async change | `boolean` | `false` | - | | input-width | Input width | `string | number` | `32px` | | button-size | Button size | `string | number` | `28px` | | show-plus | Whether to show plus button | `boolean` | `true` | | show-minus | Whether to show minus button | `boolean` | `true` | ### Events | Event | Description | Arguments | |------|------|------| | change | Triggered when value change | value: current value | | overlimit | Triggered when click disabled button | - | | plus | Triggered when click plus button | - | | minus | Triggered when click minus button | - | | focus | Triggered when input focused | - | | blur | Triggered when input blured | - |