improve breadcrumb

This commit is contained in:
liangping 2022-08-25 11:28:46 +08:00
parent f286fb1230
commit 566fae5916
2 changed files with 13 additions and 2 deletions

View File

@ -24,6 +24,12 @@
class="align-text-top" class="align-text-top"
/> />
</b-breadcrumb-item> </b-breadcrumb-item>
<b-breadcrumb-item
:to="`/${chainname}`"
class="text-uppercase"
>
{{ chainname }}
</b-breadcrumb-item>
<b-breadcrumb-item <b-breadcrumb-item
v-for="item in $route.meta.breadcrumb" v-for="item in $route.meta.breadcrumb"
:key="item.text" :key="item.text"
@ -65,5 +71,10 @@ export default {
BRow, BRow,
BCol, BCol,
}, },
computed: {
chainname() {
return this.$store?.state?.chains?.selected?.chain_name
},
},
} }
</script> </script>

View File

@ -124,10 +124,10 @@ const router = new VueRouter({
alias: '/:chain', alias: '/:chain',
component: () => import('@/views/Dashboard.vue'), component: () => import('@/views/Dashboard.vue'),
meta: { meta: {
pageTitle: 'Home', pageTitle: 'Dashboard',
breadcrumb: [ breadcrumb: [
{ {
text: 'Home', text: 'Dashboard',
active: true, active: true,
}, },
], ],