This repository has been archived on 2023-08-30. You can view files and clone it, but cannot push or open issues/pull-requests.
bytedo
/
wcui
Archived
1
0
Fork 0

优化scroll

old
宇天 2020-05-13 16:18:06 +08:00
parent d74ccf6fc6
commit 538f22f453
1 changed files with 3 additions and 1 deletions

View File

@ -244,7 +244,7 @@ export default class Scroll {
})
// 鼠标滚动事件
this._wheelFn = $.catch(this.__BOX__, 'wheel', ev => {
this._wheelFn = $.bind(this.__BOX__, 'wheel', ev => {
// 禁用状态, 不允许滚动
if (this.disabled) {
return
@ -295,6 +295,7 @@ export default class Scroll {
}
ev.preventDefault()
ev.stopPropagation()
this.props.thumbY = fixedY
this.__Y__.style.transform = `translateY(${fixedY}px)`
@ -318,6 +319,7 @@ export default class Scroll {
}
ev.preventDefault()
ev.stopPropagation()
this.props.thumbX = fixedX
this.__X__.style.transform = `translateX(${fixedX}px)`