做vue项目。

1、在assets文件夹中,新建一个global.css文件。

html,body,#app {
  height: 100%;
  margin: 0;
  padding: 0;
}

2、然后在main.js中引入 global.css

import '@/assets/css/global.css'

3、后续给你所有的组件设置 height:100% 就可以了。

eg:

 <el-container class="layout-container">
    <el-aside width="300px">
    </el-aside>
 <el-container>
.layout-container {
  height: 100%;
}

相关文章:

  • 2021-11-29
  • 2022-12-23
  • 2021-10-10
  • 2021-12-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-08
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案