mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 10:44:59 +00:00
[Improvement] reduce scroll utils (#1112)
This commit is contained in:
@@ -12,7 +12,7 @@ function doBindEvent() {
|
||||
}
|
||||
this.el[CONTEXT].binded = true;
|
||||
|
||||
this.scrollEventListener = Utils.debounce(handleScrollEvent.bind(this), 200);
|
||||
this.scrollEventListener = handleScrollEvent.bind(this);
|
||||
this.scrollEventTarget = Utils.getScrollEventTarget(this.el);
|
||||
|
||||
const disabledExpr = this.el.getAttribute('waterfall-disabled');
|
||||
@@ -78,10 +78,8 @@ function handleScrollEvent() {
|
||||
function startBind(el) {
|
||||
const context = el[CONTEXT];
|
||||
|
||||
context.vm.$nextTick(function() {
|
||||
if (Utils.isAttached(el)) {
|
||||
doBindEvent.call(el[CONTEXT]);
|
||||
}
|
||||
context.vm.$nextTick(() => {
|
||||
doBindEvent.call(el[CONTEXT]);
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user