提交 d6c059c7 编写于 作者: RedPig97's avatar RedPig97

update: 自定义布局样式优化

上级 b2d9e688
......@@ -135,6 +135,9 @@ export default class AppNavPos extends Vue {
if (Object.is(currentModel.viewType, 'APPINDEXVIEW')) {
Object.assign(containerStyle, { 'background-color': '#f0f2f5' });
}
if (!containerStyle.height) {
Object.assign(containerStyle, { 'height': '0', flex: 'auto' });
}
return containerStyle;
}
}
......
......@@ -9,7 +9,7 @@
<div class="app-scroll-container__middle" :style="middleContainerStyle">
<div v-if="containerModel.WEST" :style="containerModel.WEST.style"
class="no-style overflow-auto app-scroll-container__left">
<div v-for="name of containerModel.WEST.name" class="container-item__pos">
<div v-for="name of containerModel.WEST.name" class="container-item__pos" :style="getItemPosStyle(name)">
<slot :name="name"></slot>
</div>
</div>
......@@ -21,7 +21,7 @@
</div>
<div v-if="containerModel.EAST" :style="containerModel.EAST.style"
class="no-style overflow-auto app-scroll-container__right">
<div v-for="name of containerModel.EAST.name" class="container-item__pos">
<div v-for="name of containerModel.EAST.name" class="container-item__pos" :style="getItemPosStyle(name)">
<slot :name="name"></slot>
</div>
</div>
......@@ -174,12 +174,15 @@ export default class AppScrollContainer extends Vue {
const itemName = this.index ? `${name}_${this.index}` : name;
let layoutModel = this.layoutModelDetails[itemName];
if (layoutModel) {
const boxSizeStyle: any = layoutModel.getBoxSizeStyle();
if (!boxSizeStyle.width) {
const childBoxSizeStyle: any = layoutModel.getBoxSizeStyle();
const boxSizeStyle: any = {};
if (!childBoxSizeStyle.width) {
Object.assign(boxSizeStyle, { 'width': '100%' });
}
if (!boxSizeStyle.height) {
if (!childBoxSizeStyle.height) {
Object.assign(boxSizeStyle, { 'height': '100%' });
} else {
Object.assign(boxSizeStyle, { 'display': 'contents' });
}
if (!layoutModel.visible) {
Object.assign(boxSizeStyle, { display: 'none' })
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册