# @expo/configure-splash-screen 中文文档

规范地址：https://npmcn.com/package/%40expo/configure-splash-screen/

版本：0\.6\.0
npm 元数据更新时间：2026-09-23T11:26:13.997Z
中文译文更新时间：2026-11-14T05:28:55.410Z
软件包许可：MIT

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40expo/configure-splash-screen
原文对照：https://npmcn.com/package/%40expo/configure-splash-screen/?lang=original
项目主页：https://github.com/expo/expo-cli/tree/master/unlinked-packages/configure-splash-screen
源码仓库：https://github.com/expo/expo-cli

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：263 kB，92 个文件
- 模块格式：CommonJS
- TypeScript 类型：未声明
- Node.js 要求：\>=12
- 运行依赖：8 个
- 首次发布：2020-05-06T09:53:55.478Z
- 最新版本发布：2021-09-21T22:03:24.312Z
- 近 30 天下载量：119348（2026-10-14 至 2026-11-12，npm 官方下载统计）
- 已发布版本数：30（近 12 个月 0 个）

## 中文简介

提供 Cli 配置命令的“ expo- splash- screen” 补充模块

## 安装

```sh
npm install @expo/configure-splash-screen
```

也可以使用：`pnpm add @expo/configure-splash-screen`、`yarn add @expo/configure-splash-screen`、`bun add @expo/configure-splash-screen`

## README

# @ expo/ 配置- splash- 屏幕

