--中英文国际化

This commit is contained in:
lai
2023-11-09 20:22:57 +08:00
parent c71e56a937
commit 22f2cd9a2e
6 changed files with 54 additions and 53 deletions

View File

@@ -320,7 +320,7 @@ function fnDownloadFile(row: Record<string, any>) {
downloadNeSoftware(toRaw(row)).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
content: `已完成下载`,
content: t('common.msgSuccess', { msg: t('common.downloadText') }),
key,
duration: 2,
});
@@ -374,7 +374,7 @@ function fnRecordDelete(row: Record<string, any>) {
function fnGetList(pageNum?: number) {
if (tableState.loading) return;
tableState.loading = true;
if(pageNum){
if (pageNum) {
queryParams.pageNum = pageNum;
}
listNeSoftware(toRaw(queryParams)).then(res => {
@@ -529,7 +529,8 @@ function fnBeforeUploadFile(file: FileType) {
const fileName = file.name;
const suff = fileName.substring(fileName.lastIndexOf('.'));
if (!['.deb', '.rpm'].includes(suff)) {
message.error('只支持上传文件格式(.deb、.rpm', 3);
message.error(t('views.configManage.softwareManage.onlyAble',{fileText:'(.deb、.rpm)'}), 3);
return false;
}
return true;
@@ -551,7 +552,7 @@ function fnBeforeUploadCms(file: FileType) {
const fileName = file.name;
const suff = fileName.substring(fileName.lastIndexOf('.'));
if (!['.cms'].includes(suff)) {
message.error('只支持上传文件格式(.cms', 3);
message.error(t('views.configManage.softwareManage.onlyAble',{fileText:'(.cms)'}), 3);
return false;
}
return true;
@@ -579,7 +580,7 @@ onMounted(() => {
}
} else {
message.warning({
content: `暂无网元列表数据`,
content: t('views.configManage.softwareManage.nullData'),
duration: 2,
});
}