ant-design-vue/components/slider/demo/vertical.md

55 lines
1.1 KiB
Markdown
Raw Normal View History

2018-04-01 11:23:56 +00:00
<cn>
#### 垂直
垂直方向的 Slider。
</cn>
<us>
#### Vertical
The vertical Slider.
</us>
2019-10-09 10:32:23 +00:00
```tpl
2018-04-01 11:23:56 +00:00
<template>
<div style="height: 300px">
<div style="float:left;height: 300px;marginLeft: 70px">
<a-slider vertical :defaultValue="30" />
</div>
<div style="float:left;height: 300px;marginLeft: 70px">
<a-slider vertical range :step="10" :defaultValue="[20, 50]" />
</div>
<div style="float:left;height: 300px;marginLeft: 70px">
<a-slider vertical range :marks="marks" :defaultValue="[26, 37]" />
</div>
</div>
</template>
<script>
2019-09-28 12:45:07 +00:00
export default {
data() {
return {
marks: {
0: '0°C',
26: '26°C',
37: '37°C',
100: {
style: {
color: '#f50',
},
label: <strong>100°C</strong>,
2018-04-01 11:23:56 +00:00
},
},
2019-09-28 12:45:07 +00:00
};
},
methods: {
handleDisabledChange(disabled) {
this.disabled = disabled;
2018-04-01 11:23:56 +00:00
},
2019-09-28 12:45:07 +00:00
},
};
2018-04-01 11:23:56 +00:00
</script>
<style scoped>
2019-09-28 12:45:07 +00:00
.code-box-demo .ant-slider {
margin-bottom: 16px;
}
2018-04-01 11:23:56 +00:00
</style>
```