mirror of
https://github.com/youzan/vant.git
synced 2025-10-21 03:11:15 +00:00
fix(DropdownMenu): incorrect menu position when scroll (#5313)
This commit is contained in:
@@ -2,6 +2,7 @@ import { createNamespace } from '../utils';
|
||||
import { BORDER_TOP_BOTTOM } from '../utils/constant';
|
||||
import { ParentMixin } from '../mixins/relation';
|
||||
import { ClickOutsideMixin } from '../mixins/click-outside';
|
||||
import { getScrollEventTarget } from '../utils/dom/scroll';
|
||||
|
||||
const [createComponent, bem] = createNamespace('dropdown-menu');
|
||||
|
||||
@@ -44,6 +45,12 @@ export default createComponent({
|
||||
};
|
||||
},
|
||||
|
||||
computed: {
|
||||
scroller() {
|
||||
return getScrollEventTarget(this.$el);
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
updateOffset() {
|
||||
const { menu } = this.$refs;
|
||||
|
Reference in New Issue
Block a user