We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
设置parent后,父级窗口大小改变,限制的位置没有重新计算
The text was updated successfully, but these errors were encountered:
有想到解决的方法吗?
Sorry, something went wrong.
自己打了个补丁,供参考
export function initParent(containerRef: Ref<HTMLElement | undefined>) { const parentWidth = ref(0) const parentHeight = ref(0) const upParent = ()=>{ if (containerRef.value && containerRef.value.parentElement) { const { width, height } = getElSize(containerRef.value.parentElement) parentHeight.value = height parentWidth.value = width } } onMounted(() => { upParent(); const observer = new ResizeObserver(upParent); observer.observe(containerRef.value!.parentElement as any) }) return { parentWidth, parentHeight } }
No branches or pull requests
设置parent后,父级窗口大小改变,限制的位置没有重新计算
The text was updated successfully, but these errors were encountered: