From 1c83d7ca463cdab35e99772582402ce2a5753043 Mon Sep 17 00:00:00 2001
From: TsMask <340112800@qq.com>
Date: Wed, 29 Nov 2023 09:59:36 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E5=B8=AE=E5=8A=A9=E6=96=87=E6=A1=A3?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=A4=9A=E8=AF=AD=E8=A8=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/i18n/locales/en-US.ts | 7 +++++++
src/i18n/locales/zh-CN.ts | 11 +++++++----
src/views/tool/help/index.vue | 16 ++++++++++++----
3 files changed, 26 insertions(+), 8 deletions(-)
diff --git a/src/i18n/locales/en-US.ts b/src/i18n/locales/en-US.ts
index 93df6870..c47e459f 100644
--- a/src/i18n/locales/en-US.ts
+++ b/src/i18n/locales/en-US.ts
@@ -1319,5 +1319,12 @@ export default {
noChange: "No change in interface settings",
},
},
+ tool: {
+ help: {
+ download: "Download",
+ pdfViewer: "In-browser preview",
+ pdfViewerErr: "Sorry, your browser does not support PDF preview!",
+ }
+ },
},
};
diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts
index 02ef0078..5c106a0a 100644
--- a/src/i18n/locales/zh-CN.ts
+++ b/src/i18n/locales/zh-CN.ts
@@ -495,7 +495,6 @@ export default {
},
sub: {
subInfo:'签约信息',
- neTypePlease: '查询网元类型',
neType: 'UDM网元类型',
export: '导出',
exportConfirm: '确认导出全部签约用户数据吗?',
@@ -530,15 +529,12 @@ export default {
ardTip:'接入控制标志(Access-Restriction-Data),可用于区分2G/3G/LTE用户,便于为2G/3G/LTE网络共存时,对不同类型用户进行区分服务',
},
base5G: {
- neTypePlease: '查询网元类型',
neType: 'AMF网元对象',
},
ue: {
- neTypePlease: '查询网元类型',
neType: 'SMF网元对象',
},
ims: {
- neTypePlease: '查询网元类型',
neType: 'IMS网元对象',
},
},
@@ -1323,5 +1319,12 @@ export default {
noChange: "接口设置无变更",
},
},
+ tool: {
+ help: {
+ download: "下载",
+ pdfViewer: "浏览器内预览",
+ pdfViewerErr: "很抱歉,您的浏览器不支持 PDF 预览!",
+ }
+ },
},
};
diff --git a/src/views/tool/help/index.vue b/src/views/tool/help/index.vue
index 08a7079a..7fd32d5c 100644
--- a/src/views/tool/help/index.vue
+++ b/src/views/tool/help/index.vue
@@ -79,7 +79,13 @@ function fnDownload() {
/**系统使用手册跳转 */
function fnClickHelpDoc() {
- window.open(docUrl.value, '_blank');
+ // 浏览器支持 PDF 预览
+ if (navigator.pdfViewerEnabled) {
+ window.open(docUrl.value, '_blank');
+ } else {
+ // 浏览器不支持 PDF 预览
+ alert(t('views.tool.help.pdfViewerErr'));
+ }
}
onMounted(() => {
@@ -104,11 +110,11 @@ onMounted(() => {
- 浏览器内打开
+ {{ t('views.tool.help.pdfViewer') }}
- 下载
+ {{ t('views.tool.help.download') }}
@@ -126,7 +132,9 @@ onMounted(() => {
+
{
:annotations-filter="['Link']"
@annotation="fnAnnotation"
>
-
+