From 04951cefbd1edb34daeb3a584d2191f6d46d2ed1 Mon Sep 17 00:00:00 2001 From: PZ688 Date: Fri, 28 Feb 2025 18:19:00 +0800 Subject: [PATCH] =?UTF-8?q?refalactor:=E5=9B=BD=E9=99=85=E5=8C=96=E5=89=8D?= =?UTF-8?q?=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Web/src/components/table/importData.vue | 12 ++++---- Web/src/components/table/index.vue | 34 ++++++++++++----------- Web/src/components/table/modifyRecord.vue | 25 +++++++++-------- Web/src/components/table/search.vue | 21 ++++++++------ Web/src/components/table/tableEditor.vue | 12 ++++++-- 5 files changed, 60 insertions(+), 44 deletions(-) diff --git a/Web/src/components/table/importData.vue b/Web/src/components/table/importData.vue index 24b0bf97..452d547d 100644 --- a/Web/src/components/table/importData.vue +++ b/Web/src/components/table/importData.vue @@ -4,18 +4,18 @@ - 模板 + {{ t('list.template') }} @@ -23,7 +23,7 @@ @@ -35,7 +35,9 @@ import type { UploadInstance, UploadProps, UploadRawFile, UploadRequestOptions } import { ElUpload, ElMessage, genFileId } from 'element-plus'; import { downloadStreamFile } from '/@/utils/download'; import { reactive, ref } from 'vue'; +import { useI18n } from 'vue-i18n'; +const { t } = useI18n(); const uploadRef = ref(); const state = reactive({ isShowDialog: false, @@ -80,7 +82,7 @@ const download = () => { props .download() .then((res: any) => downloadStreamFile(res)) - .catch((res: any) => ElMessage.error('下载错误: ' + res)); + .catch((res: any) => ElMessage.error(`${t('list.downloadError')}: ${res}`)); }; // 导出对象 diff --git a/Web/src/components/table/index.vue b/Web/src/components/table/index.vue index 4f590577..2c625eea 100644 --- a/Web/src/components/table/index.vue +++ b/Web/src/components/table/index.vue @@ -5,7 +5,7 @@