1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
| <template>
| <div :class="`nav-beadcrumb-${theme}`">
| <Breadcrumb>
| <BreadcrumbItem
| v-for="item in currentPath"
| :to="item.path"
| :key="item.name"
| >{{ itemTitle(item) }}</BreadcrumbItem
| >
| </Breadcrumb>
| </div>
| </template>
|
| <script>
| export default {
| name: "breadcrumbNav",
| props: {
| currentPath: Array,
| theme: {
| type: String,
| default: "light",
| },
| },
| methods: {
| itemTitle(item) {
| if (typeof item.title == "object") {
| return this.$t(item.title.i18n);
| } else {
| return item.title;
| }
| },
| },
| };
| </script>
|
|
| <style lang="less">
| .nav-beadcrumb-darkblue {
| .ivu-breadcrumb a {
| color: hsla(0, 0%, 100%, 0.65);
| }
| .ivu-breadcrumb > span:last-child {
| color: hsla(0, 0%, 100%, 0.65);
| }
| }
|
| .nav-beadcrumb-primary, .nav-beadcrumb-black {
| .ivu-breadcrumb {
| color: #f0f0f0;
| }
| .ivu-breadcrumb a {
| color: #fff;
| }
| .ivu-breadcrumb > span:last-child {
| color: #fff;
| }
| }
| </style>
|
|