Commit a02bdfc0 authored by 康振飞's avatar 康振飞

导航面包屑

parent c3fd2de7
...@@ -9,16 +9,23 @@ ...@@ -9,16 +9,23 @@
<table class="t_table_box"> <table class="t_table_box">
<tr> <tr>
<td class="t_title"> <td class="t_title">
<a class="a_goIndex" @click="goIndex"> <a class="a_goIndex">
<b class="title">首页</b> <b class="title">首页</b>
</a> </a>
</td> </td>
</tr> <td>
<tr> <ul class="table_row_ul">
<td class="t_title"> <li>
<a class="a_goIndex" @click="goIndexTwo"> <a class="a_goIndex" @click="goIndex">
<b class="title">首页二</b> 首页一
</a> </a>
</li>
<li>
<a class="a_goIndex" @click="goIndexTwo">
首页二
</a>
</li>
</ul>
</td> </td>
</tr> </tr>
<tr v-for="(item,i) in filterSider"> <tr v-for="(item,i) in filterSider">
...@@ -28,8 +35,8 @@ ...@@ -28,8 +35,8 @@
</td> </td>
<td> <td>
<ul class="table_row_ul"> <ul class="table_row_ul">
<li v-for="(li,j) in item.children"> <li v-for="(li) in item.children">
<a @click="goPage(li,j)" :class="{'active': li.id === isActive}">{{li.title}}</a> <a @click="goPage(item,li)" :class="{'active': li.id === isActive}">{{li.title}}</a>
</li> </li>
</ul> </ul>
</td> </td>
...@@ -39,7 +46,24 @@ ...@@ -39,7 +46,24 @@
</div> </div>
</span> </span>
</a> </a>
<i-header-breadcrumb v-if="showBreadcrumb && !headerMenu && !isMobile" ref="breadcrumb" /> <!-- <i-header-breadcrumb v-if="showBreadcrumb && !headerMenu && !isMobile" ref="breadcrumb" /> -->
<!-- {{}} -->
<Breadcrumb class="i-layout-header-breadcrumb" v-if="homeMenuItem==''">
<BreadcrumbItem to="/" class="white">
<Icon type="ios-home" title="首页"/>
</BreadcrumbItem>
</Breadcrumb>
<Breadcrumb class="i-layout-header-breadcrumb" v-else-if="homeMenuItem!=''" separator=">">
<BreadcrumbItem to="/" class="white">
<Icon type="ios-home" title="首页"/>
</BreadcrumbItem>
<BreadcrumbItem>
{{homeMenu}}
</BreadcrumbItem>
<BreadcrumbItem :to="parthto" class="white">
{{homeMenuItem}}
</BreadcrumbItem>
</Breadcrumb>
<i-header-search v-if="showSearch && !headerMenu && !isMobile && !showBreadcrumb" /> <i-header-search v-if="showSearch && !headerMenu && !isMobile && !showBreadcrumb" />
<div class="header_right"> <div class="header_right">
<i-header-search <i-header-search
...@@ -113,7 +137,11 @@ export default { ...@@ -113,7 +137,11 @@ export default {
headerVisible: true, headerVisible: true,
oldScrollTop: 0, oldScrollTop: 0,
isDelayHideSider: false, // hack,当从隐藏侧边栏的 header 切换到正常 header 时,防止 Logo 抖动 isDelayHideSider: false, // hack,当从隐藏侧边栏的 header 切换到正常 header 时,防止 Logo 抖动
loadRouter: true loadRouter: true,
homeMenu:'',
homeMenuItem:"",
parthto:'',
}; };
}, },
computed: { computed: {
...@@ -287,15 +315,24 @@ export default { ...@@ -287,15 +315,24 @@ export default {
} }
}); });
}, },
goPage(u) { goPage(u,li) {
this.$router.push(u.path) this.$router.push(li.path)
this.isActive = u.id this.isActive = li.id
this.homeMenu = u.title
this.homeMenuItem = li.title
this.parthto = li.path
}, },
goIndex(){ goIndex(){
this.$router.push("/") this.$router.push("/")
this.homeMenu = ''
this.homeMenuItem = ''
this.isActive = 0
}, },
goIndexTwo(){ goIndexTwo(){
this.$router.push("/home") this.$router.push("/home")
this.homeMenu = ''
this.homeMenuItem = ''
this.isActive = 0
} }
}, },
mounted() { mounted() {
...@@ -311,6 +348,18 @@ export default { ...@@ -311,6 +348,18 @@ export default {
</script> </script>
<style lang="less"> <style lang="less">
.i-layout-header-breadcrumb .ivu-breadcrumb-item {
color: #A7B8CC!important;//wheat
}
.i-layout-header-breadcrumb .ivu-breadcrumb-item-link {
color: #ffffff!important;//wheat
}
.white{
color: #ffffff!important;
// a{
// color: #ffffff!important;
// }
}
.product-layout { .product-layout {
.ivu-layout-header { .ivu-layout-header {
height: 50px; height: 50px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment