目录

Subpage

NavDestination is the root container for Navigation subpages and is used to hold special attributes as well as lifecycles of subpages. You can set separate attributes such as the title bar and menu bar for NavDestination, in the same way you set attributes for Navigation. You can also set different display modes for NavDestination through the mode attribute to meet different page requirements.

Page Display Mode

NavDestination is divided into two modes:

Page Lifecycle

The lifecycle of Navigation can be divided into three categories: custom component lifecycle, universal component lifecycle, and NavDestination lifecycle. aboutToAppear and aboutToDisappear are the lifecycle callbacks of custom components (custom components contained in the outer layer of NavDestination); onAppear and onDisappear are universal component lifecycle callbacks. The remaining lifecycle events are unique to NavDestination.

The sequence of these lifecycle events is illustrated in the figure below.

In addition, there are two special lifecycle callbacks:

Page Listening and Query

To facilitate the decoupling of components from pages, custom components within NavDestination subpages can listen for or query some page status information through global APIs.