MorJS aPage/wPage生命周期拓展
aPage / wPage 除已有的小程序生命周期外,还增加实现了 appLifetimes 用于监听 App 的 onShow 和 onHide 生命周期事件,示例用法如下:
import { aPage } from '@morjs/core'
aPage({
appLifetimes: {
show() {
console.log('app onShow', 'index-page', this)
},
hide() {
console.log('app onHide', 'index-page', this)
}
}
})