index.sjs 307 B

12345678910111213141516
  1. function getClassName(current, index, status) {
  2. current = current || 0;
  3. if (index < current) {
  4. return 'finish';
  5. }
  6. if (index === current) {
  7. if (status === 'error') {
  8. return 'error';
  9. }
  10. return 'active';
  11. }
  12. return 'non-active';
  13. }
  14. export default {
  15. getClassName: getClassName
  16. };