2024-11-21鸿蒙项目实战(六):HMRouter实现两次返回退出应用1、定义一个生命周期类ExitAppLifecycle实现IHMLifecycle接口import{HMLifecycle,HMLifecycleContext,IHMLifecycle}from'@hadss/hmrouter';@HMLifecycle({lifecycleName:'ExitAppLifecycle'})exportclassExitAppLifecycleimplementsIHMLifecycle{