File tree Expand file tree Collapse file tree 5 files changed +13
-5
lines changed
Expand file tree Collapse file tree 5 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 173173 "password_reset_successful" : " Password reset successful" ,
174174 "or" : " Or" ,
175175 "refresh" : " Refresh" ,
176- "input_limit" : " Length cannot exceed {0} characters"
176+ "input_limit" : " Length cannot exceed {0} characters" ,
177+ "file_size_limit_error" : " File size exceeds the limit (maximum {limit})"
177178 },
178179 "dashboard" : {
179180 "open_dashboard" : " Open Dashboard" ,
Original file line number Diff line number Diff line change 173173 "password_reset_successful" : " 비밀번호 재설정 성공" ,
174174 "or" : " 또는" ,
175175 "refresh" : " 새로고침" ,
176- "input_limit" : " 길이는 {0}자에서 {1}자 사이여야 합니다"
176+ "input_limit" : " 길이는 {0}자에서 {1}자 사이여야 합니다" ,
177+ "file_size_limit_error" : " 파일 크기가 제한을 초과했습니다 (최대 {limit})"
177178 },
178179 "dashboard" : {
179180 "open_dashboard" : " 대시보드 열기" ,
Original file line number Diff line number Diff line change 173173 "password_reset_successful" : " 重置密码成功" ,
174174 "or" : " 或者" ,
175175 "refresh" : " 刷新" ,
176- "input_limit" : " 长度在 {0} 到 {1} 个字符"
176+ "input_limit" : " 长度在 {0} 到 {1} 个字符" ,
177+ "file_size_limit_error" : " 文件大小超出限制(最大{limit})"
177178 },
178179 "dashboard" : {
179180 "open_dashboard" : " 打开仪表板" ,
906907 "to_doc" : " 查看 API" ,
907908 "trigger_limit" : " 最多支持创建 {0} 个 API Key"
908909 }
909- }
910+ }
Original file line number Diff line number Diff line change @@ -185,6 +185,11 @@ const uploadImg = (options: any) => {
185185 }
186186}
187187const beforeUpload = (file : any , type : any ) => {
188+ const maxSize = 10 * 1024 * 1024
189+ if (file .size > maxSize ) {
190+ ElMessage .error (t (' common.file_size_limit_error' , { limit: ' 10M' }))
191+ return false
192+ }
188193 let len = fileList .value ?.length
189194 let match = false
190195 file .flag = type
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ const loadData = () => {
2929 item .config = JSON .parse (item .config )
3030 return item
3131 })
32- .filter ((card : any ) => card .type < 10 )
32+ .filter ((card : any ) => card .type < 9 )
3333 })
3434}
3535onMounted (() => {
You can’t perform that action at this time.
0 commit comments