fix: 对使用手册,官网进行限制

This commit is contained in:
TsMask
2024-07-24 18:10:38 +08:00
parent b80bae0126
commit c1f34f56ac
4 changed files with 51 additions and 61 deletions

View File

@@ -343,7 +343,7 @@ onUnmounted(() => {
:href="appStore.officialUrl" :href="appStore.officialUrl"
target="_blank" target="_blank"
size="small" size="small"
v-perms:has="['system:setting:link']" v-perms:has="['system:setting:official']"
v-if="appStore.officialUrl !== '#'" v-if="appStore.officialUrl !== '#'"
> >
{{ t('loayouts.basic.officialUrl') }} {{ t('loayouts.basic.officialUrl') }}
@@ -351,7 +351,7 @@ onUnmounted(() => {
<a-button <a-button
type="link" type="link"
size="small" size="small"
v-perms:has="['system:setting:HelpDoc']" v-perms:has="['system:setting:doc']"
@click="fnClickHelpDoc()" @click="fnClickHelpDoc()"
> >
{{ t('loayouts.basic.helpDoc') }} {{ t('loayouts.basic.helpDoc') }}

View File

@@ -89,54 +89,54 @@ function fnChangeLocale(e: any) {
</a-button> </a-button>
<!-- 锁屏操作 --> <!-- 锁屏操作 -->
<a-tooltip placement="bottom"> <span v-perms:has="['system:setting:lock']">
<template #title>{{ t('loayouts.rightContent.lock') }}</template> <a-tooltip placement="bottom">
<a-button type="text" style="color: inherit" @click="fnClickLock()"> <template #title>{{ t('loayouts.rightContent.lock') }}</template>
<template #icon> <a-button type="text" style="color: inherit" @click="fnClickLock()">
<LockOutlined /> <template #icon>
</template> <LockOutlined />
</a-button> </template>
<ProModal </a-button>
:drag="true" <ProModal
:width="400" :drag="true"
:minHeight="200" :width="400"
:mask-closable="false" :minHeight="200"
v-model:visible="lockConfirm" :mask-closable="false"
:title="t('loayouts.rightContent.lockTip')" v-model:visible="lockConfirm"
@ok="fnClickLockToPage()" :title="t('loayouts.rightContent.lockTip')"
> @ok="fnClickLockToPage()"
<a-space> >
{{ t('loayouts.rightContent.lockPasswd') }} <a-space>
<a-input-password {{ t('loayouts.rightContent.lockPasswd') }}
v-model:value="lockPasswd" <a-input-password
:placeholder="t('common.inputPlease')" v-model:value="lockPasswd"
> :placeholder="t('common.inputPlease')"
<template #prefix> >
<a-tooltip <template #prefix>
:title="t('loayouts.rightContent.lockPasswdTip')" <a-tooltip
placement="topLeft" :title="t('loayouts.rightContent.lockPasswdTip')"
> placement="topLeft"
<UnlockOutlined /> >
</a-tooltip> <UnlockOutlined />
</template> </a-tooltip>
</a-input-password> </template>
</a-space> </a-input-password>
</ProModal> </a-space>
</a-tooltip> </ProModal>
</a-tooltip>
</span>
<a-tooltip placement="bottom"> <!-- 用户帮助手册 -->
<template #title>{{ t('loayouts.rightContent.helpDoc') }}</template> <span v-perms:has="['system:setting:doc']">
<a-button <a-tooltip placement="bottom">
type="text" <template #title>{{ t('loayouts.rightContent.helpDoc') }}</template>
style="color: inherit" <a-button type="text" style="color: inherit" @click="fnClickHelpDoc()">
@click="fnClickHelpDoc()" <template #icon>
v-perms:has="['system:setting:HelpDoc']" <QuestionCircleOutlined />
> </template>
<template #icon> </a-button>
<QuestionCircleOutlined /> </a-tooltip>
</template> </span>
</a-button>
</a-tooltip>
<a-tooltip placement="bottom"> <a-tooltip placement="bottom">
<template #title>{{ t('loayouts.rightContent.fullscreen') }}</template> <template #title>{{ t('loayouts.rightContent.fullscreen') }}</template>

View File

@@ -134,16 +134,6 @@ onMounted(() => {
function fnChangeLocale(e: any) { function fnChangeLocale(e: any) {
changeLocale(e.key); changeLocale(e.key);
} }
/**系统使用手册跳转 */
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');
}
</script> </script>
<template> <template>

View File

@@ -31,13 +31,13 @@ const { t } = useI18n();
{{ t('views.system.setting.sysLoginBg') }} {{ t('views.system.setting.sysLoginBg') }}
</a-divider> </a-divider>
<ChangeLogoBG></ChangeLogoBG> <ChangeLogoBG></ChangeLogoBG>
<div v-perms:has="['system:setting:HelpDoc']"> <div v-perms:has="['system:setting:doc']">
<a-divider orientation="left"> <a-divider orientation="left">
{{ t('views.system.setting.sysHelpDoc') }} {{ t('views.system.setting.sysHelpDoc') }}
</a-divider> </a-divider>
<ChangeHelpDoc></ChangeHelpDoc> <ChangeHelpDoc></ChangeHelpDoc>
</div> </div>
<div v-perms:has="['system:setting:link']"> <div v-perms:has="['system:setting:official']">
<a-divider orientation="left"> <a-divider orientation="left">
{{ t('views.system.setting.sysOfficialUrl') }} {{ t('views.system.setting.sysOfficialUrl') }}
</a-divider> </a-divider>