一、css 高度设置成100vh height: 100vh;
二、动态获取
HTML
<div class="content" :style={height:vdaH}></div>
JS
<script> export default { name: 'login', data() { return { vdaH:0, } }, methods: { }, created() { let h = document.documentElement.clientHeight || document.body.clientHeight; this.vdaH = h - 130 + 'px'; }, }; </script>