fix: 是否i显示国际化切换的开关
This commit is contained in:
@@ -326,12 +326,7 @@ document.addEventListener('visibilitychange', function () {
|
|||||||
>
|
>
|
||||||
{{ t('loayouts.basic.officialUrl') }}
|
{{ t('loayouts.basic.officialUrl') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button
|
<a-button type="link" size="small" @click="fnClickHelpDoc()">
|
||||||
type="link"
|
|
||||||
size="small"
|
|
||||||
@click="fnClickHelpDoc()"
|
|
||||||
v-if="helpDocUrl !== '#'"
|
|
||||||
>
|
|
||||||
{{ t('loayouts.basic.helpDoc') }}
|
{{ t('loayouts.basic.helpDoc') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-space>
|
</a-space>
|
||||||
|
|||||||
@@ -43,9 +43,6 @@ function fnClickHelpDoc(language?: string) {
|
|||||||
window.open(href, '_blank');
|
window.open(href, '_blank');
|
||||||
}
|
}
|
||||||
|
|
||||||
// 兼容旧前端可改配置文件
|
|
||||||
const i18nDisable = sessionGet('i18nDisable') === 'false';
|
|
||||||
|
|
||||||
/**改变多语言 */
|
/**改变多语言 */
|
||||||
function fnChangeLocale(e: any) {
|
function fnChangeLocale(e: any) {
|
||||||
changeLocale(e.key);
|
changeLocale(e.key);
|
||||||
@@ -66,7 +63,7 @@ function fnChangeLocale(e: any) {
|
|||||||
</template>
|
</template>
|
||||||
</a-button>
|
</a-button>
|
||||||
|
|
||||||
<a-tooltip placement="bottom" v-if="appStore.getHelpDoc !== '#'">
|
<a-tooltip placement="bottom">
|
||||||
<template #title>{{ t('loayouts.rightContent.helpDoc') }}</template>
|
<template #title>{{ t('loayouts.rightContent.helpDoc') }}</template>
|
||||||
<a-button type="text" @click="fnClickHelpDoc()">
|
<a-button type="text" @click="fnClickHelpDoc()">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
@@ -88,7 +85,7 @@ function fnChangeLocale(e: any) {
|
|||||||
<a-dropdown
|
<a-dropdown
|
||||||
placement="bottom"
|
placement="bottom"
|
||||||
:trigger="['click', 'hover']"
|
:trigger="['click', 'hover']"
|
||||||
v-if="!i18nDisable"
|
v-if="appStore.i18nOpen"
|
||||||
>
|
>
|
||||||
<a-button size="small" type="default">
|
<a-button size="small" type="default">
|
||||||
{{ t('i18n') }}
|
{{ t('i18n') }}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { message } from 'ant-design-vue/lib';
|
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 useUserStore from '@/store/modules/user';
|
||||||
import useAppStore from '@/store/modules/app';
|
import useAppStore from '@/store/modules/app';
|
||||||
import { getCaptchaImage } from '@/api/login';
|
import { getCaptchaImage } from '@/api/login';
|
||||||
@@ -8,7 +8,6 @@ import { useRouter, useRoute } from 'vue-router';
|
|||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
import { toRaw } from 'vue';
|
import { toRaw } from 'vue';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
import { sessionGet } from '@/utils/cache-session-utils';
|
|
||||||
import { parseUrlPath } from '@/plugins/file-static-url';
|
import { parseUrlPath } from '@/plugins/file-static-url';
|
||||||
const { t, changeLocale, optionsLocale, currentLocale } = useI18n();
|
const { t, changeLocale, optionsLocale, currentLocale } = useI18n();
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
@@ -133,9 +132,6 @@ onMounted(() => {
|
|||||||
fnGetCaptcha();
|
fnGetCaptcha();
|
||||||
});
|
});
|
||||||
|
|
||||||
// 兼容旧前端可改配置文件
|
|
||||||
const i18nDisable = sessionGet('i18nDisable') === 'false';
|
|
||||||
|
|
||||||
/**改变多语言 */
|
/**改变多语言 */
|
||||||
function fnChangeLocale(e: any) {
|
function fnChangeLocale(e: any) {
|
||||||
changeLocale(e.key);
|
changeLocale(e.key);
|
||||||
@@ -283,7 +279,7 @@ function fnChangeLocale(e: any) {
|
|||||||
justify="space-between"
|
justify="space-between"
|
||||||
align="middle"
|
align="middle"
|
||||||
style="margin-top: 18px"
|
style="margin-top: 18px"
|
||||||
v-if="!i18nDisable"
|
v-if="appStore.i18nOpen"
|
||||||
>
|
>
|
||||||
<a-col :offset="18" :span="6">
|
<a-col :offset="18" :span="6">
|
||||||
<a-dropdown :trigger="['click', 'hover']">
|
<a-dropdown :trigger="['click', 'hover']">
|
||||||
|
|||||||
Reference in New Issue
Block a user