mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 13:32:18 +08:00
fix(系统设置): 上传字体文件后缀会区分大小写,建议优化
This commit is contained in:
@@ -79,14 +79,14 @@ defineExpose({
|
||||
})
|
||||
|
||||
const beforeAvatarUpload = rawFile => {
|
||||
if (!rawFile.name.endsWith('.ttf')) {
|
||||
if (!rawFile.name.toLocaleLowerCase().endsWith('.ttf')) {
|
||||
ElMessage.error(t('system.in_ttf_format'))
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
const onChange = file => {
|
||||
if (file.raw?.name.endsWith('.ttf')) {
|
||||
if (file.raw?.name?.toLocaleLowerCase().endsWith('.ttf')) {
|
||||
state.fileList = file
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user