umi-plugin-dynamic-theme

2.2.1 • Public • Published

umi-plugin-dynamic-theme

umi-plugin-antd-theme 的 fork 版本

NPM version NPM downloads

Usage

Configure in config/theme.config.json,

{
  "theme": [
    {
      "theme": "dark",
      "fileName": "dark.css"
    },
    {
      "fileName": "mingQing.css",
      "modifyVars": {
        "@primary-color": "#13C2C2"
      }
    }
  ],
  // css
  "min": true,
  // css module
  "isModule": true,
  //  antd 
  "ignoreAntd": false,
  //  pro-layout
  "ignoreProLayout": false,
  // 使
  "cache": true
}

or configure in config/theme.config.js,

module.exports = {
  theme: [
    {
      theme: "dark",
      fileName: "dark.css",
    },
    {
      fileName: "mingQing.css",
      modifyVars: {
        "@primary-color": "#13C2C2",
      },
    },
  ],
  // 是否压缩css
  min: true,
  // css module
  isModule: true,
  // 忽略 antd 的依赖
  ignoreAntd: false,
  // 忽略 pro-layout
  ignoreProLayout: false,
  // 不使用缓存
  cache: true,
};

you can get config in window.umi_plugin_ant_themeVar

LICENSE

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i umi-plugin-dynamic-theme

Weekly Downloads

0

Version

2.2.1

License

MIT

Unpacked Size

17.3 kB

Total Files

7

Last publish

Collaborators

  • sengmitnick