You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
willaengine/resources/js/Global/components/Misc/Breadcrumbs.vue

64 lines
1.8 KiB

<template>
<v-breadcrumbs :items="items">
<template v-slot:divider>
<v-icon>WMi-left-open</v-icon>
</template>
<template v-slot:item="props">
4 years ago
<router-link :to="{name: props.item.routeName}" class="WM-Link" :class="[LinkClass, props.item.disabled && 'disabled']">
<v-icon>WMi-{{ props.item.icon }}</v-icon> {{ props.item.text.toUpperCase() }}
</router-link>
</template>
</v-breadcrumbs>
</template>
<script>
export default {
props: {
4 years ago
LinkClass: { default: '' },
items: { default: [] },
},
};
</script>
<style scoped lang="scss">
.WM-Link .v-icon{
margin-bottom: 3px;
5 years ago
margin-left: 1px;
}
.disabled {
color: grey;
pointer-events: none
}
.v-breadcrumbs li:nth-child(2n) {
padding: 0 12px 0 30px;
}
5 years ago
.v-breadcrumbs .WM-Link {
font-size: 14px;
}
4 years ago
.v-breadcrumbs a, .v-breadcrumbs a .v-icon::before {
transition: 0.4s;
}
4 years ago
/*----------------------------------------------------*/
/* Colors */
/*----------------------------------------------------*/
@import "resources/js/Global/scss/_vars.scss";
@each $color,
$value in $colors {
.v-breadcrumbs.theme-#{$color} .router-link-active:hover {
color: $value;
}
.v-breadcrumbs.theme-#{$color} .router-link-active::after {
background: $value;
}
.v-breadcrumbs.theme-#{$color} .router-link-active:hover .v-icon::before {
color: $value;
}
.v-breadcrumbs.theme-#{$color} .router-link-active.disabled {
color: $value;
border-bottom: 2px solid $value;
}
}
</style>