fix(useFormEvents): 修复setFieldsValue 方法设置完值后,函数 componentProps丢失formActionType 的bug (#3301)

Co-authored-by: gavin-james <meaganlindesy1258@gmail.com>
This commit is contained in:
林飞 2023-11-20 16:59:05 +08:00 committed by GitHub
parent a9530877c0
commit 82671d0750
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -123,7 +123,7 @@ export function useFormEvents({
const { componentProps } = schema || {}; const { componentProps } = schema || {};
let _props = componentProps as any; let _props = componentProps as any;
if (typeof componentProps === 'function') { if (typeof componentProps === 'function') {
_props = _props({ formModel: unref(formModel) }); _props = _props({ formModel: unref(formModel), formActionType: unref(formElRef) });
} }
const constructValue = tryConstructArray(key, values) || tryConstructObject(key, values); const constructValue = tryConstructArray(key, values) || tryConstructObject(key, values);