primevue-mirror/components/lib/breadcrumb/Breadcrumb.vue

31 lines
1.1 KiB
Vue
Raw Normal View History

2022-09-06 12:03:37 +00:00
<template>
2023-05-29 09:19:55 +00:00
<nav :class="cx('root')" v-bind="ptm('root')" data-pc-name="breadcrumb">
2023-05-29 07:05:29 +00:00
<ol :class="cx('menu')" v-bind="ptm('menu')">
<BreadcrumbItem v-if="home" :item="home" :class="cx('home')" :templates="$slots" :exact="exact" :pt="pt" v-bind="ptm('home')" />
2023-01-20 21:11:14 +00:00
<template v-for="(item, i) of model" :key="item.label">
2023-05-29 07:05:29 +00:00
<li v-if="home || i !== 0" :class="cx('separator')" v-bind="ptm('separator')">
<slot name="separator">
2023-04-26 09:57:16 +00:00
<ChevronRightIcon aria-hidden="true" v-bind="ptm('separatorIcon')" />
</slot>
2022-12-08 11:04:25 +00:00
</li>
2023-04-27 14:11:40 +00:00
<BreadcrumbItem :item="item" :index="i" :templates="$slots" :exact="exact" :pt="pt" />
2022-09-06 12:03:37 +00:00
</template>
2022-12-08 11:04:25 +00:00
</ol>
2022-09-06 12:03:37 +00:00
</nav>
</template>
<script>
import ChevronRightIcon from 'primevue/icons/chevronright';
2023-05-29 07:05:29 +00:00
import BaseBreadcrumb from './BaseBreadcrumb.vue';
2022-09-06 12:03:37 +00:00
import BreadcrumbItem from './BreadcrumbItem.vue';
export default {
name: 'Breadcrumb',
2023-05-29 07:05:29 +00:00
extends: BaseBreadcrumb,
2022-09-06 12:03:37 +00:00
components: {
BreadcrumbItem: BreadcrumbItem,
ChevronRightIcon: ChevronRightIcon
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>