|
@@ -6,7 +6,7 @@
|
|
|
<headeTemp></headeTemp>
|
|
|
<div>
|
|
|
<!-- <menuTemp class="sticky normal-margin" :style="marginTrue ? 'margin-bottom:70px !important' : 'margin-bottom:16px'" ref="menu" style="background: red"></menuTemp>-->
|
|
|
- <menuTemp class="sticky normal-margin" ref="menu" ></menuTemp>
|
|
|
+ <menuTemp class="sticky normal-margin" ref="menu" @switch="debouned"></menuTemp>
|
|
|
<div class="radius" ref="divContent" :style="{'marginTop':divTop,'height':divHeight}">
|
|
|
<keep-alive :include="pageCache">
|
|
|
<router-view></router-view>
|
|
@@ -60,8 +60,6 @@ export default {
|
|
|
clearTimeout(this.timer)
|
|
|
}
|
|
|
this.timer = setTimeout(() => {
|
|
|
- console.log(this.$refs.menu.$refs.menuList.$el.clientHeight,'高度')
|
|
|
- console.log(this.$refs.menu.$refs.menuList.$el.clientHeight / 60)
|
|
|
let size = this.$refs.menu.$refs.menuList.$el.clientHeight / 60 -1
|
|
|
if (this.$refs.menu.$refs.menuList.$el.clientHeight === 120){
|
|
|
this.divTop =(this.$refs.menu.$refs.menuList.$el.clientHeight - (45 * size)) + 'px'
|
|
@@ -70,7 +68,6 @@ export default {
|
|
|
}
|
|
|
|
|
|
/* this.divHeight = (this.$refs.divContent.clientHeight - this.$refs.menu.$refs.menuList.$el.clientHeight + 10) + 'px'*/
|
|
|
- console.log(this.divTop,this.divHeight)
|
|
|
/* if (this.$refs.menu.$el.clientWidth < 1206 && Array.from(this.$refs.menu.$el.getElementsByTagName('li')).filter(item => item.className.indexOf('el-submenu') != -1).length > 8) {
|
|
|
this.marginTrue = true
|
|
|
} else {
|
|
@@ -91,10 +88,9 @@ export default {
|
|
|
}*/
|
|
|
},
|
|
|
created() {
|
|
|
-
|
|
|
window.addEventListener('resize',this.debouned)
|
|
|
this.$nextTick(() => {
|
|
|
-
|
|
|
+ this.debouned()
|
|
|
})
|
|
|
},
|
|
|
}
|