Skip to content

Commit

Permalink
fix: form class style not work
Browse files Browse the repository at this point in the history
  • Loading branch information
tangjinzhou committed Jun 7, 2021
1 parent 4de7737 commit b65a867
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/form/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const Form = defineComponent({
}),
Item: FormItem,
emits: ['finishFailed', 'submit', 'finish'],
setup(props, { emit, slots, expose }) {
setup(props, { emit, slots, expose, attrs }) {
const size = useInjectSize(props);
const { prefixCls, direction, form: contextForm } = useConfigInject('form', props);
const requiredMark = computed(() => props.requiredMark === '' || props.requiredMark);
Expand Down Expand Up @@ -339,7 +339,7 @@ const Form = defineComponent({

return () => {
return (
<form onSubmit={handleSubmit} class={formClassName.value}>
<form {...attrs} onSubmit={handleSubmit} class={[formClassName.value, attrs.class]}>
{slots.default?.()}
</form>
);
Expand Down

0 comments on commit b65a867

Please sign in to comment.