From 30b3ee5c89c31cb5794faab40e800c36507d258a Mon Sep 17 00:00:00 2001 From: bowen <54492610+jiaowoxiaobala@users.noreply.github.com> Date: 星期二, 10 十月 2023 21:06:16 +0800 Subject: [PATCH] chore: fix type:check error (#3126) --- src/components/Form/src/BasicForm.vue | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/components/Form/src/BasicForm.vue b/src/components/Form/src/BasicForm.vue index bcc1110..89e6f4f 100644 --- a/src/components/Form/src/BasicForm.vue +++ b/src/components/Form/src/BasicForm.vue @@ -43,7 +43,7 @@ import type { Ref } from 'vue'; import { defineComponent, reactive, ref, computed, unref, onMounted, watch, nextTick } from 'vue'; - import { Form, Row } from 'ant-design-vue'; + import { Form, Row, type FormProps as AntFormProps } from 'ant-design-vue'; import FormItem from './components/FormItem.vue'; import FormAction from './components/FormAction.vue'; @@ -112,7 +112,9 @@ }; }); - const getBindValue = computed(() => ({ ...attrs, ...props, ...unref(getProps) })); + const getBindValue = computed( + () => ({ ...attrs, ...props, ...unref(getProps) }) as AntFormProps, + ); const getSchema = computed((): FormSchema[] => { const schemas: FormSchema[] = unref(schemaRef) || (unref(getProps).schemas as any); @@ -303,7 +305,10 @@ formActionType: formActionType as any, setFormModel, getFormClass, - getFormActionBindProps: computed(() => ({ ...getProps.value, ...advanceState })), + getFormActionBindProps: computed( + () => + ({ ...getProps.value, ...advanceState }) as InstanceType<typeof FormAction>['$props'], + ), fieldsIsAdvancedMap, ...formActionType, }; -- Gitblit v1.8.0