取消自动滚动

This commit is contained in:
aixianling
2024-08-22 15:15:52 +08:00
parent 61f0926548
commit aa97ececc1

View File

@@ -142,7 +142,7 @@ Vue.component("scrollTable", {
const dom = this.$el.querySelector('.el-table__body-wrapper')
this.scroll = new SimpleBar(dom)
dom.addEventListener('mouseover', this.stopAutoScroll)
dom.addEventListener('mouseout', this.autoScroll)
// dom.addEventListener('mouseout', this.autoScroll)
// this.scroll.refresh();
},
autoScroll() {
@@ -162,14 +162,14 @@ Vue.component("scrollTable", {
}
},
mounted() {
this.initScroll()
this.autoScroll()
this.initScroll()
// this.autoScroll()
},
beforeDestroy() {
this.stopAutoScroll()
const dom = this.$el.querySelector('.el-table__body-wrapper')
dom.removeEventListener("mouseover", this.stopAutoScroll)
dom.removeEventListener("mouseout", this.autoScroll)
// dom.removeEventListener("mouseout", this.autoScroll)
}
})
Vue.component("tableColumn", {