fix: use fileName2Long
This commit is contained in:
parent
2ca3355366
commit
ea1827f65b
1 changed files with 8 additions and 2 deletions
|
|
@ -30,6 +30,7 @@ const {
|
|||
updateFile,
|
||||
deleteFile,
|
||||
checkFile,
|
||||
checkFileName,
|
||||
refaceFile,
|
||||
} = useTreeDataStore()
|
||||
|
||||
|
|
@ -61,7 +62,7 @@ const fileFormData = ref<{
|
|||
category?: string[]
|
||||
}>({})
|
||||
const fileFormType = ref<'edit' | 'create'>('create')
|
||||
const fileFormError = ref<{ fileExist?: boolean }>({})
|
||||
const fileFormError = ref<{ fileExist?: boolean; fileName2Long?: boolean }>({})
|
||||
const fileExistNotification = ref<boolean>(false)
|
||||
|
||||
function triggerFolderDelete(pathname: string) {
|
||||
|
|
@ -386,7 +387,12 @@ async function submitFileForm(
|
|||
v-model:keyword="fileFormData.keyword"
|
||||
v-model:category="fileFormData.category"
|
||||
@reset="() => (fileFormError = {})"
|
||||
@filechange="(name: string) => (fileFormError.fileExist = checkFile(name))"
|
||||
@filechange="
|
||||
(name: string) => (
|
||||
(fileFormError.fileExist = checkFile(name)),
|
||||
(fileFormError.fileName2Long = checkFileName(name))
|
||||
)
|
||||
"
|
||||
@submit="submitFileForm"
|
||||
/>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue