Commit 53571b9e authored by caixingbing's avatar caixingbing

*

parent a4c91c10
......@@ -7,7 +7,7 @@
<i slot="prefix" class="el-input__icon el-icon-search" @click="handleSearch"></i>
</el-input>
<el-menu
default-active="1"
:default-active="routeIndex"
class="detail-menu"
@open="handleOpen">
<template v-for="(item, index) in sideRoute">
......@@ -31,6 +31,10 @@ export default {
type: Number,
default: null
},
pathName: {
type: String,
default: null
},
},
data() {
return {
......@@ -93,6 +97,23 @@ export default {
sideHeight = null
}
return sideHeight
},
routeIndex(){
let idx = '0-0', sideArr = this.sideRoute
for(let i=0; i < sideArr.length; i++){
if(sideArr[i].pathName == this.pathName){
idx = i.toString()
break
}else if(sideArr[i].children){
for(let j=0; j< sideArr[i].children.length ; j++){
if(sideArr[i].children.pathName == this.pathName){
idx = i+'-'+j
break
}
}
}
}
return idx
}
},
created() {
......
......@@ -3,7 +3,7 @@
<Header :company-id="companyId" v-if="companyId" />
<div class="flex-box part-main">
<div class="part-left">
<side-bar @currentPath="showPartPage" :partBoxHeight="partBoxHeight" />
<side-bar @currentPath="showPartPage" :pathName="currentPath.pathName" :partBoxHeight="partBoxHeight" />
</div>
<div class="part-right">
<div id="partBox" v-if="companyId">
......
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