@x-edu/theme
v1.1.0
Published
## 设计案
Downloads
17
Keywords
Readme
@x-edu/theme
设计案
demo
目前内置 dark light 两套主题变量
设置主题
import {
removeTheme,
setTheme
} from '../src'
// 为根级元素 #app 添加class dark
setTheme('#app', 'dark')
// 移除主题
removeTheme('#app', 'dark')
// 单参数则设置 class于 body 元素上
setTheme('dark')
removeTheme('dark')
读取主题变量
@import '@x-edu/theme/dist/theme/dark.less';
import darkThemeVariable from '@x-edu/theme/dist/theme/dark'