开始使用
复制一个包含安装步骤和此插件的完整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
标题为“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上游发生变化时,请重新同步。