Files
heroui-vue/apps/docs/demos/slider-controlled.vue
T

27 lines
609 B
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<script setup lang="ts">
import {
Label,
Slider,
SliderOutput,
SliderTrack,
SliderFill,
SliderThumb,
} from "@heroui-vue/components";
import { ref } from "vue";
import type { SliderValue } from "@heroui-vue/components";
const value = ref<SliderValue>(25);
</script>
<template>
<div class="flex w-full max-w-xs flex-col gap-4">
<Slider v-model="value">
<Label>音量</Label>
<SliderOutput />
<SliderTrack>
<SliderFill />
<SliderThumb />
</SliderTrack>
</Slider>
<p class="text-sm text-muted">当前数值:{{ value }}</p>
</div>
</template>