mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
* [bugfix] CouponList always show empty info * [bugfix] add click feedback of buttons in components * [Doc] add custom theme document * [new feature] Notice bar support more props * [bugfix] PullRefresh test cases * [bugfix] unused NoticeBar style * [bugfix] Swipe width calc error * [Doc] english document of all action components * [Doc] change document site path to /zanui/vant * [Doc] fix * [bugfix] uploader style error * [bugfix] tabs document demo * [new feature] Cell support vue-router target route * [bugfix] add cell test cases * update yarn.lock * [bugfix] Tabbar cann't display info when use icon slot * [Doc] update document title * [bugfix] Dialog should reset button text when showed * [new feature] CouponList add showCloseButton prop * [new feature] Swipe add 'initialSwipe' prop * [bugfix] NoticeBar text disappeared when page back * [new feature] ImagePreview support startPosition * fix: improve imagePreview test cases * [bugfix] Steps style error when has more than 4 items * [new feature] normalize size of all icons * [new feature] Stepper add plus & minus event * fix: yarn.lock * [bugfix] addressEdit icon render failed
1.4 KiB
1.4 KiB
Stepper
Install
import { Stepper } from 'vant';
Vue.component(Stepper.name, Stepper);
Usage
Basic Usage
:::demo Basic Usage
<van-stepper v-model="stepper1" />
export default {
data() {
return {
value: 1
}
}
}
:::
Disabled
:::demo Disabled
<van-stepper v-model="stepper1" disabled />
:::
Advanced Usage
:::demo Advanced Usage
<van-stepper
v-model="stepper2"
min="5"
max="40"
step="2"
default-value="9"
/>
:::
API
Attribute | Description | Type | Default | Accepted Values |
---|---|---|---|---|
min | Min value | `String | Number` | 1 |
max | Max value | `String | Number` | - |
defaultValue | Default value | `String | Number` | 1 |
step | Value change step | `String | Number` | 1 |
disabled | Disable value change | Boolean |
false |
- |
disableInput | Disable input | Boolean |
false |
- |
Event
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 | - |