fix: remove form warning in some case #4531

pull/4543/head
tangjinzhou 2021-08-18 20:26:07 +08:00
parent baaccd574e
commit 6ce295d490
2 changed files with 11 additions and 9 deletions

View File

@ -318,14 +318,16 @@ const Form = defineComponent({
e.preventDefault();
e.stopPropagation();
emit('submit', e);
const res = validateFields();
res
.then(values => {
emit('finish', values);
})
.catch(errors => {
handleFinishFailed(errors);
});
if (props.model) {
const res = validateFields();
res
.then(values => {
emit('finish', values);
})
.catch(errors => {
handleFinishFailed(errors);
});
}
};
expose({

2
v2-doc

@ -1 +1 @@
Subproject commit 7a7b52df8b3b69d8b1a8b8dcd96e1b0f7bb3f8c9
Subproject commit 2e39bc81a84e2cfa90e8863e8f18d5a3d3ab1995