import { use } from '../utils'; import Icon from '../icon'; const [sfc, bem] = use('step'); export default sfc({ beforeCreate() { this.$parent.steps.push(this); }, computed: { status() { const index = this.$parent.steps.indexOf(this); const { active } = this.$parent; if (index < active) { return 'finish'; } if (index === active) { return 'process'; } } }, render(h) { const { status } = this; const { activeColor, direction } = this.$parent; const titleStyle = status === 'process' && { color: activeColor }; return (