Getting Started
复制一个包含安装步骤和本插件的完整 Markdown 指南的配置提示。
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-home-indicator`, `@capgo/home-indicator`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/home-indicator/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
安装
标题:安装bun add @capgo/capacitor-home-indicatorbunx cap sync导入
标题:导入import { HomeIndicator } from '@capgo/capacitor-home-indicator';API 介绍
标题:API 介绍hide
标题:隐藏隐藏底部屏幕的导航指示器
此功能可视化隐藏iOS底部导航指示器条,提供更沉浸式的全屏体验。用户仍可通过向上滑动来访问主屏幕,但导航指示器将在他们开始滑动动作之前不可见。
仅适用于iOS。对Android或web无效。
import { HomeIndicator } from '@capgo/capacitor-home-indicator';
await HomeIndicator.hide();show
标题:显示显示底部屏幕的导航指示器
此功能恢复iOS底部导航指示器的默认可见性,使其始终对用户可见。这是默认行为。
仅适用于iOS。对Android或web无效。
import { HomeIndicator } from '@capgo/capacitor-home-indicator';
await HomeIndicator.show();isHidden
标题:isHidden检查当前是否隐藏了底部屏幕的导航指示器
返回iOS底部导航指示器的当前可见状态。
import { HomeIndicator } from '@capgo/capacitor-home-indicator';
const { hidden } = await HomeIndicator.isHidden();if (hidden) { console.log('Home indicator is hidden');} else { console.log('Home indicator is visible');}真实数据来源
标题:真实数据来源本页面由插件生成 src/definitions.ts当公共 API 上游发生变化时,请重新运行同步
继续从 Getting Started
标题:继续从 Getting Started如果您正在使用 Getting Started 来规划仪表板和 API 操作,请将其连接到 使用 @capgo/capacitor-home-indicator 用于在 Using @capgo/capacitor-home-indicator 中使用的本地能力 API概述 为API概述的实现细节 介绍 为介绍的实现细节 API密钥 为API密钥的实现细节,以及 设备 为设备的实现细节。