diff --git a/frontend/src/components/pure/ms-upload/index.vue b/frontend/src/components/pure/ms-upload/index.vue index 158ff470c7..c7ebf7380f 100644 --- a/frontend/src/components/pure/ms-upload/index.vue +++ b/frontend/src/components/pure/ms-upload/index.vue @@ -108,6 +108,7 @@ isAllScreen: false, cutHeight: 110, allowRepeat: false, + sizeUnit: 'MB', }); const emit = defineEmits(['update:fileList', 'change']); @@ -141,7 +142,7 @@ const maxSize = props.maxSize || appStore.getFileMaxSize; const _maxSize = props.sizeUnit === 'MB' ? maxSize * 1024 * 1024 : maxSize * 1024; if (props.isLimit && file.size > _maxSize) { - Message.warning(t('ms.upload.overSize')); + Message.warning(t('ms.upload.overSize', { size: maxSize, unit: props.sizeUnit })); return Promise.resolve(false); } if (!props.multiple) { diff --git a/frontend/src/components/pure/ms-upload/locale/en-US.ts b/frontend/src/components/pure/ms-upload/locale/en-US.ts index 6e0de0d1b0..60ff84c108 100644 --- a/frontend/src/components/pure/ms-upload/locale/en-US.ts +++ b/frontend/src/components/pure/ms-upload/locale/en-US.ts @@ -1,6 +1,6 @@ export default { 'ms.upload.changeFile': 'Change file', - 'ms.upload.overSize': 'The file size exceeds the limit, please reselect the file', + 'ms.upload.overSize': 'The file size limit is {size} {unit}, please reselect the file', 'ms.upload.importModalDragText': 'Drag or click this area to select a file', 'ms.upload.importModalFileTip': 'Only {type} format files are supported, and the file size does not exceed {size} MB', 'ms.upload.waiting': 'Waiting', diff --git a/frontend/src/components/pure/ms-upload/locale/zh-CN.ts b/frontend/src/components/pure/ms-upload/locale/zh-CN.ts index c93c8c46b1..7453e1a30e 100644 --- a/frontend/src/components/pure/ms-upload/locale/zh-CN.ts +++ b/frontend/src/components/pure/ms-upload/locale/zh-CN.ts @@ -1,6 +1,6 @@ export default { 'ms.upload.changeFile': '更改文件', - 'ms.upload.overSize': '文件大小超出限制,请重新选择文件', + 'ms.upload.overSize': '文件大小限制为 {size} {unit},请重新选择文件', 'ms.upload.importModalDragText': '拖拽或点击此区域选择文件', 'ms.upload.importModalFileTip': '只支持 {type} 格式文件,文件大小不超过 {size} MB', 'ms.upload.waiting': '等待上传', diff --git a/frontend/src/views/bug-management/components/bugDetailTab.vue b/frontend/src/views/bug-management/components/bugDetailTab.vue index da145a6279..b77419887c 100644 --- a/frontend/src/views/bug-management/components/bugDetailTab.vue +++ b/frontend/src/views/bug-management/components/bugDetailTab.vue @@ -180,7 +180,9 @@ v-model:file-list="fileList" accept="none" :auto-upload="false" - :sub-text="acceptType === 'jar' ? '' : t('project.fileManagement.normalFileSubText', { size: 50 })" + :sub-text=" + acceptType === 'jar' ? '' : t('project.fileManagement.normalFileSubText', { size: appStore.getFileMaxSize }) + " multiple draggable size-unit="MB" diff --git a/frontend/src/views/bug-management/edit.vue b/frontend/src/views/bug-management/edit.vue index 3a2f5cabe4..d2fe10e89a 100644 --- a/frontend/src/views/bug-management/edit.vue +++ b/frontend/src/views/bug-management/edit.vue @@ -161,7 +161,9 @@ v-model:file-list="fileList" accept="none" :auto-upload="false" - :sub-text="acceptType === 'jar' ? '' : t('project.fileManagement.normalFileSubText', { size: 50 })" + :sub-text=" + acceptType === 'jar' ? '' : t('project.fileManagement.normalFileSubText', { size: appStore.getFileMaxSize }) + " multiple draggable size-unit="MB" diff --git a/frontend/src/views/case-management/caseManagementFeature/components/caseTemplateDetail.vue b/frontend/src/views/case-management/caseManagementFeature/components/caseTemplateDetail.vue index 4dff3697d8..b241225312 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/caseTemplateDetail.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/caseTemplateDetail.vue @@ -208,7 +208,9 @@ v-model:file-list="fileList" accept="none" :auto-upload="false" - :sub-text="acceptType === 'jar' ? '' : t('project.fileManagement.normalFileSubText', { size: 50 })" + :sub-text=" + acceptType === 'jar' ? '' : t('project.fileManagement.normalFileSubText', { size: appStore.getFileMaxSize }) + " multiple draggable size-unit="MB" diff --git a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabDetail.vue b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabDetail.vue index 27937e81a1..89a48a9d25 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabDetail.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabDetail.vue @@ -203,7 +203,9 @@ v-model:file-list="fileList" accept="none" :auto-upload="false" - :sub-text="acceptType === 'jar' ? '' : t('project.fileManagement.normalFileSubText', { size: 50 })" + :sub-text=" + acceptType === 'jar' ? '' : t('project.fileManagement.normalFileSubText', { size: appStore.getFileMaxSize }) + " multiple draggable size-unit="MB" diff --git a/frontend/src/views/project-management/fileManagement/components/rightBox.vue b/frontend/src/views/project-management/fileManagement/components/rightBox.vue index c61a225a1c..9dd473034e 100644 --- a/frontend/src/views/project-management/fileManagement/components/rightBox.vue +++ b/frontend/src/views/project-management/fileManagement/components/rightBox.vue @@ -198,7 +198,9 @@ v-model:file-list="fileList" :accept="acceptType" :auto-upload="false" - :sub-text="acceptType === 'jar' ? '' : t('project.fileManagement.normalFileSubText', { size: 50 })" + :sub-text=" + acceptType === 'jar' ? '' : t('project.fileManagement.normalFileSubText', { size: appStore.getFileMaxSize }) + " multiple draggable size-unit="MB"