rev:滚动条修改

This commit is contained in:
2023-07-26 16:28:37 +08:00
parent 2bb73dd0e1
commit a9722cf663

View File

@@ -70,9 +70,9 @@
</el-table-column> </el-table-column>
</template> </template>
</el-table> </el-table>
<!-- <div ref="topScroll" class="top-scroll" @scroll="handleScrollTop"> <div ref="topScroll" class="top-scroll" @scroll="handleScrollTop">
<div class="top-scroll-content" :key="key" :style="{ width: topScrollWidth }" /> <div class="top-scroll-content" :key="key" :style="{ width: topScrollWidth }" />
</div>--> </div>
<el-table <el-table
ref="dtl_table" ref="dtl_table"
:key="key" :key="key"
@@ -188,7 +188,7 @@ export default {
handleScrollTop() { handleScrollTop() {
if (this.$refs.topScroll) { if (this.$refs.topScroll) {
var scrollLeft = this.$refs.topScroll.scrollLeft var scrollLeft = this.$refs.topScroll.scrollLeft
var scrollTop = this.$refs.topScroll.scrollTop var scrollTop = this.$refs.dtl_table.bodyWrapper.scrollTop
this.$refs.dtl_table.bodyWrapper.scrollTo(scrollLeft, scrollTop) this.$refs.dtl_table.bodyWrapper.scrollTo(scrollLeft, scrollTop)
// this.refreshTable() // this.refreshTable()
} }