Skip to content

Commit 204cde0

Browse files
committed
fix(CFormCheck): prevent class names override
1 parent 323a278 commit 204cde0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/coreui-vue/src/components/form/CFormCheck.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ const CFormCheck = defineComponent({
128128

129129
const formControl = () => {
130130
return h('input', {
131+
...attrs,
131132
checked: props.modelValue,
132133
class: [
133134
props.button ? 'btn-check' : 'form-check-input',
@@ -140,7 +141,6 @@ const CFormCheck = defineComponent({
140141
indeterminate: props.indeterminate,
141142
onChange: (event: InputEvent) => handleChange(event),
142143
type: props.type,
143-
...attrs,
144144
})
145145
}
146146
const formLabel = () => {
@@ -181,6 +181,7 @@ const CFormCheck = defineComponent({
181181
'is-invalid': props.invalid,
182182
'is-valid': props.valid,
183183
},
184+
attrs.class,
184185
],
185186
},
186187
[formControl(), props.label && formLabel()],

0 commit comments

Comments
 (0)