Files
NapCatQQ/.pnpm-store/v3/files/0f/427a6ff20554bb74567548cf8bc5581fcf83298efd68cd5373ea846c140d6b110b4b9bb8aebf7c963fea5632c2e1b73eb7ab2951600fca8a5b19c4ddac82f7
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

28 lines
660 B
Plaintext

class Theme {
static DEFAULTS = {
modules: {}
};
static themes = {
default: Theme
};
modules = {};
constructor(quill, options) {
this.quill = quill;
this.options = options;
}
init() {
Object.keys(this.options.modules).forEach(name => {
if (this.modules[name] == null) {
this.addModule(name);
}
});
}
addModule(name) {
// @ts-expect-error
const ModuleClass = this.quill.constructor.import(`modules/${name}`);
this.modules[name] = new ModuleClass(this.quill, this.options.modules[name] || {});
return this.modules[name];
}
}
export default Theme;
//# sourceMappingURL=theme.js.map