style: 使用本地字体库

This commit is contained in:
baiqi 2024-07-05 16:40:51 +08:00 committed by 刘瑞斌
parent 2ab3faff7e
commit 2510bcd24e
6 changed files with 1 additions and 7 deletions

View File

@ -2,13 +2,7 @@ import type { LocaleType } from '#/global';
export function setHtmlPageLang(locale: LocaleType) { export function setHtmlPageLang(locale: LocaleType) {
document.querySelector('html')?.setAttribute('lang', locale); document.querySelector('html')?.setAttribute('lang', locale);
let fontFamily = ''; document.body.style.fontFamily = 'PingFang SC, AlibabaPuHuiTi';
if (locale === 'en-US') {
fontFamily = 'Helvetica Neue, Arial';
} else {
fontFamily = 'PingFang SC, Microsoft YaHei';
}
document.body.style.fontFamily = fontFamily;
} }
export const loadLocalePool: LocaleType[] = []; export const loadLocalePool: LocaleType[] = [];