sync
This commit is contained in:
22
lib/ui.js
22
lib/ui.js
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user