AI智能
改变未来

element-ui网页面全屏


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%;}

 

赞(0) 打赏
未经允许不得转载:爱站程序员基地 » element-ui网页面全屏