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

32 lines
1.1 KiB
Vue
Raw Normal View History

2022-09-06 12:03:37 +00:00
<template>
2024-02-11 08:10:29 +00:00
<nav :class="cx('root')" v-bind="ptmi('root')">
<ol :class="cx('list')" v-bind="ptm('list')">
<BreadcrumbItem v-if="home" :item="home" :class="cx('homeItem')" :templates="$slots" :pt="pt" :unstyled="unstyled" v-bind="ptm('homeItem')" />
<template v-for="(item, i) of model" :key="item.label + '_' + i">
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-11-08 12:47:48 +00:00
<BreadcrumbItem :item="item" :index="i" :templates="$slots" :pt="pt" :unstyled="unstyled" />
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,
2024-02-11 08:10:29 +00:00
inheritAttrs: false,
2022-09-06 12:03:37 +00:00
components: {
2024-02-11 08:10:29 +00:00
BreadcrumbItem,
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>