子组件上下结构布局自适应父组件宽度高度
生活随笔
收集整理的這篇文章主要介紹了
子组件上下结构布局自适应父组件宽度高度
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
1、父級頁面
<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 Code2、子組件頁面內容
css部分內容:
<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>
轉載于:https://www.cnblogs.com/phermis/p/11599257.html
總結
以上是生活随笔為你收集整理的子组件上下结构布局自适应父组件宽度高度的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: sqlserver 多表更新
- 下一篇: 安装svn、git等托管软件