mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 02:31:21 +00:00
[improvement] check event.cancelable before preventDefault
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import { use } from '../utils';
|
||||
import Loading from '../loading';
|
||||
import { preventDefault } from '../utils/event';
|
||||
import { TouchMixin } from '../mixins/touch';
|
||||
import { getScrollTop, getScrollEventTarget } from '../utils/scroll';
|
||||
import Loading from '../loading';
|
||||
|
||||
const [sfc, bem, t] = use('pull-refresh');
|
||||
const TEXT_STATUS = ['pulling', 'loosing', 'success'];
|
||||
@@ -90,7 +91,7 @@ export default sfc({
|
||||
if (this.ceiling && this.deltaY >= 0) {
|
||||
if (this.direction === 'vertical') {
|
||||
this.setStatus(this.ease(this.deltaY));
|
||||
event.cancelable && event.preventDefault();
|
||||
preventDefault(event);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user