feat: 帮助文档页面多语言
This commit is contained in:
@@ -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(() => {
|
||||
<a-space :size="12" align="center">
|
||||
<a-button type="default" @click="fnClickHelpDoc()">
|
||||
<template #icon><ToTopOutlined /> </template>
|
||||
浏览器内打开
|
||||
{{ t('views.tool.help.pdfViewer') }}
|
||||
</a-button>
|
||||
<a-button type="primary" @click="fnDownload()">
|
||||
<template #icon><DownloadOutlined /></template>
|
||||
下载
|
||||
{{ t('views.tool.help.download') }}
|
||||
</a-button>
|
||||
</a-space>
|
||||
</a-col>
|
||||
@@ -126,7 +132,9 @@ onMounted(() => {
|
||||
</a-col>
|
||||
<a-col :span="20" class="right">
|
||||
<div class="right-view">
|
||||
<a-spin size="large" style="margin: 50%" v-if="pages === 0" />
|
||||
<VuePDF
|
||||
v-else
|
||||
:pdf="pdf"
|
||||
:page="viewPage"
|
||||
:scale="viewScale"
|
||||
@@ -134,7 +142,7 @@ onMounted(() => {
|
||||
:annotations-filter="['Link']"
|
||||
@annotation="fnAnnotation"
|
||||
>
|
||||
<a-spin style="margin: 50%" />
|
||||
<a-spin size="large" style="margin: 50%" />
|
||||
</VuePDF>
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
Reference in New Issue
Block a user