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

update: 自定义布局样式优化

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