perf(pagewrapper): 优化PageWrapper的高度自适应表现使用getViewportOffset替代useContentViewHeight (#792)

Co-authored-by: NorthLan <lan6995@gmail.com>
This commit is contained in:
Lan
2021-06-23 23:16:47 +08:00
committed by GitHub
parent c4b22a225d
commit 4d8e39857e
4 changed files with 135 additions and 90 deletions

View File

@@ -19,7 +19,7 @@ export function useContentViewHeight() {
const contentHeight = ref(window.innerHeight);
const pageHeight = ref(window.innerHeight);
const getViewHeight = computed(() => {
return unref(contentHeight) - unref(headerHeightRef) || 0;
return unref(contentHeight) - unref(headerHeightRef) - unref(footerHeightRef) || 0;
});
useWindowSizeFn(