mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-15 09:50:58 +08:00
35 lines
495 B
Vue
35 lines
495 B
Vue
|
<template>
|
||
|
<div class="block">
|
||
|
<el-slider
|
||
|
v-model="value"
|
||
|
range
|
||
|
:marks="marks"
|
||
|
/>
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
<script lang="ts">
|
||
|
import { h, ref } from 'vue'
|
||
|
|
||
|
export default {
|
||
|
setup() {
|
||
|
const value = ref([30, 60])
|
||
|
const marks = {
|
||
|
0: '0°C',
|
||
|
8: '8°C',
|
||
|
37: '37°C',
|
||
|
50: {
|
||
|
style: {
|
||
|
color: '#1989FA',
|
||
|
},
|
||
|
label: h('strong', '50%'),
|
||
|
},
|
||
|
}
|
||
|
return {
|
||
|
value,
|
||
|
marks,
|
||
|
}
|
||
|
},
|
||
|
}
|
||
|
</script>
|