Skip to content

Commit

Permalink
fix(design): tDesign form 使用reset
Browse files Browse the repository at this point in the history
fix #522
  • Loading branch information
roymondchen committed Jul 6, 2023
1 parent 1710168 commit c9b9e76
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/design/src/Form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ defineExpose({
},
resetFields() {
return form.value?.resetFields();
if (typeof form.value?.resetFields === 'function') {
return form.value?.resetFields();
}
if (typeof form.value?.reset === 'function') {
return form.value?.reset();
}
},
});
</script>

0 comments on commit c9b9e76

Please sign in to comment.