Vertical structural layout adaptive subassembly parent component Width Height

1, the parent page

<template>
  <div>
    <div class="parentDiv">
      <!-- gys-org-navigator 在这里是全局注册组件 -->
      <gys-org-navigator ref="orgNavigator" :org-tree="orgTree" :org-id="orgId" :org-type="orgType" @select="doSelect" />
    </div>
  </div>
</template>
<style scoped>
  .parentDiv{
      width: 220px;
      height: 600px;
  }
</style>
View Code

2, sub-assemblies page content

css part:

<template>
  <div>
    <div class="query-search"></div>
    <div class="tree-list-warp-panel"></div>
  </div>
</template>
<style scoped>
.query-search {
    position: relative;
    background: #fff;
    z-index: 9;
}
.tree-list-warp-panel {
    position: absolute;
    top: 35px;
    min-height: 50px;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
}
</style>
    

  

Guess you like

Origin www.cnblogs.com/phermis/p/11599257.html