已经完成自适应高度的预警

This commit is contained in:
yanyizhou
2021-11-24 11:02:49 +08:00
parent 221cadb3c1
commit 569469b865
+22 -12
View File
@@ -113,11 +113,12 @@
</el-row>
</el-form>
</div>
<div class="content" style="height: 100%">
<div class="content">
<!-- <el-divider content-position="left" class="dynamic-child-title">实施日期预警</el-divider>-->
<el-table
:data="newItems"
height="335px"
style="overflow-y: auto;"
:height="warningTableHeight"
border
:resizable="false"
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
@@ -369,6 +370,7 @@ export default {
name: "standardWarning",
data() {
return {
warningTableHeight: '',
applyArcticOptions: [], // 适用车型下拉框
isShowBtn: true,
activeName: "STANDARD", //tab 默认选中值
@@ -764,9 +766,14 @@ export default {
},
watch: {},
mounted() {
this.height = $(".content").height() * 1.8;
this.warningTableHeight = $(window).height()*0.54
window.onresize = () => {
this.height = $(".content").height() * 1.8;
this.warningTableHeight = $(window).height()*0.54;
};
// alert(this.warningTableHeight)
this.height = $(".content").height();
window.onresize = () => {
this.height = $(".content").height();
};
//从数据库中查询下拉框数据
this.$http.get("sys/dictype/getDicTypeListCode", {}, {
@@ -1055,6 +1062,17 @@ export default {
// }
}
.content {
padding-bottom: 10px;
height: calc(~'100% - 40px');
/deep/ .el-button--mini {
padding: 5px 7px;
font-size: 8px;
}
}
.dynamic-loop-container {
position: relative;
min-height: 160px;
@@ -1134,15 +1152,7 @@ export default {
}
}
.content {
padding-bottom: 10px;
height: calc(~'100% - 40px');
/deep/ .el-button--mini {
padding: 5px 7px;
font-size: 8px;
}
}
}
::v-deep {