Skip to content

Commit

Permalink
fix: fix the bug that the form search function is invalid of the exam…
Browse files Browse the repository at this point in the history
…ple-dialog page
  • Loading branch information
snowords committed Mar 21, 2022
1 parent e4b0275 commit 9ec30e7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 28 deletions.
20 changes: 0 additions & 20 deletions .pnpm-debug.log

This file was deleted.

15 changes: 7 additions & 8 deletions src/components/Search/src/Search.vue
Expand Up @@ -63,14 +63,13 @@ const newSchema = computed(() => {
const { register, elFormRef, methods } = useForm()
const search = async () => {
const res = await unref(elFormRef)
?.validate()
?.catch(() => {})
if (res) {
const { getFormData } = methods
const model = await getFormData()
emit('search', model)
}
await unref(elFormRef)?.validate(async (isValid) => {
if (isValid) {
const { getFormData } = methods
const model = await getFormData()
emit('search', model)
}
})
}
const reset = async () => {
Expand Down

0 comments on commit 9ec30e7

Please sign in to comment.