fix(Popup): lockScroll not work #7738
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
# 更新日志
|
||||
|
||||
### v1.0.1
|
||||
|
||||
`2020-12-27`
|
||||
|
||||
- 导出个别内部方法供 Vant 使用
|
||||
|
||||
### v1.0.0
|
||||
|
||||
`2020-12-15`
|
||||
|
||||
@@ -28,12 +28,15 @@ export function getScrollParent(el: Element, root: ScrollElement = window) {
|
||||
return root;
|
||||
}
|
||||
|
||||
export function useScrollParent(el: Ref<Element | undefined>) {
|
||||
export function useScrollParent(
|
||||
el: Ref<Element | undefined>,
|
||||
root: ScrollElement = window
|
||||
) {
|
||||
const scrollParent = ref<Element | Window>();
|
||||
|
||||
onMounted(() => {
|
||||
if (el.value) {
|
||||
scrollParent.value = getScrollParent(el.value);
|
||||
scrollParent.value = getScrollParent(el.value, root);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user