具体问题使用分页时:出现0页或者会超出最大页数bug
在插件中修改位置1:
this.getPageCount = function () {
var _pageCount = opts.totalData && opts.showData ? Math.ceil(parseInt(opts.totalData) / opts.showData) : opts.pageCount;
if (_pageCount < opts.count)
opts.count = _pageCount;
return _pageCount;
};
在插件中修改位置2:
var start = 1;
var end = pageCount;
var _count = 0;
if (opts.count % 2 == 0)
_count = opts.count;
else
_count = opts.count - 1;
var avgcount = _count / 2;
if (current <= avgcount) {
start = 1;
end = opts.count;
} else if (current + avgcount > pageCount) {
start = pageCount - opts.count + 1;
end = pageCount;
} else {
if (opts.count % 2 == 0)
start = current - avgcount + 1;
else
start = current - avgcount;
end = current + avgcount;
}