取消自动滚动
This commit is contained in:
@@ -142,7 +142,7 @@ Vue.component("scrollTable", {
|
|||||||
const dom = this.$el.querySelector('.el-table__body-wrapper')
|
const dom = this.$el.querySelector('.el-table__body-wrapper')
|
||||||
this.scroll = new SimpleBar(dom)
|
this.scroll = new SimpleBar(dom)
|
||||||
dom.addEventListener('mouseover', this.stopAutoScroll)
|
dom.addEventListener('mouseover', this.stopAutoScroll)
|
||||||
dom.addEventListener('mouseout', this.autoScroll)
|
// dom.addEventListener('mouseout', this.autoScroll)
|
||||||
// this.scroll.refresh();
|
// this.scroll.refresh();
|
||||||
},
|
},
|
||||||
autoScroll() {
|
autoScroll() {
|
||||||
@@ -163,13 +163,13 @@ Vue.component("scrollTable", {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initScroll()
|
this.initScroll()
|
||||||
this.autoScroll()
|
// this.autoScroll()
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
this.stopAutoScroll()
|
this.stopAutoScroll()
|
||||||
const dom = this.$el.querySelector('.el-table__body-wrapper')
|
const dom = this.$el.querySelector('.el-table__body-wrapper')
|
||||||
dom.removeEventListener("mouseover", this.stopAutoScroll)
|
dom.removeEventListener("mouseover", this.stopAutoScroll)
|
||||||
dom.removeEventListener("mouseout", this.autoScroll)
|
// dom.removeEventListener("mouseout", this.autoScroll)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
Vue.component("tableColumn", {
|
Vue.component("tableColumn", {
|
||||||
|
|||||||
Reference in New Issue
Block a user