element-plus/docs/examples/slider/discrete-values.vue
Xc 48a056b051
docs: modify layout style (#10514)
* docs: modify layout style

* docs: modify nav padding

* docs: update style

* feat: update

* docs: upadte

* docs: update

* docs: modify layout style

* docs: update style

* feat: update

* docs: upadte

* docs: update

* docs: update

* docs: update

* docs: remove empty script

* docs: update

---------

Co-authored-by: kooriookami <bingshuanglingluo@163.com>
Co-authored-by: kooriookami <38392315+kooriookami@users.noreply.github.com>
2024-02-19 20:10:44 +08:00

42 lines
912 B
Vue

<template>
<div class="slider-demo-block">
<span class="demonstration">Breakpoints not displayed</span>
<el-slider v-model="value1" :step="10" />
</div>
<div class="slider-demo-block">
<span class="demonstration">Breakpoints displayed</span>
<el-slider v-model="value2" :step="10" show-stops />
</div>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
const value1 = ref(0)
const value2 = ref(0)
</script>
<style scoped>
.slider-demo-block {
max-width: 600px;
display: flex;
align-items: center;
}
.slider-demo-block .el-slider {
margin-top: 0;
margin-left: 12px;
}
.slider-demo-block .demonstration {
font-size: 14px;
color: var(--el-text-color-secondary);
line-height: 44px;
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-bottom: 0;
}
.slider-demo-block .demonstration + .el-slider {
flex: 0 0 70%;
}
</style>