mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Refactor #4739 - For Breadcrumb
This commit is contained in:
parent
a6e06572d0
commit
ad9b437003
5 changed files with 5 additions and 31 deletions
|
@ -1,14 +1,14 @@
|
|||
<template>
|
||||
<nav :class="cx('root')" v-bind="ptm('root')" data-pc-name="breadcrumb">
|
||||
<ol :class="cx('menu')" v-bind="ptm('menu')">
|
||||
<BreadcrumbItem v-if="home" :item="home" :class="cx('home')" :templates="$slots" :exact="exact" :pt="pt" :unstyled="unstyled" v-bind="ptm('home')" />
|
||||
<BreadcrumbItem v-if="home" :item="home" :class="cx('home')" :templates="$slots" :pt="pt" :unstyled="unstyled" v-bind="ptm('home')" />
|
||||
<template v-for="(item, i) of model" :key="item.label + '_' + i">
|
||||
<li v-if="home || i !== 0" :class="cx('separator')" v-bind="ptm('separator')">
|
||||
<slot name="separator">
|
||||
<ChevronRightIcon aria-hidden="true" v-bind="ptm('separatorIcon')" />
|
||||
</slot>
|
||||
</li>
|
||||
<BreadcrumbItem :item="item" :index="i" :templates="$slots" :exact="exact" :pt="pt" :unstyled="unstyled" />
|
||||
<BreadcrumbItem :item="item" :index="i" :templates="$slots" :pt="pt" :unstyled="unstyled" />
|
||||
</template>
|
||||
</ol>
|
||||
</nav>
|
||||
|
@ -22,11 +22,6 @@ import BreadcrumbItem from './BreadcrumbItem.vue';
|
|||
export default {
|
||||
name: 'Breadcrumb',
|
||||
extends: BaseBreadcrumb,
|
||||
beforeMount() {
|
||||
if (!this.$slots.item) {
|
||||
console.warn('In future versions, vue-router support will be removed. Item templating should be used.');
|
||||
}
|
||||
},
|
||||
components: {
|
||||
BreadcrumbItem: BreadcrumbItem,
|
||||
ChevronRightIcon: ChevronRightIcon
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue