taro小程序的生命周期

ceTaro 文档

可以参考一下这个文档。

Vue3 Composition APIs

使用

useLoad(等同于页面的 onLoad 生命周期钩子。)

useReady(onReady)

useDidShow(onShow)

useDidHide(onHide

useUnload(onUnload

usePullDownRefresh(onPullDownRefresh

useReachBottom(onReachBottom

注意使用的时候先引入

import { useDidShow } from '@tarojs/taro'

  useDidShow(() => console.log('onShow'))

猜你喜欢

转载自blog.csdn.net/qq_33769914/article/details/130343527
今日推荐