feat: 新增系统设置帮助文档/官网设置
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user