Committed by
shuaiguo
修改弹出键盘导致下方安全区域消失的问题
Showing
3 changed files
with
9 additions
and
13 deletions
1 | <template> | 1 | <template> |
2 | - <div id="app"> | 2 | + <div id="app" :style="{height: 'calc(' + windowHeight + ' + env(safe-area-inset-bottom))' }"> |
3 | <keep-alive :max="20"> | 3 | <keep-alive :max="20"> |
4 | <router-view :key="routerViewKey"></router-view> | 4 | <router-view :key="routerViewKey"></router-view> |
5 | </keep-alive> | 5 | </keep-alive> |
@@ -20,6 +20,9 @@ export default { | @@ -20,6 +20,9 @@ export default { | ||
20 | return this.$route.fullPath; | 20 | return this.$route.fullPath; |
21 | } | 21 | } |
22 | }, | 22 | }, |
23 | + windowHeight() { | ||
24 | + return window.innerHeight + 'px'; | ||
25 | + } | ||
23 | }, | 26 | }, |
24 | mounted() { | 27 | mounted() { |
25 | if (this.yoho.context.needLogin) { | 28 | if (this.yoho.context.needLogin) { |
@@ -66,7 +66,6 @@ export default { | @@ -66,7 +66,6 @@ export default { | ||
66 | rule: productData.imageList[0].rule, | 66 | rule: productData.imageList[0].rule, |
67 | more: productData.imageList[0].more | 67 | more: productData.imageList[0].more |
68 | }; | 68 | }; |
69 | - console.log(this.productList) | ||
70 | } | 69 | } |
71 | }; | 70 | }; |
72 | </script> | 71 | </script> |
@@ -74,13 +73,15 @@ export default { | @@ -74,13 +73,15 @@ export default { | ||
74 | <style lang="scss" scoped> | 73 | <style lang="scss" scoped> |
75 | ul { | 74 | ul { |
76 | width: 100%; | 75 | width: 100%; |
76 | + height: 100%; | ||
77 | list-style: none; | 77 | list-style: none; |
78 | margin: 0; | 78 | margin: 0; |
79 | padding: 0; | 79 | padding: 0; |
80 | background-image: url("//ad.yoho.cn/html5/2019/10/activity/008/base/repeat_bg.jpg?imageslim"); | 80 | background-image: url("//ad.yoho.cn/html5/2019/10/activity/008/base/repeat_bg.jpg?imageslim"); |
81 | background-repeat: repeat-y; | 81 | background-repeat: repeat-y; |
82 | background-size: 100% auto; | 82 | background-size: 100% auto; |
83 | - overflow: hidden; | 83 | + overflow-x: hidden; |
84 | + overflow-y: scroll; | ||
84 | -webkit-overflow-scrolling: touch; | 85 | -webkit-overflow-scrolling: touch; |
85 | 86 | ||
86 | li { | 87 | li { |
@@ -554,17 +554,9 @@ body { | @@ -554,17 +554,9 @@ body { | ||
554 | margin-bottom: env(safe-area-inset-bottom); | 554 | margin-bottom: env(safe-area-inset-bottom); |
555 | } | 555 | } |
556 | 556 | ||
557 | - #app { | 557 | + /*#app { |
558 | height: calc(100% + env(safe-area-inset-bottom)); | 558 | height: calc(100% + env(safe-area-inset-bottom)); |
559 | - } | ||
560 | - | ||
561 | - .layout { | ||
562 | - padding-bottom: env(safe-area-inset-bottom); | ||
563 | - } | ||
564 | - | ||
565 | - .layout.no-safe-area { | ||
566 | - padding-bottom: 0; | ||
567 | - } | 559 | + }*/ |
568 | } | 560 | } |
569 | 561 | ||
570 | /* stylelint-disable */ | 562 | /* stylelint-disable */ |
-
Please register or login to post a comment