Commit bd94fbf7 authored by zhengke's avatar zhengke

改为自适应高度

parent 9dfa7b49
......@@ -96,7 +96,7 @@
<span style="color:#000000;background-color: #02F78E;padding:2px 4px;border-radius:5px">特别价</span>
</div>
<template v-if="isShow">
<el-table v-if="dataList.length>0" :data="dataList" style="width:100%" border v-loading='loading' height="500">
<el-table v-if="dataList.length>0" :data="dataList" style="width:100%" border v-loading='loading' :height="tableHeight">
<el-table-column fixed label="酒店名称" min-width="180">
<template slot-scope="scope">
<div style="text-decoration: underline;cursor:pointer" @click="GotoHotel(scope.row.HotelId)">
......@@ -265,6 +265,7 @@
//供应商
Supplier: 0,
},
tableHeight: 0,
beforeCheck: {
disabledDate: time => {
if (this.msg.StartDate) {
......@@ -376,6 +377,16 @@
});
}
},
com_onresize() {
//clientHeight的值由DIV内容的实际高度和CSS中的padding值决定,
var contentsHeight = document.body.clientHeight;
var h = contentsHeight - 50 - 180 - 50;
if (h < 110) {
return;
}
//设置table的行高
this.tableHeight = h;
},
getList() {
this.loading = true;
if (this.msg.StartDate == null) {
......@@ -592,7 +603,11 @@
this.GetHotelList();
this.getList();
this.GetHotelTipList();
},
this.com_onresize();
window.onresize = () => {
this.com_onresize();
}
}
};
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment