1、在App.vue中html, body, #app中设置height: 100%;
[code]//App.vue<template><div id=\"app\"><router-view/></div></template><style lang=\"less\">html, body , #app{height: 100%;}</style>
2、布局页面中第一个el-container设置height: 100%;
[code]<template><el-container class=\"home-container\"><el-header>Header</el-header><el-container><Aside></Aside><el-main><router-view></router-view></el-main></el-container></el-container></template><script>// @ is an alias to /srcimport Aside from \'../components/Aside\'export default {name: \'Home\',components: { Aside }}</script><style lang=\"less\">.home-container {height: 100%;}