Created
October 14, 2021 12:56
-
-
Save gegeke/494074f9ba48df185a699952e031e343 to your computer and use it in GitHub Desktop.
VStepperStepIcon
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
import { VStepperStep } from 'vuetify/lib/components/VStepper'; | |
export default { | |
name: 'v-stepper-step-icon', | |
// eslint-disable-next-line | |
extends: VStepperStep, | |
methods: { | |
genStepContent() { | |
const children = []; | |
if (this.hasError) { | |
children.push(this.genIcon(this.errorIcon)); | |
} else if (this.complete) { | |
if (this.editable) { | |
children.push(this.genIcon(this.editIcon)); | |
} else { | |
children.push(this.genIcon(this.completeIcon)); | |
} | |
} else if (this.$attrs.icon) { | |
// this "else if" branch is added, so the step can | |
// display custom icons | |
children.push(this.genIcon(this.$attrs.icon)); | |
} else { | |
children.push(String(this.step)); | |
} | |
return children; | |
}, | |
}, | |
}; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment