|
|
|
@ -1,16 +1,35 @@
|
|
|
|
|
<template>
|
|
|
|
|
<el-breadcrumb class="app-breadcrumb" separator="/">
|
|
|
|
|
<transition-group name="breadcrumb">
|
|
|
|
|
<el-breadcrumb-item v-for="(item, index) in levelList" :key="item.path">
|
|
|
|
|
<span
|
|
|
|
|
v-if="item.redirect === 'noRedirect' || index == levelList.length - 1"
|
|
|
|
|
class="no-redirect"
|
|
|
|
|
>{{ item.meta.title }}</span
|
|
|
|
|
<div class="container">
|
|
|
|
|
<img
|
|
|
|
|
src="@/assets/images/position.png"
|
|
|
|
|
alt=""
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<el-breadcrumb
|
|
|
|
|
class="app-breadcrumb"
|
|
|
|
|
separator="/"
|
|
|
|
|
>
|
|
|
|
|
<transition-group name="breadcrumb">
|
|
|
|
|
<el-breadcrumb-item
|
|
|
|
|
v-for="(item, index) in levelList"
|
|
|
|
|
:key="item.path"
|
|
|
|
|
>
|
|
|
|
|
<a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
|
|
|
|
|
</el-breadcrumb-item>
|
|
|
|
|
</transition-group>
|
|
|
|
|
</el-breadcrumb>
|
|
|
|
|
<span
|
|
|
|
|
v-if="
|
|
|
|
|
item.redirect === 'noRedirect' || index == levelList.length - 1
|
|
|
|
|
"
|
|
|
|
|
class="no-redirect"
|
|
|
|
|
>{{ item.meta.title }}</span
|
|
|
|
|
>
|
|
|
|
|
<a
|
|
|
|
|
v-else
|
|
|
|
|
@click.prevent="handleLink(item)"
|
|
|
|
|
>{{ item.meta.title }}</a
|
|
|
|
|
>
|
|
|
|
|
</el-breadcrumb-item>
|
|
|
|
|
</transition-group>
|
|
|
|
|
</el-breadcrumb>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
@ -131,7 +150,7 @@ function getBreadcrumb() {
|
|
|
|
|
(item) => item.meta && item.meta.title && item.meta.breadcrumb !== false
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
function findPathNum(str, char = "/") {
|
|
|
|
|
let index = str.indexOf(char);
|
|
|
|
|
let num = 0;
|
|
|
|
@ -181,6 +200,16 @@ getBreadcrumb();
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.container {
|
|
|
|
|
width: auto;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
|
|
|
|
img {
|
|
|
|
|
width: 17px;
|
|
|
|
|
margin-bottom: 5px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.app-breadcrumb.el-breadcrumb {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|