uniapp全屏高度

1.页面

<template>
    <view class="container" :style="'height:'+ screenHeight +'px !important;'">
        <view class="login_box">
            
        </view>
    </view>
</template>

2.js

<script>
    export default {
        data() {
            return {
                screenHeight: '',
            }
        },
        methods: {
            
        },
        onLoad() {
            this.screenHeight = uni.getSystemInfoSync().windowHeight;
        }
    }
</script>

原文地址:https://www.cnblogs.com/yqq520/p/13933069.html