表格无限拉伸处理

lijinlong
吕天方 1 year ago
parent b2a0f76b3b
commit 50a16c6f6b

@ -188,4 +188,8 @@ aside {
vertical-align: middle;
margin-bottom: 10px;
}
}
//
::-webkit-scrollbar {
width: 0 !important;height: 0;
}

@ -18,7 +18,7 @@ router.beforeEach((to, from, next) => {
to.meta.title && store.dispatch("settings/setTitle", to.meta.title);
/* has token*/
if (to.path === "/toLogin") {
next({ path: "/" });
next();
NProgress.done();
} else {
if (store.getters.roles.length === 0) {

@ -4,10 +4,10 @@
* @Author: JC9527
* @Date: 2023-09-04 10:20:06
* @LastEditors: JC9527
* @LastEditTime: 2023-09-05 15:45:49
* @LastEditTime: 2023-09-06 11:07:37
-->
<template>
<div class="container-main" ref="main" :style="main">
<div class="container-main" ref="main">
<div class="enforce-the-law-title">
<div class="filtrate-condition">
<div class="select-input">
@ -45,10 +45,11 @@
<span>导出excel</span>
</div>
</div>
<div class="tables">
<div class="tables" :style="main">
<el-table
:data="tableData"
style="width: 100%"
height="100%"
:border="false"
:row-class-name="tableRowClassName"
:cell-style="columnStyle"
@ -232,11 +233,11 @@
mounted() {
this.checkListTwo = this.checkList;
this.$nextTick(()=>{
let dom = document.getElementsByClassName('container-main');
let dom = document.getElementsByClassName('tables');
let height = dom[0].getBoundingClientRect();
let windowHeight = window.innerHeight;
let relativeHeight = windowHeight - height.top
this.main.height = relativeHeight + 'px'
this.main.height = relativeHeight - 80 + 'px'
})
},
};
@ -246,6 +247,7 @@
// height: calc(100vh - 84px);
overflow: hidden;
padding: 0 20px;
height: 100%;
background-color: #fff;
.enforce-the-law-title {
display: flex;
@ -361,17 +363,13 @@
display: none;
}
}
.el-table__body-wrapper {
height: 430px !important;
overflow-y: auto;
}
}
::v-deep .el-table::before {
height: 0;
}
}
.pagination {
margin-top: 30px;
margin-top: 40px;
}
}
</style>

@ -1,5 +1,5 @@
<template>
<div class="container-main" ref="main" :style="main">
<div class="container-main" ref="main">
<div class="filtrate">
<div class="one-line">
<div class="select-input">
@ -79,10 +79,11 @@
<div class="select-btn">搜索</div>
</div>
</div>
<div class="tables">
<div class="tables" :style="main">
<el-table
:data="tableData"
style="width: 100%"
height="100%"
:border="false"
:row-class-name="tableRowClassName"
>
@ -212,11 +213,11 @@
mounted() {
this.checkListTwo = this.checkList;
this.$nextTick(()=>{
let dom = document.getElementsByClassName('container-main');
let dom = document.getElementsByClassName('tables');
let height = dom[0].getBoundingClientRect();
let windowHeight = window.innerHeight;
let relativeHeight = windowHeight - height.top
this.main.height = relativeHeight + 'px'
this.main.height = relativeHeight - 50 + 'px'
})
},
};
@ -224,7 +225,7 @@
<style lang="scss" scoped>
.container-main {
// height: calc(100vh - 84px);
// height: 100%;
height: 100%;
overflow: hidden;
padding: 0 20px;
background-color: #fff;
@ -366,10 +367,10 @@
display: none;
}
}
.el-table__body-wrapper {
height: 450px !important;
overflow-y: auto;
}
// .el-table__body-wrapper {
// height: 450px !important;
// overflow-y: auto;
// }
}
::v-deep .el-table::before {
height: 0;

@ -4,10 +4,10 @@
* @Author: JC9527
* @Date: 2023-09-04 10:20:06
* @LastEditors: JC9527
* @LastEditTime: 2023-09-05 15:54:32
* @LastEditTime: 2023-09-06 11:07:50
-->
<template>
<div class="plan-management" :style="main">
<div class="plan-management">
<div class="plan-topBox">
<div class="drup-downs">
<div class="year">
@ -45,11 +45,11 @@
</div>
</div>
<div class="plan-bottomBox">
<div class="tables">
<div class="tables" :style="main">
<el-table
:data="tableData"
style="width: 100%"
:border="false"
height="100%"
@selection-change="handleSelectionChange"
:row-class-name="tableRowClassName"
>
@ -131,6 +131,18 @@
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},{
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},{
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},{
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-02',
name: '王小虎',
@ -228,11 +240,11 @@
mounted() {
this.checkListTwo = this.checkList;
this.$nextTick(()=>{
let dom = document.getElementsByClassName('plan-management');
let dom = document.getElementsByClassName('tables');
let height = dom[0].getBoundingClientRect();
let windowHeight = window.innerHeight;
let relativeHeight = windowHeight - height.top
this.main.height = relativeHeight + 'px'
this.main.height = relativeHeight - 80 + 'px'
})
},
}
@ -241,6 +253,7 @@
.plan-management {
padding: 0 20px;
background-color: #fff;
height: 100%;
.plan-topBox {
display: flex;
justify-content: space-between;
@ -324,6 +337,7 @@
}
}
.plan-bottomBox {
margin-top: 10px;
.tables {
background-color: #EAF2FD;
.tabs-btns {
@ -376,17 +390,13 @@
display: none;
}
}
.el-table__body-wrapper {
height: 450px !important;
overflow-y: auto;
}
}
::v-deep .el-table::before {
height: 0;
}
}
.pagination {
margin-top: 20px;
margin-top: 40px;
}
}
}

Loading…
Cancel
Save