mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
* fix: Tabbar icon line-height * [new feature] progress add showPivot prop * [new feature] TabItem support vue-router * [new feature] update document header style * [Doc] add toast english ducoment * [new feature] add i18n support * feat: Extract demos from markdown * feat: Base components demos * [new feature] complete demo extract & translate * [fix] text cases * fix: add deepAssign test cases * fix: changelog detail * [new feature] AddressEdit support i18n
64 lines
1.2 KiB
Markdown
64 lines
1.2 KiB
Markdown
## Stepper
|
|
|
|
### Install
|
|
``` javascript
|
|
import { Stepper } from 'vant';
|
|
|
|
Vue.component(Stepper.name, Stepper);
|
|
```
|
|
|
|
### Usage
|
|
|
|
#### Basic Usage
|
|
|
|
```html
|
|
<van-stepper v-model="value" />
|
|
```
|
|
|
|
```javascript
|
|
export default {
|
|
data() {
|
|
return {
|
|
value: 1
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
#### Disabled
|
|
|
|
```html
|
|
<van-stepper v-model="value" disabled />
|
|
```
|
|
|
|
#### Advanced Usage
|
|
|
|
```html
|
|
<van-stepper
|
|
v-model="value"
|
|
min="5"
|
|
max="40"
|
|
step="2"
|
|
defaultValue="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 | - | |