commit
df90418496
|
@ -430,9 +430,12 @@ export default {
|
||||||
return _currentIndex <= _numT ? _numT : _isScrollDownOrRight ? _last - _num - _numT : _first + _numT - 1;
|
return _currentIndex <= _numT ? _numT : _isScrollDownOrRight ? _last - _num - _numT : _first + _numT - 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
const calculateFirst = (_currentIndex, _triggerIndex, _first, _last, _num, _numT, _isScrollDownOrRight) => {
|
const calculateFirst = (_currentIndex, _triggerIndex, _first, _last, _num, _numT, _isScrollDownOrRight, _isCols) => {
|
||||||
if (_currentIndex <= _numT) return 0;
|
if (_currentIndex <= _numT) return 0;
|
||||||
else return Math.max(0, _isScrollDownOrRight ? (_currentIndex < _triggerIndex ? _first : _currentIndex - _numT) : _currentIndex > _triggerIndex ? _first : _currentIndex - 2 * _numT);
|
const firstValue = Math.max(0, _isScrollDownOrRight ? (_currentIndex < _triggerIndex ? _first : _currentIndex - _numT) : _currentIndex > _triggerIndex ? _first : _currentIndex - 2 * _numT);
|
||||||
|
const maxFirst = this.getLast(firstValue, _isCols)
|
||||||
|
if (firstValue > maxFirst) return maxFirst - _num;
|
||||||
|
else return firstValue
|
||||||
};
|
};
|
||||||
|
|
||||||
const calculateLast = (_currentIndex, _first, _last, _num, _numT, _isCols) => {
|
const calculateLast = (_currentIndex, _first, _last, _num, _numT, _isCols) => {
|
||||||
|
|
Loading…
Reference in New Issue