Welcome to 16892 Developer Community-Open, Learning,Share
menu search
person

Categories

  pageLifetimes: {
    show() {
      console.log("show()")
    },
    hide() {

    },
  },

官方文档是:show函数是页面生命周期回调—监听页面显示,
页面显示/切入前台时触发。
但是我在一个页面中添加这个组件, 当该页面载入的时候, 组件中的show函数没有触发, 请问这是什么原因?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
509 views
Welcome To Ask or Share your Answers For Others

1 Answer

嗯?小程序里的应该是onShow(),onHide()吧


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
https://pubads.g.doubleclick.net/gampad/ads?sz=1x1|400x300&iu=/22746323630/auto-bellow-qa-content&ciu_szs=400x300&env=vp&impl=s&gdfp_req=1&output=vast&unviewed_position_start=1&url=[referrer_url]&description_url=[description_url]&correlator=[timestamp]
Welcome to 16892 Developer Community-Open, Learning and Share
...