{{index+1}} {{title}} {{describe}} var setStatus = function (activeIndex, index, status) { if (activeIndex === index) { return status || 'process' } else if (activeIndex > index) { return 'finish' } else { return 'wait' } } var statusStyle = function (activeIndex, index, color, status) { if (activeIndex === index) { return status === 'error' ? '' : ('background-color:' + color) } else if (activeIndex > index) { return ('border-color:' + color + ';color:' + color) } else { return '' } } var dotStyle = function (activeIndex, index, color) { if (activeIndex >= index) { return ('background-color:' + color) } else { return '' } } module.exports = { setStatus: setStatus, statusStyle: statusStyle, dotStyle: dotStyle }