refactor:调整图标大小
This commit is contained in:
parent
4188534680
commit
bc63fc87a8
@ -2,7 +2,7 @@ import { createI18n } from 'vue-i18n';
|
||||
import pinia from '/@/stores/index';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { useThemeConfig } from '/@/stores/themeConfig';
|
||||
|
||||
import type { CountryCode } from 'vue3-flag-icons';
|
||||
// 定义语言国际化内容
|
||||
|
||||
/**
|
||||
@ -176,5 +176,5 @@ export const iso_3166_1_CountryList = {
|
||||
* @returns 国家代码
|
||||
*/
|
||||
export const getCountryCode = (locale: string) => {
|
||||
return iso_3166_1_CountryList[locale as keyof typeof iso_3166_1_CountryList];
|
||||
return iso_3166_1_CountryList[locale as keyof typeof iso_3166_1_CountryList] as CountryCode;
|
||||
}
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
</el-dropdown>
|
||||
<el-dropdown :show-timeout="70" :hide-timeout="50" trigger="click" @command="onLanguageChange">
|
||||
<div class="layout-navbars-breadcrumb-user-icon">
|
||||
<FlagIcon :code="currentCountryCode" square :size="14" :title="$t('message.user.title1')"/>
|
||||
<FlagIcon :code="currentCountryCode" square :size="12" :title="$t('message.user.title1')"/>
|
||||
</div>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
@ -116,8 +116,9 @@ import { Avatar, CircleCloseFilled, Loading, Lock } from '@element-plus/icons-vu
|
||||
|
||||
import { clearAccessTokens, getAPI } from '/@/utils/axios-utils';
|
||||
import { SysAuthApi, SysNoticeApi, SysUpgradeApi, SysUserApi } from '/@/api-services/api';
|
||||
import { languageList, getCountryCode } from '/@/i18n';
|
||||
import { languageList,getCountryCode } from '/@/i18n';
|
||||
import FlagIcon from 'vue3-flag-icons'
|
||||
import type { CountryCode } from 'vue3-flag-icons'
|
||||
|
||||
// 引入组件
|
||||
const UserNews = defineAsyncComponent(() => import('/@/layout/navBars/topBar/userNews.vue'));
|
||||
@ -137,7 +138,7 @@ const searchRef = ref();
|
||||
const onlineUserRef = ref();
|
||||
const changePasswordRef = ref();
|
||||
const upgradeInfoRef = ref();
|
||||
const currentCountryCode = ref(getCountryCode(themeConfig.value.globalI18n));
|
||||
const currentCountryCode = ref<CountryCode>(getCountryCode(themeConfig.value.globalI18n));
|
||||
const state = reactive({
|
||||
isScreenfull: false,
|
||||
disabledI18n: 'zh-cn',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user