此软件包提供了帮助您配置的 CLI 命令 [`expo-splash-screen`](https://github.com/expo/expo/tree/master/packages/expo-splash-screen) 模块. 您可以在不打开Xcode或Android Studio的情况下,根据您的需要来配置本地的iOS和Android项目.

## 内容

-   [变化](https://npmcn.com/package/CHANGELOG.md)
-   [\* 特性](https://npmcn.com/package/%40expo/configure-splash-screen/#readme--features)
-   [使用量](https://npmcn.com/package/%40expo/configure-splash-screen/#readme--usage)
-   [\* 安装](https://npmcn.com/package/%40expo/configure-splash-screen/#readme--installation)
-   [捐款](https://npmcn.com/package/%40expo/configure-splash-screen/#readme--contributing)

## \* 特性

### iOS系统

-   配置本地飞溅屏幕的背景颜色.
-   配置 [`expo-splash-screen`](https://github.com/expo/expo/tree/master/packages/expo-splash-screen) 显示 `.png` 图像.
-   支助 [`CONTAIN`](https://github.com/expo/expo/tree/master/packages/expo-splash-screen#contain-resize-mode) 财务报告和审定财务报表 [`COVER`](https://github.com/expo/expo/tree/master/packages/expo-splash-screen#cover-resize-mode) 模式从 [`expo-splash-screen`](https://github.com/expo/expo/tree/master/packages/expo-splash-screen)。 。 。 .
-   配置 `StatusBar`属性 :
    -   `hiding`, (中文(简体) ),
    -   `style`。 。 。 .
-   支持用于暗模式的SplashScreenView单独配置.

### 安卓尔

-   配置本地飞溅屏幕的背景颜色.
-   配置 `expo-splash-screen` 显示 `.png` 图像.
-   支助 [`CONTAIN`](https://github.com/expo/expo/tree/master/packages/expo-splash-screen#contain-resize-mode), (中文(简体) ), [`COVER`](https://github.com/expo/expo/tree/master/packages/expo-splash-screen#cover-resize-mode) 财务报告和审定财务报表 [`NATIVE`](https://github.com/expo/expo/tree/master/packages/expo-splash-screen#native-resize-mode) 模式从 [`expo-splash-screen`](https://github.com/expo/expo/tree/master/packages/expo-splash-screen)。 。 。 .
-   配置 `StatusBar`属性 :
    -   `hiding`, (中文(简体) ),
    -   `style`, (中文(简体) ),
    -   `backgroundColor`, (中文(简体) ),
    -   `translucency`。 。 。 .
-   支持用于暗模式的SplashScreenView单独配置.

## 使用量

命令语法 :

```
yarn run configure-splash-screen [options]
```

### 选项 :

-   `-p, --platform <platform>` - 要配置的选定平台。 可用值:"android""ios""所有"(默认:"all").
-   `-b, --background-color <color>` - (需要)有效的 cs 格式化颜色(hex (# RRGGB\[AA\])), rgb\[a\], hsl\[a\], 命名为颜色([https://drafts.csswg.org/css-color/#取名-colors (中文(简体) )](https://drafts.csswg.org/css-color/#named-colors)),它将作为本土喷出屏幕视图的背景颜色.
-   `-i, --image-path <path>` - 将显示在溅射屏幕上的有效.png图像的路径.
-   `-r, --image-resize-mode <resizeMode>` - 调整用于喷出屏幕图像的大小模式。 只有在提供“图像-路径”时才能使用。 可用值:"Contain""cover""native"("native"只为Android提供)(默认:"Contain"). 见 [调整模式大小](https://github.com/expo/expo/tree/master/packages/expo-splash-screen#built-in-splash-screen-image-resize-modes) 更多信息.
-   `--dark-mode-background-color <color>` - 颜色(参见“ 背景- 颜色” 支持的格式) , 用作暗模式下溅射屏幕的背景颜色 。 提供此选项可以实现其他与暗模式相关的选项.
-   `--dark-mode-image-path <path>` - 仅以暗模式显示在溅射屏幕上的有效.png图像的路径。 只有在提供“ 暗地- 暗地- 颜色” 时才可用 .
-   `--status-bar-style <style>` - 自定义状态栏图标的颜色。 可用值:"default" QQ"light-content" QQ"dark-content"(默认:"default").
-   `--status-bar-hidden` - 隐藏状态栏.
-   `--status-bar-background-color <color>` -(仅用于Android平台)自定义状态栏的背景颜色. 接受有效的颜色( 参见“ 背景- 颜色” 支持的格式) .
-   `--status-bar-translucent` - (仅供Android平台使用) 使状态栏半透明(在状态栏区域下绘图的可操作性).
-   `--dark-mode-status-bar-style <style>` - (仅供Android平台使用) 与"status-bar-tyle"相同,但只在暗模式下应用. 只有在提供“ 暗- 模式- 背景- 颜色” 和“ 状态栏样式” 时才可用 .
-   `--dark-mode-status-bar-background-color <color>` - (仅供Android平台使用) 与 “ status- bar- background- color” 相同, 但只在暗模式下应用 。 只有在提供“ 暗- 模式- 背景- 颜色” 和“ 状态栏样式” 时才可用 .

查看所有可用的选项 :

```
yarn run expo-splash-screen --help
```

## \* 安装

此软件包是安装于 [`expo-splash-screen`](https://github.com/expo/expo/tree/master/packages/expo-splash-screen) 软件包。 遵循由 [`expo-splash-screen`](https://github.com/expo/expo/tree/master/packages/expo-splash-screen) 软件包.

## 捐款

贡献是非常受欢迎的! 请参阅本报告所述准则 [贡献指南](https://github.com/expo/expo#contributing)。 。 。 .

## 常见问题

### @expo/configure-splash-screen 是什么？

提供 Cli 配置命令的“ expo- splash- screen” 补充模块

### 如何安装 @expo/configure-splash-screen？

在项目目录运行 npm install @expo/configure-splash-screen，或使用 pnpm add / yarn add / bun add。它还提供命令行工具 expo-splash-screen、configure-splash-screen，可以用 npx expo-splash-screen 直接运行。

### @expo/configure-splash-screen 支持 TypeScript 吗？

该包的 package\.json 没有声明类型入口。需要类型提示时，可以在 npm 上查找社区维护的 @types/expo\_\_configure-splash-screen 是否存在。

### @expo/configure-splash-screen 支持 ESM 还是 CommonJS？

以 CommonJS 形式发布，可以直接 require\(\)；在 ES Module 项目中也可以用 import 引入（Node\.js 会把 module\.exports 作为默认导出）。

### @expo/configure-splash-screen 需要什么版本的 Node\.js？

package\.json 的 engines 字段要求 Node\.js \>=12。版本不符时 npm 默认只给出警告，开启 engine-strict 后会拒绝安装。

### @expo/configure-splash-screen 可以商用吗？

@expo/configure-splash-screen 使用 MIT 许可。宽松许可：允许商业使用、修改和再分发，通常只需在分发时保留原版权与许可声明。以上为概括，不构成法律意见，请以许可原文为准。

### @expo/configure-splash-screen 的下载量有多少？

根据 npm 官方下载统计，@expo/configure-splash-screen 在 2026/10/14 – 2026/11/12 这 30 天内被下载 119,348 次，日均约 3,978 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @expo/configure-splash-screen 还在维护吗？

最新版本 0\.6\.0 发布于 2021/09/22（5 年前）；至今共发布 30 个版本，其中过去 12 个月发布了 0 个；首次发布于 2020/05/06。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

