This commit is contained in:
2024-07-10 12:19:52 +08:00
parent 5baf00de64
commit adbf4750cc
16 changed files with 1176 additions and 722 deletions

View File

@@ -46,6 +46,24 @@ function offset(e) {
};
}
class OptionBase {
_option;
r;
constructor(opt) {
this._option = opt;
const getText = opt.getText;
if (typeof getText === 'function') {
this.r = getText;
} else if (typeof GetTextByKey === 'function') {
this.r = GetTextByKey;
} else {
this.r = utility.r;
}
}
}
export {
createElement,
// icon
@@ -99,5 +117,7 @@ export {
utility,
// functions
requestAnimationFrame,
offset
offset,
// base classes
OptionBase
}