同事写的样式,可以学习一下。
左侧列表固定宽度237。而右侧计算方法:
width: calc(100% - 254px);
// 左边树 + 右边列表
.vc-page-parts {
height: 100%;
display: flex;
justify-content: space-between;
// 左侧树
.part-left {
width: 237px;
height: 100%;
margin-right: 15px;
border: 1px solid #edeef2;
.scrollbar;
.org-tree {
min-width: 100%;
display: inline-block !important;
.is-current > .el-tree-node__content:first-child {
// background: #FAFAFA;
background-color: #f0f7ff;
color: #409EFF;
font-weight: 700;
}
.el-tree-node__content {
height: 34px;
line-height: 34px;
padding-right: 5px;
}
}
}
// 右侧列表
.part-right {
width: calc(100% - 254px);
height: calc(100% + 15px);
padding: 15px;
padding-bottom: 0;
margin: -15px;
.scrollbar;
}
}