fix: fixed an error in the form onChange within Naive (#4558)

* fix: fixed an error in the form onChange within Naive

* chore: update
This commit is contained in:
Vben
2024-10-03 14:22:18 +08:00
committed by GitHub
parent 64428b9b11
commit 0cd865e211
12 changed files with 128 additions and 65 deletions

View File

@@ -4,7 +4,8 @@ import type {
VbenFormProps,
} from '@vben/common-ui';
import { type Component, h, type SetupContext } from 'vue';
import type { Component, SetupContext } from 'vue';
import { h } from 'vue';
import { setupVbenForm, useVbenForm as useForm, z } from '@vben/common-ui';
import { $t } from '@vben/locales';
@@ -63,7 +64,7 @@ const withDefaultPlaceholder = <T extends Component>(
) => {
return (props: any, { attrs, slots }: Omit<SetupContext, 'expose'>) => {
const placeholder = props?.placeholder || $t(`placeholder.${type}`);
return h(component, { ...props, attrs, placeholder }, slots);
return h(component, { ...props, ...attrs, placeholder }, slots);
};
};