From 8c0fe1daf64f6010ce6849af401c046c4e5b503c Mon Sep 17 00:00:00 2001 From: zhangyahui Date: Wed, 15 Apr 2026 10:20:13 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=20=E9=99=90=E5=88=B610=E6=9D=A1?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD&=E9=94=99=E8=AF=AF=E4=BF=A1=E6=81=AFi18n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lang/en.ts | 9 ++++++--- src/lang/zh-cn.ts | 5 ++++- src/views/Preview/index.vue | 14 +++++++------- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/lang/en.ts b/src/lang/en.ts index 7458dd8..a853b50 100644 --- a/src/lang/en.ts +++ b/src/lang/en.ts @@ -269,9 +269,12 @@ export default { total: 'Total Applications Submitted', downloadExcel: 'Download Full Information Table (Excel)', range: 'Set the download range', - startIndex:'start ID', - endIndex:'end ID', + startIndex: 'start ID', + endIndex: 'end ID', download: 'Download', - limit:'Maximum 10 entries can be downloaded at once' + limit: 'Maximum 10 entries can be downloaded at once', + minIndex: 'Minimum ID is 10000', + maxIndex: 'Maximum ID is {maxIndex}', + indexError: 'End ID must be greater than or equal to Start ID' } } diff --git a/src/lang/zh-cn.ts b/src/lang/zh-cn.ts index f0e5a80..db3d07f 100644 --- a/src/lang/zh-cn.ts +++ b/src/lang/zh-cn.ts @@ -261,6 +261,9 @@ export default { startIndex: '起始序号', endIndex: '结束序号', download: '下载', - limit:'一次最多下载10条数据' + limit:'一次最多下载10条数据', + minIndex: '最小序号为10000', + maxIndex: '最大序号为 {maxIndex}', + indexError: '结束序号必须大于或等于起始序号' } } diff --git a/src/views/Preview/index.vue b/src/views/Preview/index.vue index 2f253ee..d368c7a 100644 --- a/src/views/Preview/index.vue +++ b/src/views/Preview/index.vue @@ -38,7 +38,7 @@ {{ $t('Preview.download') }} -

{{ errorMsg }}

+

{{ $t(errorMsg, { maxIndex }) }}

@@ -75,7 +75,7 @@ const isValid = computed(() => { start > 0 && end >= start && end <= maxIndex.value && - subtract(end, start) <= 10 + subtract(end, start) <= 9 ) }) @@ -83,10 +83,10 @@ const isValid = computed(() => { const errorMsg = computed(() => { const { start, end } = range.value if (start === null || end === null) return '' - if (start < 10000) return '起始序号必须大于 10000' - if (end < start) return '结束序号不能小于起始序号' - if (subtract(end, start) > 10) return '起始序号和结束序号相差不能超过10' - if (end > maxIndex.value) return `结束序号不能超过最大值 ${maxIndex.value}` + if (start < 10000) return 'Preview.minIndex' + if (end < start) return 'Preview.indexError' + if (subtract(end, start) > 9) return 'Preview.limit' + if (end > maxIndex.value) return `Preview.maxIndex` return '' }) @@ -274,7 +274,7 @@ onMounted(() => { border-color: #6c5ce7; box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.1); } -.tips{ +.tips { text-align: center; margin-bottom: 1.2rem; font-size: 1.4rem;