index.sjs 460 B

123456789101112131415161718
  1. function checkShowNext(current, items) {
  2. return current < items.length - 1;
  3. }
  4. function checkShowPrev(current, items) {
  5. return current > 0;
  6. }
  7. function checkShowJump(current, items) {
  8. return current === 0 && items.length > 1;
  9. }
  10. function checkShowKnow(current, items) {
  11. return current === items.length - 1;
  12. }
  13. export default {
  14. checkShowNext: checkShowNext,
  15. checkShowPrev: checkShowPrev,
  16. checkShowJump: checkShowJump,
  17. checkShowKnow: checkShowKnow
  18. };