Skip to main content
Version: 2.x

API Reference > @next-core/brick-types > BrickMenuConf > lifeCycle

BrickMenuConf.lifeCycle property

构件生命周期配置。

Signature:

lifeCycle?: BrickLifeCycle;

Reference: BrickLifeCycle

Remarks

构件在自身渲染和页面渲染的各个时刻可以执行相关的动作。

其生命周期包含的阶段及其顺序如下:

当页面进入时:

  1. useResolves

  2. onBeforePageLoad

  3. onPageLoad

  4. onAnchorLoad or onAnchorUnload

当页面离开时:

  1. onBeforePageLeave

  2. onPageLeave