赋值式的修改页面onReachBottom不生效
发布于 6 年前 作者 shaoyan 14091 次浏览 来自 官方Issues
page.onReachBottom = () => {
        comp.onReachBottom();
        if (oldOnReachBottom) {
          oldOnReachBottom();
        }
      };

问题表现:上述方式更新页面触底监听函数,在页面没有声明onReachBottomde事件的时候不生效,只有页面声明onReachBottom再赋值才会生效。

预期:不管Page构造函数是否声明onReachBottom,page.onReachBottom都应该被触发

代码片段:https://developers.weixin.qq.com/s/4TceyFme7Zmm

对比:

回到顶部