UNPKG

878 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3var tslib_1 = require("tslib");
4var base_1 = (0, tslib_1.__importDefault)(require("./base"));
5/** 回调函数构建的 Action */
6var CallbackAction = /** @class */ (function (_super) {
7 (0, tslib_1.__extends)(CallbackAction, _super);
8 function CallbackAction() {
9 return _super !== null && _super.apply(this, arguments) || this;
10 }
11 /**
12 * 执行
13 */
14 CallbackAction.prototype.execute = function () {
15 if (this.callback) {
16 this.callback(this.context);
17 }
18 };
19 /**
20 * 销毁
21 */
22 CallbackAction.prototype.destroy = function () {
23 _super.prototype.destroy.call(this);
24 this.callback = null;
25 };
26 return CallbackAction;
27}(base_1.default));
28exports.default = CallbackAction;
29//# sourceMappingURL=callback.js.map
\No newline at end of file