提交 5f3400d4 编写于 作者: tony001's avatar tony001

update:更新

上级 6d1d4a84
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</div> </div>
<div v-if="containerModel.CENTER" :style="containerModel.CENTER.style" <div v-if="containerModel.CENTER" :style="containerModel.CENTER.style"
class="no-style overflow-auto app-scroll-container__center"> class="no-style overflow-auto app-scroll-container__center">
<div v-for="name of containerModel.CENTER.name" class="container-item__pos"> <div v-for="name of containerModel.CENTER.name" class="container-item__pos" :style="getItemPosStyle(name)">
<slot :name="name"></slot> <slot :name="name"></slot>
</div> </div>
</div> </div>
...@@ -166,6 +166,17 @@ export default class AppScrollContainer extends Vue { ...@@ -166,6 +166,17 @@ export default class AppScrollContainer extends Vue {
this.containerModel.CENTER.style.width = minusWidth ? `calc(100%${minusWidth})` : '100%'; this.containerModel.CENTER.style.width = minusWidth ? `calc(100%${minusWidth})` : '100%';
} }
} }
/**
* 获取项布局样式
*/
public getItemPosStyle(name: string) {
const itemName = this.index ? `${name}_${this.index}` : name;
let layoutModel = this.layoutModelDetails[itemName];
if (layoutModel) {
return layoutModel.getBoxLayOutStyle();
}
}
} }
</script> </script>
<style lang='less'> <style lang='less'>
......
...@@ -450,9 +450,11 @@ export class PanelDetailModel { ...@@ -450,9 +450,11 @@ export class PanelDetailModel {
Object.assign(boxStyle, { 'flex-grow': 1, 'min-width': `${(100 / 12)}%`, 'height': '100%' }); Object.assign(boxStyle, { 'flex-grow': 1, 'min-width': `${(100 / 12)}%`, 'height': '100%' });
} }
} }
// 识别边缘布局 // 项如果设置宽高,布局应该对应设置宽高且不应该设置flex布局
if (this.layout == 'BORDER') { const boxSize = this.getBoxSizeStyle();
Object.assign(boxStyle, { 'display': 'flex' }); if (boxSize && Object.keys(boxSize).length > 0) {
Object.assign(boxStyle, boxSize);
Object.assign(boxStyle, { 'flex': 'none' });
} }
return boxStyle; return boxStyle;
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册