jqweui,0.8.2版本infinite存在bug,會存在下拉不觸發的狀況,解決辦法:jquery
源代碼3730行附近ui
Infinite.prototype.scroll = function() { var container = this.container; var tagName = container[0].tagName.toUpperCase() var scrollTop if (tagName === 'BODY' || tagName === 'HTML') { scrollTop = container.scrollTop() || $(window).scrollTop() } else { scrollTop = container.scrollTop() } var offset = container.scrollHeight() - ($(window).height() + scrollTop); if(offset <= this.distance) { container.trigger("infinite"); } }
壓縮後js代碼:https://files.cnblogs.com/files/qidian10/jquery-weui.min.jsthis
注意:僅針對0.8.2版本,高級版本的官方已修復spa