fix:【数据源】当Excel文件过大而无法上传时,提示文件大小超出限制,请修改相关配置文件

This commit is contained in:
taojinlong
2024-12-27 16:53:19 +08:00
committed by taojinlong
parent fdc758178c
commit 2d6ed43e2f
2 changed files with 11 additions and 0 deletions

View File

@@ -218,6 +218,14 @@ service.interceptors.response.use(
if (!error?.response) {
return Promise.reject(error)
}
if (error?.response.status === 413) {
ElMessage({
type: 'error',
message: '文件大小超出限制, 请修改相关配置文件',
showClose: true
})
return
}
const header = error.response?.headers as AxiosHeaders
if (
!error.config.url.startsWith('/xpackComponent/content') &&

View File

@@ -180,6 +180,9 @@ const handleExcelDel = () => {
}
const uploadSuccess = response => {
if (!response) {
return
}
if (response?.code !== 0) {
state.excelData = []
activeTab.value = ''