12345678 |
-
- // 这个值先取, 不能动态
- // 因为移动端出现输入法的时候会变
- const height = document.documentElement.clientHeight || document.body.clientHeight;
-
- export function getPageStyle(fitHeight) {
- return fitHeight > height ? { height: `${fitHeight}px`, overflow: 'hidden' } : { height: `${height}px`, overflow: 'hidden' }
- }
|