fix(front): bind additional attributes to Switch component in SwitchField for improved flexibility

This commit is contained in:
keven1024
2025-05-02 19:33:35 +08:00
parent 981aab4721
commit 81f04ca004

View File

@@ -12,6 +12,6 @@ const { value } = useField<boolean>(props.name, props?.rules)
<template>
<div class="flex flex-row gap-2 items-center">
<Label v-if="label">{{ label }}</Label>
<Switch v-model="value" />
<Switch v-model="value" v-bind="$attrs" />
</div>
</template>