|
|
@@ -5,7 +5,7 @@
|
|
|
<div style="flex:100" class="body__panel">
|
|
|
<headeTemp></headeTemp>
|
|
|
<div>
|
|
|
- <menuTemp class="sticky normal-margin" ref="menu"></menuTemp>
|
|
|
+ <menuTemp class="sticky normal-margin" :style="marginTrue ? 'margin-bottom:70px !important' : 'margin-bottom:16px'" ref="menu"></menuTemp>
|
|
|
<div class="radius">
|
|
|
<keep-alive :include="pageCache">
|
|
|
<router-view></router-view>
|
|
|
@@ -43,14 +43,38 @@ export default {
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
|
-
|
|
|
+ timer:null,
|
|
|
+ marginTrue:false
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
|
getModules (mod,type) {
|
|
|
// this.$refs['menu'].setModules(mod,type)
|
|
|
+ },
|
|
|
+ debouned () {
|
|
|
+ if (this.timer) {
|
|
|
+ clearTimeout(this.timer)
|
|
|
+ }
|
|
|
+ this.timer = setTimeout(() => {
|
|
|
+ if (this.$refs.menu.$el.clientWidth < 1210) {
|
|
|
+ this.marginTrue = true
|
|
|
+ } else {
|
|
|
+ this.marginTrue = false
|
|
|
+ }
|
|
|
+ },200)
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ window.addEventListener('resize',this.debouned)
|
|
|
+
|
|
|
+ this.$nextTick(() => {
|
|
|
+ if (this.$refs.menu.$el.clientWidth < 1210) {
|
|
|
+ this.marginTrue = true
|
|
|
+ } else {
|
|
|
+ this.marginTrue = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
@@ -77,7 +101,6 @@ export default {
|
|
|
}
|
|
|
.sticky {
|
|
|
position: sticky;
|
|
|
- min-width:1280px;
|
|
|
}
|
|
|
.radius{
|
|
|
/* margin: 16px 0; */
|