fix: 解决字体跳跃的问题

This commit is contained in:
cp3hnu 2024-10-12 17:29:44 +08:00
parent 862612b076
commit ebebc0eca2
2 changed files with 10 additions and 0 deletions

View File

@ -129,6 +129,15 @@ export default defineConfig({
// 解决首次加载时白屏的问题
{ src: '/scripts/loading.js', async: true },
],
// links: [
// {
// href: '/fonts/ALIBABA-PUHUITI-MEDIUM.TTF',
// rel: 'preload',
// as: 'font',
// type: 'font/woff2',
// crossOrigin: 'anonymous',
// },
// ],
//================ pro 插件配置 =================
presets: ['umi-presets-pro'],
/**

View File

@ -1,4 +1,5 @@
@font-face {
font-family: Alibaba;
src: url('./ALIBABA-PUHUITI-MEDIUM.TTF');
font-display: swap;
}