mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 18:14:13 +00:00
[bugfix] popup scrollable element (#429)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import manager from './popup-manager';
|
||||
import context from './popup-context';
|
||||
import scrollUtils from '../../utils/scroll';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
@@ -58,7 +59,7 @@ export default {
|
||||
const dx = e.touches[0].clientX - pos.x;
|
||||
const dy = e.touches[0].clientY - pos.y;
|
||||
const direction = dy > 0 ? '10' : '01';
|
||||
const el = this.$el.querySelector('.scroller') || this.$el;
|
||||
const el = scrollUtils.getScrollEventTarget(e.target, this.$el);
|
||||
const scrollTop = el.scrollTop;
|
||||
const scrollHeight = el.scrollHeight;
|
||||
const offsetHeight = el.offsetHeight;
|
||||
|
Reference in New Issue
Block a user