Fix color and slider settings types to inherit attrs (#2483)

This commit is contained in:
bymyself
2025-02-09 18:18:09 -07:00
committed by GitHub
parent eeb1c34ada
commit 550a9d04c5
4 changed files with 99 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
<template>
<div class="color-picker-wrapper flex items-center gap-2">
<ColorPicker v-model="modelValue" />
<ColorPicker v-model="modelValue" v-bind="$attrs" />
<InputText v-model="modelValue" class="w-28" :placeholder="label" />
</div>
</template>
@@ -14,4 +14,8 @@ defineProps<{
defaultValue?: string
label?: string
}>()
defineOptions({
inheritAttrs: false
})
</script>

View File

@@ -8,6 +8,7 @@
:min="min"
:max="max"
:step="step"
v-bind="$attrs"
/>
<InputNumber
:modelValue="modelValue"
@@ -70,4 +71,8 @@ const updateValue = (newValue: number | null) => {
localValue.value = newValue
emit('update:modelValue', newValue)
}
defineOptions({
inheritAttrs: false
})
</script>