Skip to content

Commit

Permalink
优化
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuyihe committed Jul 18, 2019
1 parent 227a65a commit df22fbf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
1 change: 0 additions & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>vue-admin-project</title>
</head>

<body>
<noscript>
<strong>We're sorry but my_project doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
Expand Down
22 changes: 14 additions & 8 deletions src/views/layout/components/Aside.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@
:index="threeItem.index"
>{{$t('route.'+threeItem.title) }}</el-menu-item>
</el-submenu>
<el-menu-item v-else :index="subItem.index" :key="subItem.index">{{$t('route.'+subItem.title) }}</el-menu-item>
<el-menu-item
v-else
:index="subItem.index"
:key="subItem.index"
>{{$t('route.'+subItem.title) }}</el-menu-item>
</template>
</el-submenu>
</template>
Expand Down Expand Up @@ -62,8 +66,7 @@ export default {
data() {
return {};
},
mounted() {
},
mounted() {},
computed: {
onRoutes() {
return this.$route.path.replace("/", "");
Expand Down Expand Up @@ -112,11 +115,14 @@ export default {
return res;
},
select(index, indexPath) {
// console.log(index, indexPath);
if(indexPath.indexOf('home')>-1) return
let breadList=['home']
breadList.push(...indexPath)
this.$store.commit('SET_BREAD',breadList)
console.log(index, indexPath);
if (indexPath.indexOf("home") > -1) return;
if (index!==null) {
let breadList = ["home"];
breadList.push(...indexPath);
console.log(breadList);
this.$store.commit("SET_BREAD", breadList);
}
}
}
};
Expand Down

0 comments on commit df22fbf

Please sign in to comment.