layui/example/docs/zh-CN/components/slider.md

99 lines
1.1 KiB
Markdown
Raw Normal View History

::: anchor
:::
2021-12-26 13:40:02 +00:00
::: title 横向
:::
::: demo
<template>
2021-12-26 03:13:15 +00:00
<lay-slider v-model="value1" :disabled="false"></lay-slider>
</template>
<script>
import { ref } from 'vue'
export default {
setup() {
2021-12-17 12:52:45 +00:00
const value1 = ref(50)
return {
2021-12-17 12:52:45 +00:00
value1
}
}
}
</script>
:::
2021-12-26 13:40:02 +00:00
::: title 纵向
:::
::: demo
<template>
2021-12-26 13:40:02 +00:00
<lay-slider v-model="value2" :vertical="true" :disabled="true"></lay-slider>
</template>
<script>
import { ref } from 'vue'
export default {
setup() {
2021-12-17 12:52:45 +00:00
const value2 = ref(10)
return {
2021-12-17 12:52:45 +00:00
value2
}
}
}
</script>
2021-12-16 09:57:59 +00:00
:::
2021-12-26 13:40:02 +00:00
::: title 区间
:::
2021-12-26 03:13:15 +00:00
::: demo
2021-12-26 13:40:02 +00:00
<template>
2021-12-26 03:13:15 +00:00
<lay-slider v-model="value3" :range="true"></lay-slider>
</template>
<script>
import { ref } from 'vue'
export default {
setup() {
2021-12-26 13:40:02 +00:00
const value3 = ref([20,50])
2021-12-26 03:13:15 +00:00
return {
2021-12-26 13:40:02 +00:00
value3
2021-12-26 03:13:15 +00:00
}
}
}
</script>
2021-12-26 13:40:02 +00:00
:::
2021-12-26 03:13:15 +00:00
2021-12-28 05:09:08 +00:00
::: title 纵向区间
:::
::: demo
<template>
<lay-slider v-model="value3" :range="true" :vertical="true"></lay-slider>
</template>
<script>
import { ref } from 'vue'
export default {
setup() {
const value4 = ref([20,50])
return {
value4
}
}
}
</script>
:::
2021-12-26 13:40:02 +00:00
::: comment
2021-12-26 03:13:15 +00:00
:::