fix: 是否i显示国际化切换的开关

This commit is contained in:
TsMask
2023-12-04 18:19:11 +08:00
parent 12643cac12
commit 27cc02e0d6
3 changed files with 5 additions and 17 deletions

View File

@@ -326,12 +326,7 @@ document.addEventListener('visibilitychange', function () {
>
{{ t('loayouts.basic.officialUrl') }}
</a-button>
<a-button
type="link"
size="small"
@click="fnClickHelpDoc()"
v-if="helpDocUrl !== '#'"
>
<a-button type="link" size="small" @click="fnClickHelpDoc()">
{{ t('loayouts.basic.helpDoc') }}
</a-button>
</a-space>

View File

@@ -43,9 +43,6 @@ function fnClickHelpDoc(language?: string) {
window.open(href, '_blank');
}
// 兼容旧前端可改配置文件
const i18nDisable = sessionGet('i18nDisable') === 'false';
/**改变多语言 */
function fnChangeLocale(e: any) {
changeLocale(e.key);
@@ -66,7 +63,7 @@ function fnChangeLocale(e: any) {
</template>
</a-button>
<a-tooltip placement="bottom" v-if="appStore.getHelpDoc !== '#'">
<a-tooltip placement="bottom">
<template #title>{{ t('loayouts.rightContent.helpDoc') }}</template>
<a-button type="text" @click="fnClickHelpDoc()">
<template #icon>
@@ -88,7 +85,7 @@ function fnChangeLocale(e: any) {
<a-dropdown
placement="bottom"
:trigger="['click', 'hover']"
v-if="!i18nDisable"
v-if="appStore.i18nOpen"
>
<a-button size="small" type="default">
{{ t('i18n') }}

View File

@@ -1,6 +1,6 @@
<script lang="ts" setup>
import { message } from 'ant-design-vue/lib';
import { reactive, onMounted, computed, ref } from 'vue';
import { reactive, onMounted, computed } from 'vue';
import useUserStore from '@/store/modules/user';
import useAppStore from '@/store/modules/app';
import { getCaptchaImage } from '@/api/login';
@@ -8,7 +8,6 @@ import { useRouter, useRoute } from 'vue-router';
import useI18n from '@/hooks/useI18n';
import { toRaw } from 'vue';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { sessionGet } from '@/utils/cache-session-utils';
import { parseUrlPath } from '@/plugins/file-static-url';
const { t, changeLocale, optionsLocale, currentLocale } = useI18n();
const appStore = useAppStore();
@@ -133,9 +132,6 @@ onMounted(() => {
fnGetCaptcha();
});
// 兼容旧前端可改配置文件
const i18nDisable = sessionGet('i18nDisable') === 'false';
/**改变多语言 */
function fnChangeLocale(e: any) {
changeLocale(e.key);
@@ -283,7 +279,7 @@ function fnChangeLocale(e: any) {
justify="space-between"
align="middle"
style="margin-top: 18px"
v-if="!i18nDisable"
v-if="appStore.i18nOpen"
>
<a-col :offset="18" :span="6">
<a-dropdown :trigger="['click', 'hover']">