vue脚手架引入less

安装依赖 npm i less@4.1.2,npm i less-loader@6.0.0

在页面使用加上lang='less' 和scope

<style lang="less" scope>
    .el-menu-vertical-demo:not(.el-menu--collapse) {
    width: 200px;
    min-height: 400px;
    
    }
    .el-menu{
    height: 100vh;
    h1{
        color: #fff;
        margin-left: 36px;
    }
  }

</style>

  

posted @ 2023-06-27 23:56  sgj191024  阅读(38)  评论(0编辑  收藏  举报