fix #issues3

pull/59/head
smallwei 7 years ago
parent 920e28ed99
commit 6d449910b5
  1. 8
      src/page/index/top/index.vue
  2. 2
      src/page/index/top/top-lang.vue
  3. 10
      src/page/index/top/top-search.vue

@ -13,10 +13,10 @@
v-if="showMenu"> v-if="showMenu">
<top-menu></top-menu> <top-menu></top-menu>
</div> </div>
<!--<span class="top-bar__item" <span class="top-bar__item"
v-if="showSearch"> v-if="showSearch">
<top-search></top-search> <top-search></top-search>
</span>--> </span>
</div> </div>
<div class="top-bar__right"> <div class="top-bar__right">
<el-tooltip v-if="showColor" <el-tooltip v-if="showColor"
@ -93,7 +93,7 @@ import { mapGetters, mapState } from "vuex";
import { fullscreenToggel, listenfullscreen } from "@/util/util"; import { fullscreenToggel, listenfullscreen } from "@/util/util";
import topLock from "./top-lock"; import topLock from "./top-lock";
import topMenu from "./top-menu"; import topMenu from "./top-menu";
// import topSearch from "./top-search"; import topSearch from "./top-search";
import topTheme from "./top-theme"; import topTheme from "./top-theme";
import topLogs from "./top-logs"; import topLogs from "./top-logs";
import topColor from "./top-color"; import topColor from "./top-color";
@ -102,7 +102,7 @@ export default {
components: { components: {
topLock, topLock,
topMenu, topMenu,
// topSearch, topSearch,
topTheme, topTheme,
topLogs, topLogs,
topColor, topColor,

@ -31,7 +31,7 @@ export default {
let tag = this.tag; let tag = this.tag;
let title = this.$router.$avueRouter.generateTitle( let title = this.$router.$avueRouter.generateTitle(
tag.label, tag.label,
tag.meta.i18n (tag.meta || {}).i18n
); );
//label //label
this.$router.$avueRouter.setTitle(title); this.$router.$avueRouter.setTitle(title);

@ -56,9 +56,11 @@ export default {
const findMenu = list => { const findMenu = list => {
for (let i = 0; i < list.length; i++) { for (let i = 0; i < list.length; i++) {
const ele = Object.assign({}, list[i]); const ele = Object.assign({}, list[i]);
if (ele[this.childrenKey]) findMenu(ele[this.childrenKey]); if (this.validatenull(ele[this.childrenKey])) {
delete ele[this.childrenKey]; this.menuList.push(ele);
this.menuList.push(ele); } else {
findMenu(ele[this.childrenKey]);
}
} }
}; };
this.menuList = []; this.menuList = [];
@ -86,7 +88,7 @@ export default {
path: this.$router.$avueRouter.getPath({ path: this.$router.$avueRouter.getPath({
name: item[this.labelKey], name: item[this.labelKey],
src: item[this.pathKey], src: item[this.pathKey],
i18n: item.meta.i18n i18n: (item.meta || {}).i18n
}), }),
query: item.query query: item.query
}); });

Loading…
Cancel
Save