style: 使用本地字体库
This commit is contained in:
parent
2ab3faff7e
commit
2510bcd24e
|
@ -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[] = [];
|
||||||
|
|
Loading…
Reference in New Issue