uniapp配置scss支持

在开发 uniapp 的时候发现默认 style 是不支持 scss 模式开发样式,这样的话使用 --status-bar-height 就没有办法变成想要的数值了,这时候就需要开启 scss 支持。

  1. HbuilderX 工具 -> 插件安装 找到 scss/sass编译 安装

  2. 在 style 中 添加 lang 属性

    <style lang="scss">
    
     .status_bar {
          height: var(--status-bar-height);
          width: 100%;
      }
    </style>
    

这样 uniapp 就支持 scss 样式编译了。

posted @ 2019-08-12 17:16  奔跑的砖头  阅读(12379)  评论(0编辑  收藏  举报