docs(slider): merge vertical demo

This commit is contained in:
chenjiahan
2020-09-13 14:35:18 +08:00
parent a745709932
commit f55ddcafa9
3 changed files with 22 additions and 41 deletions
+4 -13
View File
@@ -110,18 +110,9 @@ export default {
### Vertical
```html
<div :style="{ height: '100px' }">
<div :style="{ height: '150px' }">
<van-slider v-model="value" vertical />
</div>
```
### Vertical, Dual thumb mode
Add `range` and `vertical` attributes at the same time, and make sure that the value of `value` is an array
```html
<div :style="{ height: '120px' }">
<van-slider v-model="value" range vertical @change="onChange" />
<van-slider v-model="value2" range vertical @change="onChange" />
</div>
```
@@ -131,8 +122,8 @@ import { Toast } from 'vant';
export default {
data() {
return {
// value must be an array
value: [10, 50],
value: 50,
value2: [10, 50],
};
},
methods: {