|
|
@@ -3,7 +3,7 @@
|
|
|
<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>
|
|
|
- <a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
|
|
|
+<!-- <a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>-->
|
|
|
</el-breadcrumb-item>
|
|
|
</transition-group>
|
|
|
</el-breadcrumb>
|
|
|
@@ -32,9 +32,9 @@ export default {
|
|
|
let matched = this.$route.matched.filter(item => item.meta && item.meta.title)
|
|
|
const first = matched[0]
|
|
|
|
|
|
- if (!this.isDashboard(first)) {
|
|
|
- matched = [{ path: '/dashboard', meta: { title: 'Dashboard' }}].concat(matched)
|
|
|
- }
|
|
|
+ // if (!this.isDashboard(first)) {
|
|
|
+ // matched = [{ path: '/dashboard', meta: { title: 'Dashboard' }}].concat(matched)
|
|
|
+ // }
|
|
|
|
|
|
this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
|
|
|
},
|
|
|
@@ -47,12 +47,12 @@ export default {
|
|
|
},
|
|
|
pathCompile(path) {
|
|
|
// To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561
|
|
|
- const { params } = this.$route
|
|
|
+ const {params} = this.$route
|
|
|
var toPath = pathToRegexp.compile(path)
|
|
|
return toPath(params)
|
|
|
},
|
|
|
handleLink(item) {
|
|
|
- const { redirect, path } = item
|
|
|
+ const {redirect, path} = item
|
|
|
if (redirect) {
|
|
|
this.$router.push(redirect)
|
|
|
return
|