This commit is contained in:
xuyucheng 2022-12-15 17:03:12 +08:00
parent 55a3f7372d
commit 4bec1b54c4
1 changed files with 16 additions and 6 deletions

View File

@ -2,6 +2,7 @@
<div style="width: 100%; height: 100%" ref="container"> <div style="width: 100%; height: 100%" ref="container">
<el-table <el-table
ref="table" ref="table"
:data="data" :data="data"
:height="height" :height="height"
:row-key="rowKey" :row-key="rowKey"
@ -126,12 +127,11 @@ export default {
setHeight() { setHeight() {
this.$nextTick(() => { this.$nextTick(() => {
setTimeout(() => { setTimeout(() => {
this.height = this.height = this.$refs&&this.$refs.container.clientHeight
this.$refs && this.$refs.container.clientHeight ? this.page
? this.page ? this.$refs.container.clientHeight - 30
? this.$refs.container.clientHeight - 30 : this.$refs.container.clientHeight
: this.$refs.container.clientHeight : "100%";
: "100%";
}, 0); }, 0);
}); });
}, },
@ -238,16 +238,26 @@ export default {
user-select: initial; user-select: initial;
} }
/* 表格内背景颜色 */
::v-deep .el-table tr,
::v-deep .el-table td {
background-color: transparent !important;
// @include border(map-get($dark,border));
}
/*去除底边框*/ /*去除底边框*/
::v-deep .el-table td.el-table__cell { ::v-deep .el-table td.el-table__cell {
user-select: initial; user-select: initial;
} }
.el-table::before, .el-table::before,
.el-table::after { .el-table::after {
background-color: transparent; background-color: transparent;
} }
::v-deep .el-table .cell { ::v-deep .el-table .cell {
user-select: initial; user-select: initial;
} }