fix: 移除change事件里无用的报错

This commit is contained in:
gaoyunqi
2025-06-10 16:00:30 +08:00
parent 792b78df1d
commit 2d41d13fe4

View File

@ -5,7 +5,6 @@
<Row v-show="getIsShow(schema)" :align="(schema.componentProps as any).align" :gutter="(schema.componentProps as any).gutter ?? 0" :justify="(schema.componentProps as any).justify" type="flex"> <Row v-show="getIsShow(schema)" :align="(schema.componentProps as any).align" :gutter="(schema.componentProps as any).gutter ?? 0" :justify="(schema.componentProps as any).justify" type="flex">
<Col v-for="(col, colIndex) in schema.children" :key="colIndex" :span="col.span"> <Col v-for="(col, colIndex) in schema.children" :key="colIndex" :span="col.span">
<template v-for="childSchema in col.list" :key="childSchema.field"> <template v-for="childSchema in col.list" :key="childSchema.field">
<SimpleFormItem v-if="showComponent(childSchema)" v-model:value="formModel![childSchema.field]" :form-api="formApi" :isWorkFlow="isWorkFlow" :label-col="labelCol" :refreshFieldObj="refreshFieldObj" :schema="childSchema" /> <SimpleFormItem v-if="showComponent(childSchema)" v-model:value="formModel![childSchema.field]" :form-api="formApi" :isWorkFlow="isWorkFlow" :label-col="labelCol" :refreshFieldObj="refreshFieldObj" :schema="childSchema" />
</template> </template>
</Col> </Col>
@ -85,7 +84,7 @@
:wrapperCol="itemLabelWidthProp.wrapperCol" :wrapperCol="itemLabelWidthProp.wrapperCol"
> >
<template v-if="getDisable && readonlySupport(schema.component)"> <template v-if="getDisable && readonlySupport(schema.component)">
<readonly :schema="schema" :model="formModel"/> <readonly :model="formModel" :schema="schema" />
<component <component
:is="componentMap.get(schema.component)" :is="componentMap.get(schema.component)"
v-show="false" v-show="false"
@ -169,7 +168,7 @@
<readonly :schema="schema" :value="formModel![schema.field]" /> <readonly :schema="schema" :value="formModel![schema.field]" />
</template> </template>
<template v-else> <template v-else>
<component :is="defaultComponent(schema)" :key="refreshFieldObj[schema.field]" v-model:value="formModel![schema.field]" :disabled="getDisable" :size="formProps?.size" v-bind="getComponentsProps" :formData="formModel"/> <component :is="defaultComponent(schema)" :key="refreshFieldObj[schema.field]" v-model:value="formModel![schema.field]" :disabled="getDisable" :formData="formModel" :size="formProps?.size" v-bind="getComponentsProps" />
</template> </template>
</FormItem> </FormItem>
</template> </template>
@ -291,7 +290,7 @@
let field = camelCaseString(item); let field = camelCaseString(item);
if (field) cloneFormModel[field] = cloneFormModel[item]; if (field) cloneFormModel[field] = cloneFormModel[item];
} }
event(props.schema, isCamelCase ? cloneFormModel : formModel, props.formApi, {formData, value, selectedOptions, allSchemas: allSchemas}); event(props.schema, isCamelCase ? cloneFormModel : formModel, props.formApi, { value, selectedOptions, allSchemas: allSchemas });
if (isCamelCase) { if (isCamelCase) {
for (let item in formModel) { for (let item in formModel) {