MorJS aPage/wPage生命周期拓展
2024-01-15 17:38 更新
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)
}
}
})以上内容是否对您有帮助:

免费 AI IDE


更多建议: