Skip to content

Commit b65a867

Browse files
committed
fix: form class style not work
1 parent 4de7737 commit b65a867

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/form/Form.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ const Form = defineComponent({
9696
}),
9797
Item: FormItem,
9898
emits: ['finishFailed', 'submit', 'finish'],
99-
setup(props, { emit, slots, expose }) {
99+
setup(props, { emit, slots, expose, attrs }) {
100100
const size = useInjectSize(props);
101101
const { prefixCls, direction, form: contextForm } = useConfigInject('form', props);
102102
const requiredMark = computed(() => props.requiredMark === '' || props.requiredMark);
@@ -339,7 +339,7 @@ const Form = defineComponent({
339339

340340
return () => {
341341
return (
342-
<form onSubmit={handleSubmit} class={formClassName.value}>
342+
<form {...attrs} onSubmit={handleSubmit} class={[formClassName.value, attrs.class]}>
343343
{slots.default?.()}
344344
</form>
345345
);

0 commit comments

Comments
 (0)