Commit bd94fbf7 authored by zhengke's avatar zhengke

改为自适应高度

parent 9dfa7b49
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
<span style="color:#000000;background-color: #02F78E;padding:2px 4px;border-radius:5px">特别价</span> <span style="color:#000000;background-color: #02F78E;padding:2px 4px;border-radius:5px">特别价</span>
</div> </div>
<template v-if="isShow"> <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"> <el-table-column fixed label="酒店名称" min-width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="text-decoration: underline;cursor:pointer" @click="GotoHotel(scope.row.HotelId)"> <div style="text-decoration: underline;cursor:pointer" @click="GotoHotel(scope.row.HotelId)">
...@@ -265,6 +265,7 @@ ...@@ -265,6 +265,7 @@
//供应商 //供应商
Supplier: 0, Supplier: 0,
}, },
tableHeight: 0,
beforeCheck: { beforeCheck: {
disabledDate: time => { disabledDate: time => {
if (this.msg.StartDate) { if (this.msg.StartDate) {
...@@ -376,6 +377,16 @@ ...@@ -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() { getList() {
this.loading = true; this.loading = true;
if (this.msg.StartDate == null) { if (this.msg.StartDate == null) {
...@@ -592,7 +603,11 @@ ...@@ -592,7 +603,11 @@
this.GetHotelList(); this.GetHotelList();
this.getList(); this.getList();
this.GetHotelTipList(); this.GetHotelTipList();
}, this.com_onresize();
window.onresize = () => {
this.com_onresize();
}
}
}; };
</script> </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