perf: Optimize Assistant Icon Upload Restrictions

This commit is contained in:
fit2cloud-chenyw
2026-02-04 09:40:58 +08:00
committed by fit2cloud-chenyw
parent e7da338ae7
commit e639e15bd4
5 changed files with 13 additions and 5 deletions
+2 -1
View File
@@ -173,7 +173,8 @@
"password_reset_successful": "Password reset successful",
"or": "Or",
"refresh": "Refresh",
"input_limit": "Length cannot exceed {0} characters"
"input_limit": "Length cannot exceed {0} characters",
"file_size_limit_error": "File size exceeds the limit (maximum {limit})"
},
"dashboard": {
"open_dashboard": "Open Dashboard",
+2 -1
View File
@@ -173,7 +173,8 @@
"password_reset_successful": "비밀번호 재설정 성공",
"or": "또는",
"refresh": "새로고침",
"input_limit": "길이는 {0}자에서 {1}자 사이여야 합니다"
"input_limit": "길이는 {0}자에서 {1}자 사이여야 합니다",
"file_size_limit_error": "파일 크기가 제한을 초과했습니다 (최대 {limit})"
},
"dashboard": {
"open_dashboard": "대시보드 열기",
+3 -2
View File
@@ -173,7 +173,8 @@
"password_reset_successful": "重置密码成功",
"or": "或者",
"refresh": "刷新",
"input_limit": "长度在 {0} 到 {1} 个字符"
"input_limit": "长度在 {0} 到 {1} 个字符",
"file_size_limit_error": "文件大小超出限制(最大{limit})"
},
"dashboard": {
"open_dashboard": "打开仪表板",
@@ -906,4 +907,4 @@
"to_doc": "查看 API",
"trigger_limit": "最多支持创建 {0} 个 API Key"
}
}
}
@@ -185,6 +185,11 @@ const uploadImg = (options: any) => {
}
}
const beforeUpload = (file: any, type: any) => {
const maxSize = 10 * 1024 * 1024
if (file.size > maxSize) {
ElMessage.error(t('common.file_size_limit_error', { limit: '10M' }))
return false
}
let len = fileList.value?.length
let match = false
file.flag = type
+1 -1
View File
@@ -29,7 +29,7 @@ const loadData = () => {
item.config = JSON.parse(item.config)
return item
})
.filter((card: any) => card.type < 10)
.filter((card: any) => card.type < 9)
})
}
onMounted(() => {