@tntd/antd-cover

3.0.4 • Public • Published
  • 安装模块 npm install @tntd/antd-cover --save

  • 在引入样式的地方引入 @import "~@tntd/antd-cover/index.less";。此文件代表部分antd的样式强制覆盖。修改目录,例如salaxy的styles/style.less

  • 配置文件例如.babelrc中,加载less而非css,修改如下:

     [
         "import",
         {
             "libraryName": "antd",
             "libraryDirectory": "es",
             "style": true // 有些可能是css,改成true
         }
     ]
  • 修改编译文件webapck中modifyVars如下:

暗黑风格

    {
        test: /\.less$/,
        use: [
            devMode ? "style-loader" : MiniCssExtractPlugin.loader,
            "css-loader",
            {
                loader: "less-loader",
                options: {
                    javascriptEnabled: true,
                    modules: true,
                    localIndexName: "[name]__[local]___[hash:base64:5]",
                    modifyVars: {
                        hack: "true; @import \"~@tntd/antd-cover/tnt.less\";"
                    }
                }
            }
        ]
    }

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @tntd/antd-cover

      Weekly Downloads

      6

      Version

      3.0.4

      License

      ISC

      Unpacked Size

      72 kB

      Total Files

      9

      Last publish

      Collaborators

      • kobingogo
      • mcfly001
      • z337198954
      • td-tnt
      • bruceliu68
      • bernardzhang
      • mizy
      • zhouzefei
      • xiaofei.wang
      • anthonyli
      • popoqaq
      • ezios