refactor(ui): remove unocss attributify for FieldRange (#694)

Co-authored-by: LemonNeko <self@lemonneko.moe>
This commit is contained in:
Doji
2025-10-31 20:14:10 +08:00
committed by GitHub
co-authored by LemonNeko
parent 52ca7b2d42
commit 6bdfa6b1b3
@@ -17,29 +17,29 @@ const modelValue = defineModel<number>({ required: true })
</script>
<template>
<props.as flex="~ col gap-4">
<div flex="~ row" items-center gap-2>
<div flex="1">
<div class="flex items-center gap-1 text-sm font-medium">
<props.as :class="['flex flex-col gap-4']">
<div :class="['flex', 'flex-row', 'items-center', 'gap-2']">
<div :class="['flex-1']">
<div :class="['flex', 'items-center', 'gap-1', 'text-sm', 'font-medium']">
<slot name="label">
{{ label }}
</slot>
</div>
<div class="text-xs text-neutral-500 dark:text-neutral-400">
<div :class="['text-xs', 'text-neutral-500', 'dark:text-neutral-400']">
<slot name="description">
{{ description }}
</slot>
</div>
</div>
<span font-mono>{{ props.formatValue?.(modelValue) || modelValue }}</span>
<span :class="['font-mono']">{{ props.formatValue?.(modelValue) || modelValue }}</span>
</div>
<div flex="~ row" items-center gap-2>
<div :class="['flex', 'flex-row', 'items-center', 'gap-2']">
<Range
v-model="modelValue"
:min="min || 0"
:max="max || 1"
:step="step || 0.01"
w-full
:class="['w-full']"
/>
</div>
</props.as>