fix: error message still appear after close
This commit is contained in:
parent
534be038f6
commit
1115d10d44
3 changed files with 6 additions and 5 deletions
|
|
@ -34,6 +34,7 @@ const emit = defineEmits([
|
|||
'update:keyword',
|
||||
'update:category',
|
||||
'filechange',
|
||||
'reset',
|
||||
'submit',
|
||||
])
|
||||
|
||||
|
|
@ -50,6 +51,7 @@ function reset() {
|
|||
emit('update:description', '')
|
||||
emit('update:keyword', '')
|
||||
emit('update:category', '')
|
||||
emit('reset')
|
||||
}
|
||||
|
||||
function submit() {
|
||||
|
|
@ -111,7 +113,7 @@ const file = ref<File | undefined>()
|
|||
:model-value="open"
|
||||
@update:model-value="(v) => $emit('update:open', v)"
|
||||
>
|
||||
<q-form @submit.prevent="submit">
|
||||
<q-form @submit.prevent="submit" v-if="open">
|
||||
<q-toolbar class="q-mb-md q-pa-none">
|
||||
<q-toolbar-title>
|
||||
<span class="text-weight-bold" v-if="mode === 'create'">
|
||||
|
|
|
|||
|
|
@ -183,10 +183,7 @@ async function submitFileForm(
|
|||
{{ DEPT_NAME[currentDept] }}
|
||||
</div>
|
||||
<div class="grid q-mt-md">
|
||||
<div
|
||||
v-for="(value) in currentFolder"
|
||||
:data-pathname="value.pathname"
|
||||
>
|
||||
<div v-for="value in currentFolder" :data-pathname="value.pathname">
|
||||
<div
|
||||
:style="{
|
||||
position: 'relative',
|
||||
|
|
@ -388,6 +385,7 @@ async function submitFileForm(
|
|||
v-model:description="fileFormData.description"
|
||||
v-model:keyword="fileFormData.keyword"
|
||||
v-model:category="fileFormData.category"
|
||||
@reset="() => (fileFormError = {})"
|
||||
@filechange="(name: string) => (fileFormError.fileExist = checkFile(name))"
|
||||
@submit="submitFileForm"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -471,6 +471,7 @@ const onRowClick = (evt: Event, row: TreeDataFolder, index: number) => {
|
|||
v-model:description="fileFormData.description"
|
||||
v-model:keyword="fileFormData.keyword"
|
||||
v-model:category="fileFormData.category"
|
||||
@reset="() => (fileFormError = {})"
|
||||
@filechange="(name: string) => (fileFormError.fileExist = checkFile(name))"
|
||||
@submit="submitFileForm"
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue