Skip to main content

ion-app

App 是 Ionic 应用的容器元素。每个项目只能有一个 <ion-app> 元素。一个应用可以有许多 Ionic 组件,包括菜单、页眉、内容和页脚。覆盖组件在渲染时会附加到 <ion-app>

¥App is a container element for an Ionic application. There should only be one <ion-app> element per project. An app can have many Ionic components including menus, headers, content, and footers. The overlay components get appended to the <ion-app> when they are presented.

使用 ion-app 可以实现以下行为:

¥Using ion-app enables the following behaviors:

  • 键盘生命周期事件 无需任何原生插件

    ¥Keyboard Lifecycle Events without the need for any native plugins

  • 硬件后退按钮监听器 用于自定义 Android 设备上的硬件后退按钮行为

    ¥Hardware Back Button Listeners for customizing the hardware back button behavior on Android devices

  • Capacitor 或 Cordova 中的状态栏支持,允许用户通过点击状态栏滚动到视图顶部

    ¥Status bar support in Capacitor or Cordova which allows users to scroll to the top of the view by tapping the status bar

  • 滚动辅助实用程序可滚动内容,以便屏幕键盘不会覆盖焦点文本输入

    ¥Scroll assist utilities which scroll the content so focused text inputs are not covered by the on-screen keyboard

  • 在 Material Design 模式下激活按钮时的 连锁反应

    ¥Ripple effect when activating buttons on Material Design mode

  • 其他点击和聚焦实用程序,使 Ionic 应用的使用体验更加原生

    ¥Other tap and focus utilities which make the experience of using an Ionic app feel more native

属性

¥Properties

No properties available for this component.

事件

¥Events

No events available for this component.

方法

¥Methods

No public methods available for this component.

CSS 阴影部分

¥CSS Shadow Parts

No CSS shadow parts available for this component.

CSS 自定义属性

¥CSS Custom Properties

No CSS custom properties available for this component.

插槽

¥Slots

No slots available for this component.