自定义组件中做页面跳转为什么会跳转两次,onLoad执行两次?

发布于 5 年前作者 wyao12150 次浏览最后编辑 5 年前来自 issues

自定义组件中做页面跳转为什么会跳转两次,onLoad执行两次?

Component({

  /**

   * 组件的属性列表

   */

  properties: {

  },

  /**

   * 组件的初始数据

   */

  data: {

  },

  /**

   * 组件的方法列表

   */

  methods: {

。。。。。。

  pageLifetimes: {

    show: function() {

      let that=this;

      // 页面被展示

      console.log(“components selProductType is onShow …”)

      //that.triggerEvent(‘exePageMethod’, { content: ‘我是谁’});

    },

  }

})

1 回复
zouyan
zouyan1 楼9 个月前

只能是因为你的代码里跳了两次。