ss
This commit is contained in:
@@ -8,8 +8,8 @@
|
||||
<div class="h1"><font style="vertical-align: inherit;" v-if="curMenu"><font style="vertical-align: inherit;"> {{curMenu.name}}</font></font></div>
|
||||
|
||||
<ul class="content" v-if="curMenu">
|
||||
<li class="category" v-for=" sonmenu in curMenu.child" :key="sonmenu.name">
|
||||
<router-link :to="sonmenu.url" class="categoryHead h2 linkProduct">
|
||||
<li class="category" v-for=" sonmenu in curMenu.child" :key="sonmenu.name" >
|
||||
<router-link :to="sonmenu.url" :class="sonmenu.strong" >
|
||||
<div class="triangle"></div>
|
||||
<font style="vertical-align: inherit;">
|
||||
<font style="vertical-align: inherit;"> {{sonmenu.name}}</font>
|
||||
@@ -33,22 +33,31 @@ export default {
|
||||
menus: window.config.menus,
|
||||
isMobile: false,
|
||||
curMenu: null,
|
||||
curChildMenu: null
|
||||
curChildMenu: null,
|
||||
strong: ""
|
||||
};
|
||||
},
|
||||
created: function() {
|
||||
this.mobileHide();
|
||||
this.Init();
|
||||
},
|
||||
methods: {
|
||||
mobileHide: function() {
|
||||
Init: function() {
|
||||
this.isMobile = common.isMobile();
|
||||
var path = this.$route.fullPath.split("/");
|
||||
|
||||
this.curMenu = this.menus.find(p => {
|
||||
return p.url.indexOf(path[1]) > 0;
|
||||
});
|
||||
|
||||
this.curChildMenu = this.curMenu.child.find(p => {
|
||||
return p.url.indexOf(path[2]);
|
||||
return p.url.indexOf(path[2]) > 0;
|
||||
});
|
||||
|
||||
this.curMenu.child.map(p => {
|
||||
p.strong = "categoryHead h2 linkProduct";
|
||||
if (p.url.indexOf(path[2]) > 0) {
|
||||
this.curChildMenu.strong = "categoryHead h2 linkProduct strong";
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user