0.0.1 • Published 2 years ago

@lwjjs/theme v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

theme-js

设置主题

安装

npm
npm i @lwjjs/theme
browser
<script src="https://unpkg.com/@lwjjs/theme/dist/index.umd.js"></script>

使用

import Theme from "@lwjjs/theme";

new Theme();

自定义主题配置项

在初始化阶段可以通过传入参数来配置主题唯一标识

new Theme({ name: "themeName", code: "themeCode" });

Methods

方法名说明参数返回值
getTheme获取当前主题-当前主题
setTheme设置主题为当前主题theme-
setThemes设置所有主题列表themes-
addTheme添加主题theme-
removeTheme删除主题themeCode-
0.0.1

2 years ago