listenerScroll() {
let dom1 = this.$refs.table1.bodyWrapper
let dom2 = this.$refs.table2.bodyWrapper
dom2.addEventListener('scroll', () => {
// 横滚
dom1.scrollLeft = dom2.scrollLeft
// 竖滚
dom1.scrollTop = dom2.scrollTop
})
dom1.addEventListener('scroll', () => {
// 横滚
dom2.scrollLeft = dom1.scrollLeft
dom2.scrollTop = dom1.scrollTop
})
}
.table {
.table1 {
.el-table__body-wrapper {
&::-webkit-scrollbar { // 整个滚动条
width: 0; // 纵向滚动条的宽度
background: rgba(213,215,220,0.3);
border: none;
height: 0;
}
&::-webkit-scrollbar-track { // 滚动条轨道
border: none;
}
}
.el-table__fixed,.el-table__fixed-right {
height: 100% !important;
}
}
}