From ebebc0eca23a8a1cd5edf9c602a864ea12da4204 Mon Sep 17 00:00:00 2001 From: cp3hnu Date: Sat, 12 Oct 2024 17:29:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E5=AD=97=E4=BD=93?= =?UTF-8?q?=E8=B7=B3=E8=B7=83=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- react-ui/config/config.ts | 9 +++++++++ react-ui/public/fonts/font.css | 1 + 2 files changed, 10 insertions(+) diff --git a/react-ui/config/config.ts b/react-ui/config/config.ts index 21474da6..515b79cb 100644 --- a/react-ui/config/config.ts +++ b/react-ui/config/config.ts @@ -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'], /** diff --git a/react-ui/public/fonts/font.css b/react-ui/public/fonts/font.css index 5d110456..ea5ffc5c 100644 --- a/react-ui/public/fonts/font.css +++ b/react-ui/public/fonts/font.css @@ -1,4 +1,5 @@ @font-face { font-family: Alibaba; src: url('./ALIBABA-PUHUITI-MEDIUM.TTF'); + font-display: swap; } \ No newline at end of file