style: 网元相关页面多语言翻译

This commit is contained in:
TsMask
2024-05-24 09:41:56 +08:00
parent f94b1ef44a
commit 6470effbda
3 changed files with 9 additions and 10 deletions

View File

@@ -362,7 +362,7 @@ onMounted(() => {});
<template #icon>
<UploadOutlined />
</template>
Upload
{{ t('views.ne.neLicense.upload') }}
</a-button>
</a-upload>
</a-form-item>

View File

@@ -111,14 +111,15 @@ function fnModalCancel() {
/**表单上传前检查或转换压缩 */
function fnBeforeUploadFile(file: FileType) {
if (modalState.confirmLoading) return false;
const fileName = file.name;
if (!fileName.endsWith('.ini')) {
message.error('只支持上传文件格式 .ini', 3);
if (!file.name.endsWith('.ini')) {
const msg = `${t('components.UploadModal.onlyAllow')} .ini`;
message.error(msg, 3);
return Upload.LIST_IGNORE;
}
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isLt2M) {
message.error('文件必须小于2MB', 3);
const isLt3M = file.size / 1024 / 1024 < 3;
if (!isLt3M) {
const msg = `${t('components.UploadModal.allowFilter')} 3MB`;
message.error(msg, 3);
return Upload.LIST_IGNORE;
}
return true;

View File

@@ -254,9 +254,7 @@ function fnRecordState(row: Record<string, any>) {
if (modalState.confirmLoading) return;
Modal.confirm({
title: t('common.tipTitle'),
content: t('views.ne.neLicense.reloadTip', {
txt: `${row.neType} ${row.neId}`,
}),
content: t('views.ne.neLicense.reloadTip'),
onOk() {
modalState.confirmLoading = true;
const hide = message.loading(t('common.loading'), 0);