2022-09-06 12:03:37 +00:00
|
|
|
<template>
|
2022-12-08 11:04:25 +00:00
|
|
|
<nav class="p-breadcrumb p-component">
|
|
|
|
<ol class="p-breadcrumb-list">
|
2023-01-30 08:01:06 +00:00
|
|
|
<BreadcrumbItem v-if="home" :item="home" class="p-breadcrumb-home" :template="$slots.item" :exact="exact" />
|
2023-01-20 21:11:14 +00:00
|
|
|
<template v-for="(item, i) of model" :key="item.label">
|
2023-01-23 08:58:32 +00:00
|
|
|
<li v-if="home || i !== 0" class="p-menuitem-separator">
|
2022-12-08 11:04:25 +00:00
|
|
|
<span class="pi pi-chevron-right" aria-hidden="true"></span>
|
|
|
|
</li>
|
2022-09-06 12:03:37 +00:00
|
|
|
<BreadcrumbItem :item="item" :template="$slots.item" :exact="exact" />
|
|
|
|
</template>
|
2022-12-08 11:04:25 +00:00
|
|
|
</ol>
|
2022-09-06 12:03:37 +00:00
|
|
|
</nav>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import BreadcrumbItem from './BreadcrumbItem.vue';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'Breadcrumb',
|
|
|
|
props: {
|
|
|
|
model: {
|
|
|
|
type: Array,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
home: {
|
|
|
|
type: null,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
exact: {
|
|
|
|
type: Boolean,
|
|
|
|
default: true
|
|
|
|
}
|
|
|
|
},
|
|
|
|
components: {
|
2022-09-14 11:26:01 +00:00
|
|
|
BreadcrumbItem: BreadcrumbItem
|
2022-09-06 12:03:37 +00:00
|
|
|
}
|
2022-09-14 11:26:01 +00:00
|
|
|
};
|
2022-09-06 12:03:37 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
.p-breadcrumb {
|
|
|
|
overflow-x: auto;
|
|
|
|
}
|
|
|
|
|
2022-12-08 11:04:25 +00:00
|
|
|
.p-breadcrumb .p-breadcrumb-list {
|
2022-09-06 12:03:37 +00:00
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
list-style-type: none;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
flex-wrap: nowrap;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-breadcrumb .p-menuitem-text {
|
|
|
|
line-height: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-breadcrumb .p-menuitem-link {
|
|
|
|
text-decoration: none;
|
2022-12-08 11:04:25 +00:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-breadcrumb .p-menuitem-separator {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2022-09-06 12:03:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-breadcrumb::-webkit-scrollbar {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
</style>
|