@lwjjs/theme
v0.0.1
Published
#### 设置主题
Downloads
3
Readme
theme-js
设置主题
安装
npm
npm i @lwjjs/themebrowser
<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 | - |
