fix: fileName2Long
This commit is contained in:
parent
e6d33873b0
commit
6cb1a67e4f
1 changed files with 8 additions and 2 deletions
|
|
@ -67,6 +67,10 @@ function checkFileExist(name: string, except?: string) {
|
|||
)
|
||||
}
|
||||
|
||||
function checkFileName2Long(name: string, except?: string) {
|
||||
return Boolean(name.length > 85)
|
||||
}
|
||||
|
||||
async function submitFileForm(
|
||||
value: {
|
||||
mode: 'create' | 'edit'
|
||||
|
|
@ -130,8 +134,10 @@ async function submitFileForm(
|
|||
v-model:category="fileFormData.category"
|
||||
@reset="() => (fileFormError = {})"
|
||||
@filechange="
|
||||
(name: string) =>
|
||||
(fileFormError.fileExist = checkFileExist(name, fileNameLabel))
|
||||
(name: string) => {
|
||||
;(fileFormError.fileExist = checkFileExist(name, fileNameLabel)),
|
||||
(fileFormError.fileName2Long = checkFileName2Long(name, fileNameLabel))
|
||||
}
|
||||
"
|
||||
@submit="submitFileForm"
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue