Browse Source

IOS端小程序底部安全高度适配

v3
蟑螂恶霸 2 years ago
parent
commit
6d6fe086bd
  1. 7
      src/assets/style/index.less
  2. 8
      src/components/footer-enforcement-nav/index.vue
  3. 11
      src/components/footer-nav/index.vue
  4. 3
      src/views/Home.vue
  5. 3
      src/views/HomeWx.vue
  6. 3
      src/views/enforceHome.vue

7
src/assets/style/index.less

@ -25,8 +25,11 @@ html,body,#app{
height: 50px; height: 50px;
} }
.footer_body { .footer_body{
height: 2rem; height: 50px;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
box-sizing: content-box;
} }
.no_data{ .no_data{

8
src/components/footer-enforcement-nav/index.vue

@ -45,12 +45,16 @@ let data = reactive({
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.footer_nav{ .footer_nav{
height: 2.0rem; height: 50px;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
box-sizing: content-box;
background-color: #fff; background-color: #fff;
/*box-shadow: 0 0 0.27rem #e5e5e5;*/ /*box-shadow: 0 0 0.27rem #e5e5e5;*/
.footer-bar{ .footer-bar{
position: absolute; position: absolute;
bottom: 0.6rem; bottom: constant(safe-area-inset-bottom);
bottom: env(safe-area-inset-bottom);
} }
} }

11
src/components/footer-nav/index.vue

@ -28,16 +28,17 @@ let data = reactive({
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.footer_body{
height: 2rem;
}
.footer_nav{ .footer_nav{
height: 2.0rem; heighheight: 50px;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
box-sizing: content-box;
background-color: #fff; background-color: #fff;
/*box-shadow: 0 0 0.27rem #e5e5e5;*/ /*box-shadow: 0 0 0.27rem #e5e5e5;*/
.footer-bar{ .footer-bar{
position: absolute; position: absolute;
bottom: 0.6rem; bottom: constant(safe-area-inset-bottom);
bottom: env(safe-area-inset-bottom);
} }
} }

3
src/views/Home.vue

@ -299,8 +299,7 @@
.boutique_box { .boutique_box {
position: absolute; position: absolute;
width: 100%; width: 100%;
bottom: calc(0.5rem + constant(safe-area-inset-bottom)); bottom: 0.5rem;
bottom: calc(0.5rem + env(safe-area-inset-bottom));
.boutique_body { .boutique_body {
padding: 0 0 0.27rem 0; padding: 0 0 0.27rem 0;

3
src/views/HomeWx.vue

@ -250,8 +250,7 @@
.boutique_box { .boutique_box {
position: absolute; position: absolute;
width: 100%; width: 100%;
bottom: calc(0.5rem + constant(safe-area-inset-bottom)); bottom: 0.5rem;
bottom: calc(0.5rem + env(safe-area-inset-bottom));
.boutique_body { .boutique_body {
padding: 0 0 0.27rem 0; padding: 0 0 0.27rem 0;

3
src/views/enforceHome.vue

@ -354,8 +354,7 @@
.boutique_box { .boutique_box {
position: absolute; position: absolute;
width: 100%; width: 100%;
bottom: calc(0.5rem + constant(safe-area-inset-bottom)); bottom: 0.5rem;
bottom: calc(0.5rem + env(safe-area-inset-bottom));
.boutique_body { .boutique_body {
padding: 0 0 0.27rem 0; padding: 0 0 0.27rem 0;

Loading…
Cancel
Save