Committed by
shuaiguo
iphoneX适配
Showing
2 changed files
with
11 additions
and
1 deletions
@@ -21,7 +21,11 @@ export default { | @@ -21,7 +21,11 @@ export default { | ||
21 | } | 21 | } |
22 | }, | 22 | }, |
23 | windowHeight() { | 23 | windowHeight() { |
24 | - return window.innerHeight + 'px'; | 24 | + if (typeof window !== 'undefined') { |
25 | + return window.innerHeight + 'px'; | ||
26 | + } else { | ||
27 | + return '100%'; | ||
28 | + } | ||
25 | } | 29 | } |
26 | }, | 30 | }, |
27 | mounted() { | 31 | mounted() { |
@@ -102,4 +102,10 @@ export default { | @@ -102,4 +102,10 @@ export default { | ||
102 | width: 100%; | 102 | width: 100%; |
103 | background-color: white; | 103 | background-color: white; |
104 | } | 104 | } |
105 | + | ||
106 | +@supports (bottom: env(safe-area-inset-bottom)) { | ||
107 | + .footer { | ||
108 | + height: calc(env(safe-area-inset-bottom) + 100px); | ||
109 | + } | ||
110 | +} | ||
105 | </style> | 111 | </style> |
-
Please register or login to post a comment