ีupdate: ระบบอัปโหลด ถ้าชื่อไฟล์ซ้ำที่มาจากระบบอื่นจะไม่สามารถ อัปโหลดได้
This commit is contained in:
parent
dbab045c49
commit
3bbacf78d6
3 changed files with 64 additions and 14 deletions
|
|
@ -10,6 +10,7 @@ const props = withDefaults(
|
|||
defineProps<{
|
||||
open: boolean
|
||||
error: {
|
||||
fileExistMetadata?: boolean
|
||||
fileExist?: boolean
|
||||
fileName2Long?: boolean
|
||||
}
|
||||
|
|
@ -187,15 +188,20 @@ const file = ref<File | undefined>()
|
|||
? undefined
|
||||
: 'เลือกไฟล์'
|
||||
"
|
||||
:error="!!error.fileExist || !!error.fileName2Long"
|
||||
:error-message="
|
||||
error.fileExist
|
||||
? 'พบไฟล์ชื่อซ้ำในระบบ ไฟล์ชื่อนี้ภายในระบบจะถูกเขียนทับ'
|
||||
: error.fileName2Long
|
||||
? 'ไม่สามารถเพิ่มไฟล์ที่ชื่อยาวเกิน 85 ตัวอักษรได้'
|
||||
: ''
|
||||
:error="
|
||||
!!error.fileExistMetadata ||
|
||||
!!error.fileExist ||
|
||||
!!error.fileName2Long
|
||||
"
|
||||
:error-message="
|
||||
error.fileExistMetadata
|
||||
? 'พบไฟล์ชื่อซ้ำในระบบอื่น'
|
||||
: error.fileExist
|
||||
? 'พบไฟล์ชื่อซ้ำในระบบ ไฟล์ชื่อนี้ภายในระบบจะถูกเขียนทับ'
|
||||
: error.fileName2Long
|
||||
? 'ไม่สามารถเพิ่มไฟล์ที่ชื่อยาวเกิน 85 ตัวอักษรได้'
|
||||
: ''
|
||||
"
|
||||
:disable="disableFields?.includes('file')"
|
||||
id="inputFile"
|
||||
:rules="[
|
||||
(v) => v !== undefined || mode === 'edit' || 'โปรดอัปโหลดไฟล์',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue