Files
lan-manager/web/node_modules/@antv/g-base/esm/abstract/base.js
openclaw 0a5f6a8047 Initial commit: Lan-manager project code
- Go backend (server/)
- Frontend (web/, server/static/)
- Database and deployment files
- Scripts and docs

Co-Authored-By: 狸花猫/Claude-Qwen3.6-Plus 🐾
2026-04-20 00:52:58 +08:00

44 lines
1.1 KiB
JavaScript

import { __extends } from "tslib";
import EE from '@antv/event-emitter';
import { mix } from '../util/util';
var Base = /** @class */ (function (_super) {
__extends(Base, _super);
function Base(cfg) {
var _this = _super.call(this) || this;
/**
* 是否被销毁
* @type {boolean}
*/
_this.destroyed = false;
var defaultCfg = _this.getDefaultCfg();
_this.cfg = mix(defaultCfg, cfg);
return _this;
}
/**
* @protected
* 默认的配置项
* @returns {object} 默认的配置项
*/
Base.prototype.getDefaultCfg = function () {
return {};
};
// 实现接口的方法
Base.prototype.get = function (name) {
return this.cfg[name];
};
// 实现接口的方法
Base.prototype.set = function (name, value) {
this.cfg[name] = value;
};
// 实现接口的方法
Base.prototype.destroy = function () {
this.cfg = {
destroyed: true,
};
this.off();
this.destroyed = true;
};
return Base;
}(EE));
export default Base;
//# sourceMappingURL=base.js.map