@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\";"
                        }
                    }
                }
            ]
        }

    Keywords

    none

    Install

    npm i @tntd/antd-cover

    DownloadsWeekly Downloads

    24

    Version

    3.0.4

    License

    ISC

    Unpacked Size

    72 kB

    Total Files

    9

    Last publish

    Collaborators

    • ezios
    • td-tnt
    • bruceliu68
    • bernardzhang
    • mizy
    • zhouzefei
    • leocmial
    • xiaofei.wang
    • anthonyli
    • xiaocuicui
    • popoqaq