Skip to content

Instantly share code, notes, and snippets.

@gegeke
Created October 14, 2021 12:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gegeke/494074f9ba48df185a699952e031e343 to your computer and use it in GitHub Desktop.
Save gegeke/494074f9ba48df185a699952e031e343 to your computer and use it in GitHub Desktop.
VStepperStepIcon
<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