fix: 修复帮助文档跳转404
This commit is contained in:
@@ -1,16 +1,13 @@
|
||||
<script lang="ts" setup>
|
||||
import { Modal, message } from 'ant-design-vue/lib';
|
||||
import { onMounted, reactive } from 'vue';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { transferHelpDoc } from '@/api/index';
|
||||
import { uploadFileChunk } from '@/api/tool/file';
|
||||
import { FileType } from 'ant-design-vue/lib/upload/interface';
|
||||
import { UploadRequestOption } from 'ant-design-vue/lib/vc-upload/interface';
|
||||
import { sessionGet } from '@/utils/cache-session-utils';
|
||||
import { useRouter } from 'vue-router';
|
||||
const appStore = useAppStore();
|
||||
const router = useRouter();
|
||||
const { t, currentLocale, optionsLocale } = useI18n();
|
||||
|
||||
@@ -99,6 +96,16 @@ function fnSave() {
|
||||
});
|
||||
}
|
||||
|
||||
/**系统使用手册跳转 */
|
||||
function fnClickHelpDoc(language?: string) {
|
||||
const routeData = router.resolve({ name: 'HelpDoc' });
|
||||
let href = routeData.href;
|
||||
if (language) {
|
||||
href = `${routeData.href}?language=${language}`;
|
||||
}
|
||||
window.open(href, '_blank');
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
state.language = currentLocale.value;
|
||||
});
|
||||
@@ -168,11 +175,7 @@ onMounted(() => {
|
||||
{{ opt.label }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
<a-button
|
||||
type="link"
|
||||
:href="'/help?language=' + state.language"
|
||||
target="_blank"
|
||||
>
|
||||
<a-button type="link" @click="fnClickHelpDoc(state.language)">
|
||||
<template #icon>
|
||||
<QuestionCircleOutlined />
|
||||
{{ t('views.system.setting.sysHelpDocOpen') }}
|
||||
|
||||
Reference in New Issue
Block a user