|
@@ -1,5 +1,9 @@
|
|
|
<template>
|
|
|
- <el-breadcrumb class="app-breadcrumb" separator-class="el-icon-arrow-right" v-if="isDashborad">
|
|
|
+ <el-breadcrumb
|
|
|
+ class="app-breadcrumb"
|
|
|
+ separator-class="el-icon-arrow-right"
|
|
|
+ v-if="isDashborad"
|
|
|
+ >
|
|
|
<transition-group name="breadcrumb">
|
|
|
<el-breadcrumb-item v-for="(item, index) in levelList" :key="item.path">
|
|
|
<span
|
|
@@ -21,7 +25,7 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
levelList: null,
|
|
|
- isDashborad: true
|
|
|
+ isDashborad: true,
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -31,7 +35,7 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
this.getBreadcrumb();
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
created() {
|
|
|
this.getBreadcrumb();
|
|
@@ -45,9 +49,9 @@ export default {
|
|
|
const first = matched[0];
|
|
|
|
|
|
if (this.isDashboard(first)) {
|
|
|
- this.isDashborad = false
|
|
|
- }else{
|
|
|
- this.isDashborad = true
|
|
|
+ this.isDashborad = false;
|
|
|
+ } else {
|
|
|
+ this.isDashborad = true;
|
|
|
}
|
|
|
|
|
|
this.levelList = matched.filter(
|
|
@@ -76,11 +80,10 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
this.$router.push(this.pathCompile(path));
|
|
|
- }
|
|
|
- }
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
-
|
|
|
</style>
|