fix: 修复帮助文档跳转404
This commit is contained in:
@@ -120,6 +120,16 @@ function fnComponentSetName(component: any, to: any) {
|
||||
// 清空导航栏标签
|
||||
tabsStore.clear();
|
||||
|
||||
/**系统使用手册跳转 */
|
||||
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');
|
||||
}
|
||||
|
||||
/**
|
||||
* 国际化翻译转换
|
||||
*/
|
||||
@@ -285,9 +295,8 @@ document.addEventListener('visibilitychange', function () {
|
||||
</a-button>
|
||||
<a-button
|
||||
type="link"
|
||||
href="/help"
|
||||
target="_blank"
|
||||
size="small"
|
||||
@click="fnClickHelpDoc()"
|
||||
v-if="appStore.getHelpDoc !== '#'"
|
||||
>
|
||||
{{ t('loayouts.basic.helpDoc') }}
|
||||
|
||||
@@ -32,6 +32,16 @@ function fnClickAlarm() {
|
||||
router.push({ path: '/faultManage/active-alarm' });
|
||||
}
|
||||
|
||||
/**系统使用手册跳转 */
|
||||
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');
|
||||
}
|
||||
|
||||
/**改变多语言 */
|
||||
function fnChangeLocale(e: any) {
|
||||
changeLocale(e.key);
|
||||
@@ -54,7 +64,7 @@ function fnChangeLocale(e: any) {
|
||||
|
||||
<a-tooltip placement="bottom" v-if="appStore.getHelpDoc !== '#'">
|
||||
<template #title>{{ t('loayouts.rightContent.helpDoc') }}</template>
|
||||
<a-button type="text" href="/help" target="_blank">
|
||||
<a-button type="text" @click="fnClickHelpDoc()">
|
||||
<template #icon>
|
||||
<QuestionCircleOutlined />
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user