Commit 76b9970f authored by lixiaolei's avatar lixiaolei

Merge remote-tracking branch 'origin/master'

parents 847f8d2a a292d17d
<template>
<div class="app-container part-container">
商务信息
<div style="background: #FFFFFF; height: 300px;">
商务信息
</div>
</div>
</template>
......
<template>
<div class="detail-container">
<div id="detailPart" class="detail-container" :style="sideHeight?'height:'+sideHeight+'px':''">
<el-input
placeholder="搜索"
class="side-input"
......@@ -26,6 +26,12 @@
<script>
export default {
name: 'Sidebar',
props: {
partBoxHeight: {
type: Number,
default: null
},
},
data() {
return {
searchText: '',
......@@ -78,6 +84,17 @@ export default {
]
}
},
computed: {
sideHeight() {
let sideHeight = document.getElementById("detailPart")?document.getElementById("detailPart").offsetHeight:null
if(sideHeight<this.partBoxHeight) {
sideHeight = this.partBoxHeight
}else {
sideHeight = null
}
return sideHeight
}
},
created() {
},
methods: {
......@@ -98,6 +115,7 @@ export default {
.detail-container{
width: 144px;
min-height: calc(100vh - 170px);
padding-bottom: 20px;
background: #FFFFFF;
.side-input{
width: 128px;
......
......@@ -3,17 +3,20 @@
<Header />
<div class="flex-box part-main">
<div class="part-left">
<side-bar @currentPath="showPartPage" />
<side-bar @currentPath="showPartPage" :partBoxHeight="partBoxHeight" />
</div>
<div class="part-right">
<!-- <Financial v-if="currentPath.pathName=='financial'" />-->
<!-- <Business v-if="currentPath.pathName=='business'" />-->
<div id="partBox">
<Financial v-if="currentPath.pathName=='financial'" />
<Business v-if="currentPath.pathName=='business'" />
</div>
</div>
</div>
</div>
</template>
<script>
import elementResizeDetectorMaker from "element-resize-detector"
import Header from "./component/Header"
import SideBar from "./component/Sidebar"
import Financial from "./financial"
......@@ -30,11 +33,20 @@ export default {
return {
currentPath: {
pathName: 'financial' //默认展示页
}
},
partBoxHeight: null
}
},
created() {
},
mounted() {
const _this = this, erd = elementResizeDetectorMaker(), partBox = document.getElementById("partBox")
erd.listenTo(partBox, element => {
_this.$nextTick(() => {
_this.partBoxHeight = partBox.offsetHeight
})
})
},
methods: {
showPartPage(e){
this.currentPath = e
......
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