From 0e3f1333c11cf5f5d46dbe0c8476eeb136f19078 Mon Sep 17 00:00:00 2001 From: doublex001 <16157008+doublex001@user.noreply.gitee.com> Date: Mon, 14 Sep 2026 12:58:15 +0800 Subject: [PATCH] =?UTF-8?q?feat(ui):=20=E6=8E=A5=E5=85=A5=E5=93=81?= =?UTF-8?q?=E7=89=8C=E5=90=AF=E5=8A=A8=E5=B1=8F=EF=BC=8C=E6=B6=88=E9=99=A4?= =?UTF-8?q?=E5=86=B7=E5=90=AF=E5=8A=A8=E7=99=BD=E5=B1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit assets/splash-icon.png(1024×1024)此前是死资源:app.config.js 既无 splash 配置,项目也未安装 expo-splash-screen,冷启动只能走默认白屏。 现以 config plugin 形式接入 expo-splash-screen: imageWidth 200 / resizeMode contain / 白底。 选项取值依据已安装版本 expo-splash-screen@57.0.9 自带的 plugin/build/types.d.ts,而非凭记忆书写。应用为纯亮色 (userInterfaceStyle: 'light'),故不配置 dark 分支。 注意:启动屏属原生配置,Expo Go 内不生效,需 eas build 出包后可见。 --- app.config.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/app.config.js b/app.config.js index 6d49a6f..8b44de2 100644 --- a/app.config.js +++ b/app.config.js @@ -46,7 +46,22 @@ export default { monochromeImage: './assets/android-icon-monochrome.png', }, }, - plugins: ['expo-router', 'expo-font'], + plugins: [ + 'expo-router', + 'expo-font', + // 启动屏:冷启动期间展示品牌 logo,消除白屏。 + // 资源为 assets/splash-icon.png(1024×1024,见 assets/)。 + // 应用为纯亮色(userInterfaceStyle: 'light'),故不配置 dark 分支。 + [ + 'expo-splash-screen', + { + image: './assets/splash-icon.png', + imageWidth: 200, + resizeMode: 'contain', + backgroundColor: '#FFFFFF', + }, + ], + ], extra: { apiBaseUrl: process.env.API_BASE_URL || 'https://dev.api.com', // EAS 项目 ID:`eas init` 后会自动注入此处(与 updates.url 中的 PROJECT_ID 对应)。