|
@@ -47,8 +47,10 @@
|
|
|
type: Object as PropType<FormActionType>,
|
|
|
},
|
|
|
validateFields: {
|
|
|
- type: Function as PropType<(nameList?: NamePath[], options?: ValidateOptions) => Promise<void> >,
|
|
|
- default: null,
|
|
|
+ type: Function as PropType<
|
|
|
+ (nameList?: NamePath[], options?: ValidateOptions) => Promise<void>
|
|
|
+ >,
|
|
|
+ default: null,
|
|
|
},
|
|
|
},
|
|
|
setup(props, { slots }) {
|
|
@@ -246,10 +248,10 @@
|
|
|
props.setFormModel(field, value);
|
|
|
// 这个也要添加
|
|
|
props.validateFields([field], { triggerName: 'change' }).catch(() => {});
|
|
|
- },
|
|
|
- onBlur: () => {
|
|
|
+ },
|
|
|
+ onBlur: () => {
|
|
|
props.validateFields([field], { triggerName: 'blur' }).catch(() => {});
|
|
|
- },
|
|
|
+ },
|
|
|
};
|
|
|
const Comp = componentMap.get(component) as ReturnType<typeof defineComponent>;
|
|
|
|
|
@@ -316,7 +318,14 @@
|
|
|
}
|
|
|
|
|
|
function renderItem() {
|
|
|
- const { itemProps, slot, render, field, suffix, component } = props.schema;
|
|
|
+ const {
|
|
|
+ itemProps = { autoLink: false },
|
|
|
+ slot,
|
|
|
+ render,
|
|
|
+ field,
|
|
|
+ suffix,
|
|
|
+ component,
|
|
|
+ } = props.schema;
|
|
|
const { labelCol, wrapperCol } = unref(itemLabelWidthProp);
|
|
|
const { colon } = props.formProps;
|
|
|
|