fastlion-amis
Version:
一种MIS页面生成工具
36 lines (35 loc) • 1.23 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.CopyAction = void 0;
var tslib_1 = require("tslib");
var tpl_1 = require("../utils/tpl");
var Action_1 = require("./Action");
/**
* 复制动作
*
* @export
* @class CopyAction
* @implements {Action}
*/
var CopyAction = /** @class */ (function () {
function CopyAction() {
}
CopyAction.prototype.run = function (action, renderer, event) {
var _a, _b;
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
return (0, tslib_1.__generator)(this, function (_c) {
debugger;
if (action.content || action.copy) {
(_b = (_a = renderer.props.env).copy) === null || _b === void 0 ? void 0 : _b.call(_a, (0, tpl_1.filter)(action.content || action.copy, action.args, '| raw'), {
format: action.copyFormat
});
}
return [2 /*return*/];
});
});
};
return CopyAction;
}());
exports.CopyAction = CopyAction;
(0, Action_1.registerAction)('copy', new CopyAction());
//# sourceMappingURL=./actions/CopyAction.js.map
;