Browse Source

fix: 解决字体跳跃的问题

pull/136/head
cp3hnu 1 year ago
parent
commit
ebebc0eca2
2 changed files with 10 additions and 0 deletions
  1. +9
    -0
      react-ui/config/config.ts
  2. +1
    -0
      react-ui/public/fonts/font.css

+ 9
- 0
react-ui/config/config.ts 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'],
/**


+ 1
- 0
react-ui/public/fonts/font.css View File

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

Loading…
Cancel
Save