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:keyword',
|
||||||
'update:category',
|
'update:category',
|
||||||
'filechange',
|
'filechange',
|
||||||
|
'reset',
|
||||||
'submit',
|
'submit',
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
@ -50,6 +51,7 @@ function reset() {
|
||||||
emit('update:description', '')
|
emit('update:description', '')
|
||||||
emit('update:keyword', '')
|
emit('update:keyword', '')
|
||||||
emit('update:category', '')
|
emit('update:category', '')
|
||||||
|
emit('reset')
|
||||||
}
|
}
|
||||||
|
|
||||||
function submit() {
|
function submit() {
|
||||||
|
|
@ -111,7 +113,7 @@ const file = ref<File | undefined>()
|
||||||
:model-value="open"
|
:model-value="open"
|
||||||
@update:model-value="(v) => $emit('update:open', v)"
|
@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 class="q-mb-md q-pa-none">
|
||||||
<q-toolbar-title>
|
<q-toolbar-title>
|
||||||
<span class="text-weight-bold" v-if="mode === 'create'">
|
<span class="text-weight-bold" v-if="mode === 'create'">
|
||||||
|
|
|
||||||
|
|
@ -183,10 +183,7 @@ async function submitFileForm(
|
||||||
{{ DEPT_NAME[currentDept] }}
|
{{ DEPT_NAME[currentDept] }}
|
||||||
</div>
|
</div>
|
||||||
<div class="grid q-mt-md">
|
<div class="grid q-mt-md">
|
||||||
<div
|
<div v-for="value in currentFolder" :data-pathname="value.pathname">
|
||||||
v-for="(value) in currentFolder"
|
|
||||||
:data-pathname="value.pathname"
|
|
||||||
>
|
|
||||||
<div
|
<div
|
||||||
:style="{
|
:style="{
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
|
|
@ -388,6 +385,7 @@ async function submitFileForm(
|
||||||
v-model:description="fileFormData.description"
|
v-model:description="fileFormData.description"
|
||||||
v-model:keyword="fileFormData.keyword"
|
v-model:keyword="fileFormData.keyword"
|
||||||
v-model:category="fileFormData.category"
|
v-model:category="fileFormData.category"
|
||||||
|
@reset="() => (fileFormError = {})"
|
||||||
@filechange="(name: string) => (fileFormError.fileExist = checkFile(name))"
|
@filechange="(name: string) => (fileFormError.fileExist = checkFile(name))"
|
||||||
@submit="submitFileForm"
|
@submit="submitFileForm"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -471,6 +471,7 @@ const onRowClick = (evt: Event, row: TreeDataFolder, index: number) => {
|
||||||
v-model:description="fileFormData.description"
|
v-model:description="fileFormData.description"
|
||||||
v-model:keyword="fileFormData.keyword"
|
v-model:keyword="fileFormData.keyword"
|
||||||
v-model:category="fileFormData.category"
|
v-model:category="fileFormData.category"
|
||||||
|
@reset="() => (fileFormError = {})"
|
||||||
@filechange="(name: string) => (fileFormError.fileExist = checkFile(name))"
|
@filechange="(name: string) => (fileFormError.fileExist = checkFile(name))"
|
||||||
@submit="submitFileForm"
|
@submit="submitFileForm"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue