feat: 新增系统设置帮助文档/官网设置

This commit is contained in:
TsMask
2023-11-23 15:04:46 +08:00
parent 12499e78ea
commit c1c6500df2
13 changed files with 493 additions and 55 deletions

View File

@@ -1,13 +1,38 @@
<script lang="ts" setup>
import LinkiFrame from '@/components/LinkiFrame/index.vue';
import { ref } from 'vue';
import useAppStore from '@/store/modules/app';
import useI18n from '@/hooks/useI18n';
import { onMounted, ref } from 'vue';
import { useRoute } from 'vue-router';
const { t } = useI18n();
const appStore = useAppStore();
const route = useRoute();
const docUrl = appStore.getHelpDoc;
const height = ref<string>(document.documentElement.clientHeight + 'px');
/**
* 国际化翻译转换
*/
function fnLocale() {
let title = route.meta.title as string;
if (title.indexOf('router.') !== -1) {
title = t(title);
}
appStore.setTitle(title);
}
const url = ref<string>('/omc_help_doc-v5.0.pdf');
onMounted(() => {
fnLocale();
});
</script>
<template>
<div>
<LinkiFrame :src="url"></LinkiFrame>
<a-spin style="margin: 0 50%" v-if="docUrl === '#'" />
<div :style="'height:' + height" v-else>
<iframe
:src="docUrl"
frameborder="no"
style="width: 100%; height: 100%"
scrolling="auto"
></iframe>
</div>
</template>