|
|
|
@ -21,7 +21,7 @@
@@ -21,7 +21,7 @@
|
|
|
|
|
import { useWindowSizeFn } from '/@/hooks/event/useWindowSizeFn'; |
|
|
|
|
import { ScrollContainer } from '/@/components/Container'; |
|
|
|
|
import { createModalContext } from '../hooks/useModalContext'; |
|
|
|
|
import { useMutationObserver } from '@vueuse/core'; |
|
|
|
|
import {MaybeElementRef, useMutationObserver} from '@vueuse/core'; |
|
|
|
|
|
|
|
|
|
const props = { |
|
|
|
|
loading: { type: Boolean }, |
|
|
|
@ -55,7 +55,7 @@
@@ -55,7 +55,7 @@
|
|
|
|
|
useWindowSizeFn(setModalHeight.bind(null, false)); |
|
|
|
|
|
|
|
|
|
useMutationObserver( |
|
|
|
|
spinRef, |
|
|
|
|
spinRef as MaybeElementRef, |
|
|
|
|
() => { |
|
|
|
|
setModalHeight(); |
|
|
|
|
}, |
|
|
|
@ -125,7 +125,7 @@
@@ -125,7 +125,7 @@
|
|
|
|
|
const modalDom = bodyDom.parentElement && bodyDom.parentElement.parentElement; |
|
|
|
|
if (!modalDom) return; |
|
|
|
|
|
|
|
|
|
const modalRect = getComputedStyle(modalDom).top; |
|
|
|
|
const modalRect = getComputedStyle(modalDom as Element).top; |
|
|
|
|
const modalTop = Number.parseInt(modalRect); |
|
|
|
|
let maxHeight = |
|
|
|
|
window.innerHeight - |
|
|
|
|