vue 项目中的less

收先要在cmd中运行

npm install less less-loader --save

然后会在 moudules文件夹中生成less 和less-loader 

<style lang="less" rel="stylesheet/less">
#app{
  .tab{
    display: flex;
    width: 100%;
    height: 40px;
    line-height: 40px;
    .tab-item{
      flex: 1;
      text-align: center;
    }
  }
}
</style>

这样就可以

原文地址:https://www.cnblogs.com/vivenZ/p/6533605.html