MorJS aComponent/wComponent 生命周期拓展
2024-01-15 17:38 更新
aComponent / wComponent 除已有的小程序生命周期外,还增加实现了 pageLifetimes 用于监听 Page 的 onShow 和 onHide 生命周期事件,示例用法如下:
import { aComponent } from '@morjs/core'
aComponent({
pageLifetimes: {
show() {
console.log('页面触发 onShow')
},
hide() {
console.log('页面触发 onHide')
}
}
})以上内容是否对您有帮助:

免费 AI IDE


更多建议: