16 lines
307 B
JavaScript
16 lines
307 B
JavaScript
function getClassName(current, index, status) {
|
|
current = current || 0;
|
|
if (index < current) {
|
|
return 'finish';
|
|
}
|
|
if (index === current) {
|
|
if (status === 'error') {
|
|
return 'error';
|
|
}
|
|
return 'active';
|
|
}
|
|
return 'non-active';
|
|
}
|
|
export default {
|
|
getClassName: getClassName
|
|
}; |