m-pull-to-refresh
m-pull-to-refresh copied to clipboard
下拉容器中含有需要左右滑动的子元素,在左右滑动的时候,建议不触发transform 改变下拉容器的位移
在使用overflow-x: scroll 左右滑动的时候,也可能会触发screenY的改变,会触发 transform 产生容器位移,会露出下拉箭头或文案 。 建议可支持添加一个可配置项,在小于某个位移量的时候,不触发transform。
const _diff = Math.round(_screenY - this._ScreenY); this._ScreenY = _screenY; this._lastScreenY += this.damping(_diff);
this.setContentStyle(this._lastScreenY);