0.0.7 • Published 4 years ago

theme-scheme v0.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

动态主题

文档说明

  • dist/utils.esm.js:工具类方法;

    • export function registerTheme(theme: {[key: string]: string}): 同时更改 ant & custum;
      theme {
        '--ant-primary-color': '#fff',
        '--custom-primary-color': '#fff',
      }
    • export function registerCustomTheme(theme: {[key: string]: string}): custom;
    • export function registerAntTheme(theme: {[key: string]: string}):ant
  • dist/variable.css: 自定义变量文件;

  • dist/react/antd & dist/vue/iview:组件库样式文件;

使用说明

  1. main.js 中添加文件
import 'antd/dist/antd.variable.min.css';

// ***

import {registerTheme} from './theme/utils';

registerTheme({
  "--ant-primary-color": theme || cookie.get('ant') || '#4c5cdb',
  "--custom-primary-color": theme || cookie.get('custom') || '#4c5cdb',
})
0.0.3

4 years ago

0.0.2

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.1

4 years ago