项目执行表滚动条调整
parent
bfa923b3ac
commit
35a32950a7
|
@ -36,7 +36,7 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="f1">
|
<div class="f1" style="position: relative">
|
||||||
<CustomTable
|
<CustomTable
|
||||||
:columns="fixedColumns"
|
:columns="fixedColumns"
|
||||||
:tableData="executionData"
|
:tableData="executionData"
|
||||||
|
@ -46,10 +46,11 @@
|
||||||
tableHeight="600"
|
tableHeight="600"
|
||||||
:border="true"
|
:border="true"
|
||||||
></CustomTable>
|
></CustomTable>
|
||||||
|
<div id="scrollBox">
|
||||||
|
<div id="scrollBoxContent"></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 右侧滚动列表格 -->
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -90,6 +91,21 @@ export default {
|
||||||
});
|
});
|
||||||
this.timeRange = [this.dateRange[0], this.dateRange[1]];
|
this.timeRange = [this.dateRange[0], this.dateRange[1]];
|
||||||
this.executionData = res.data;
|
this.executionData = res.data;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
let table = document.querySelector(
|
||||||
|
".el-table__body-wrapper .el-table__body"
|
||||||
|
);
|
||||||
|
let width = table.offsetWidth;
|
||||||
|
let tableBox = document.querySelector(".el-table__body-wrapper");
|
||||||
|
let box = document.getElementById("scrollBoxContent");
|
||||||
|
let scroll = document.getElementById("scrollBox");
|
||||||
|
box.style.width = width + "px";
|
||||||
|
scroll.addEventListener("scroll", (event) => {
|
||||||
|
tableBox.scrollLeft = scroll.scrollLeft;
|
||||||
|
});
|
||||||
|
},500);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
getFixedColumnsSummaries(param) {
|
getFixedColumnsSummaries(param) {
|
||||||
const { columns, data } = param;
|
const { columns, data } = param;
|
||||||
|
@ -377,23 +393,18 @@ export default {
|
||||||
// left: 450px;
|
// left: 450px;
|
||||||
// z-index: 100;
|
// z-index: 100;
|
||||||
}
|
}
|
||||||
// ::v-deep .el-table__footer td {
|
|
||||||
// border: none !important;
|
::v-deep .el-table__body-wrapper::-webkit-scrollbar {
|
||||||
// }
|
display: none;
|
||||||
// ::v-deep .el-table__body-wrapper,::v-deep thead.has-gutter{
|
}
|
||||||
// position: relative;
|
|
||||||
// left: 550px;
|
#scrollBox {
|
||||||
// .el-table__cell{
|
width: 100%;
|
||||||
// width: 100px !important;
|
overflow: auto;
|
||||||
// }
|
position: absolute;
|
||||||
// .is-hidden {
|
bottom: 50px;
|
||||||
// display: none;
|
#scrollBoxContent {
|
||||||
// }
|
height: 20px;
|
||||||
// }
|
}
|
||||||
// ::v-deep .el-table__body-wrapper{
|
}
|
||||||
// max-width: 68% !important;
|
|
||||||
// }
|
|
||||||
// ::v-deep .el-table--fit{
|
|
||||||
// overflow-x: hidden;
|
|
||||||
// }
|
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue