add breadcrumb

This commit is contained in:
AceDataCloud committed 2021-08-28 15:19:33 +08:00
1 parent 1ff6d27ab8
commit fc378d4903
10 files changed
+52 -14

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
<template>
<el-breadcrumb separator="/">
<el-breadcrumb-item :to="{ path: '/' }">{{ $t('common.nav.home') }}</el-breadcrumb-item>
<el-breadcrumb-item v-for="item in items" :to="{ name: item.name }">{{ item.meta.title }}</el-breadcrumb-item>
</el-breadcrumb>
</template>
<script>
export default {
data() {
return {
items: this.$route.matched
};
},
mounted() {
console.log('this', this.$route);
}
};
</script>
+2 -2
View File
@@ -7,8 +7,8 @@
<el-row>
<el-col>
<el-menu :default-active="active" class="el-menu-demo" mode="horizontal" @select="onSelect">
<el-menu-item index="home" v-t="'common.home'" v-if="false"></el-menu-item>
<el-menu-item index="editor" v-t="'common.editor'"></el-menu-item>
<el-menu-item index="home" v-t="'common.nav.home'" v-if="false"></el-menu-item>
<el-menu-item index="editor" v-t="'common.nav.editor'"></el-menu-item>
</el-menu>
</el-col>
</el-row>
+3 -2
View File
@@ -1,3 +1,4 @@
import TopHeader from '@/components/common/TopHeader.vue';
import TopHeader from './TopHeader.vue';
import Breadcrumb from './Breadcrumb.vue';
export { TopHeader };
export { TopHeader, Breadcrumb };
+4 -4
View File
@@ -1,16 +1,16 @@
<template>
<el-menu class="h-full">
<el-menu-item>
<el-icon :size="size" :color="color" class="mr-2">
<el-icon class="mr-2">
<document />
</el-icon>
<template #title>{{ $t('content.sidebar.article') }}</template>
<template #title>{{ $t('content.nav.article') }}</template>
</el-menu-item>
<el-menu-item>
<el-icon :size="size" :color="color" class="mr-2">
<el-icon class="mr-2">
<box />
</el-icon>
<template #title>{{ $t('content.sidebar.platform') }}</template>
<template #title>{{ $t('content.nav.platform') }}</template>
</el-menu-item>
</el-menu>
</template>