riku
13 小时以前 cf4787bc8188cd0acc8a42793730b076742f29c1
1
2
3
4
5
6
7
function shouldLoadImage(index, currentIndex, loadedIndexes) {
  return Math.abs(index - currentIndex) <= 1 || (loadedIndexes && loadedIndexes.indexOf(index) !== -1);
}
 
module.exports = {
  shouldLoadImage: shouldLoadImage,
};