@byteluck-fe/model-driven-engine 3.0.0-beta.5 → 3.0.0-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -85,7 +85,7 @@ function _unsupported_iterable_to_array(o, minLen) {
85
85
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
86
86
  }
87
87
  function _ts_generator(thisArg, body) {
88
- var f, y, t, g, _ = {
88
+ var f, y, t, _ = {
89
89
  label: 0,
90
90
  sent: function() {
91
91
  if (t[0] & 1) throw t[1];
@@ -93,12 +93,8 @@ function _ts_generator(thisArg, body) {
93
93
  },
94
94
  trys: [],
95
95
  ops: []
96
- };
97
- return g = {
98
- next: verb(0),
99
- "throw": verb(1),
100
- "return": verb(2)
101
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
96
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
97
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
102
98
  return this;
103
99
  }), g;
104
100
  function verb(n) {
@@ -111,7 +107,7 @@ function _ts_generator(thisArg, body) {
111
107
  }
112
108
  function step(op) {
113
109
  if (f) throw new TypeError("Generator is already executing.");
114
- while(_)try {
110
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
115
111
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
116
112
  if (y = 0, t) op = [
117
113
  op[0] & 2,
@@ -200,13 +196,12 @@ export var ActionManager = /*#__PURE__*/ function() {
200
196
  for(var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++){
201
197
  args[_key - 2] = arguments[_key];
202
198
  }
203
- var _this = this;
204
199
  return _async_to_generator(function() {
205
200
  var action, _action_func, result, e;
206
201
  return _ts_generator(this, function(_state) {
207
202
  switch(_state.label){
208
203
  case 0:
209
- action = _this.actionMap.get(name);
204
+ action = this.actionMap.get(name);
210
205
  if (!action) {
211
206
  return [
212
207
  2
@@ -248,7 +243,7 @@ export var ActionManager = /*#__PURE__*/ function() {
248
243
  ];
249
244
  }
250
245
  });
251
- })();
246
+ }).call(this);
252
247
  }
253
248
  },
254
249
  {
@@ -60,7 +60,7 @@ function _define_property(obj, key, value) {
60
60
  return obj;
61
61
  }
62
62
  function _ts_generator(thisArg, body) {
63
- var f, y, t, g, _ = {
63
+ var f, y, t, _ = {
64
64
  label: 0,
65
65
  sent: function() {
66
66
  if (t[0] & 1) throw t[1];
@@ -68,12 +68,8 @@ function _ts_generator(thisArg, body) {
68
68
  },
69
69
  trys: [],
70
70
  ops: []
71
- };
72
- return g = {
73
- next: verb(0),
74
- "throw": verb(1),
75
- "return": verb(2)
76
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
71
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
72
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
77
73
  return this;
78
74
  }), g;
79
75
  function verb(n) {
@@ -86,7 +82,7 @@ function _ts_generator(thisArg, body) {
86
82
  }
87
83
  function step(op) {
88
84
  if (f) throw new TypeError("Generator is already executing.");
89
- while(_)try {
85
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
90
86
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
91
87
  if (y = 0, t) op = [
92
88
  op[0] & 2,
@@ -186,10 +182,10 @@ export var DataManager = /*#__PURE__*/ function() {
186
182
  {
187
183
  key: "getRemoteData",
188
184
  value: function getRemoteData(payload) {
189
- var _this = this;
190
185
  return _async_to_generator(function() {
191
186
  return _ts_generator(this, function(_state) {
192
- if (_this.executer === undefined) {
187
+ if (this.executer === undefined) {
188
+ // @i18n-translate-ignore
193
189
  logerror('未初始化executer');
194
190
  return [
195
191
  2,
@@ -198,14 +194,14 @@ export var DataManager = /*#__PURE__*/ function() {
198
194
  } else {
199
195
  return [
200
196
  2,
201
- _this.executer(payload)
197
+ this.executer(payload)
202
198
  ];
203
199
  }
204
200
  return [
205
201
  2
206
202
  ];
207
203
  });
208
- })();
204
+ }).call(this);
209
205
  }
210
206
  }
211
207
  ]);
@@ -234,7 +234,7 @@ function _is_native_reflect_construct() {
234
234
  })();
235
235
  }
236
236
  function _ts_generator(thisArg, body) {
237
- var f, y, t, g, _ = {
237
+ var f, y, t, _ = {
238
238
  label: 0,
239
239
  sent: function() {
240
240
  if (t[0] & 1) throw t[1];
@@ -242,12 +242,8 @@ function _ts_generator(thisArg, body) {
242
242
  },
243
243
  trys: [],
244
244
  ops: []
245
- };
246
- return g = {
247
- next: verb(0),
248
- "throw": verb(1),
249
- "return": verb(2)
250
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
245
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
246
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
251
247
  return this;
252
248
  }), g;
253
249
  function verb(n) {
@@ -260,7 +256,7 @@ function _ts_generator(thisArg, body) {
260
256
  }
261
257
  function step(op) {
262
258
  if (f) throw new TypeError("Generator is already executing.");
263
- while(_)try {
259
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
264
260
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
265
261
  if (y = 0, t) op = [
266
262
  op[0] & 2,
@@ -328,6 +324,7 @@ function _ts_generator(thisArg, body) {
328
324
  };
329
325
  }
330
326
  }
327
+ import { getLocaleText } from '@byteluck-fe/locale-message';
331
328
  import { isDataBind } from '@byteluck-fe/model-driven-core';
332
329
  import { CONTROL_BASE_TYPE, CONTROL_TYPE, DEFAULT_LOCALE, error, genNonDuplicateId, isString, JSONCopy, log, updateValueFromKeys, warn, Watcher, isBuiltInControls } from '@byteluck-fe/model-driven-shared';
333
330
  import { Runtime } from './Runtime';
@@ -409,6 +406,7 @@ var Engine = /*#__PURE__*/ function(Watcher) {
409
406
  {
410
407
  key: "mount",
411
408
  value: function mount() {
409
+ // @i18n-translate-ignore
412
410
  this.debugLog("engine的mount方法开始调用");
413
411
  var _this_$options = this.$options, _this_$options_plugins = _this_$options.plugins, plugins = _this_$options_plugins === void 0 ? [] : _this_$options_plugins;
414
412
  this._handlerProxyState();
@@ -416,6 +414,7 @@ var Engine = /*#__PURE__*/ function(Watcher) {
416
414
  this.applyPlugins();
417
415
  // 触发所有控件的默认值的change事件
418
416
  this.setStates(this.getState());
417
+ // @i18n-translate-ignore
419
418
  this.debugLog("engine的mount方法调用结束");
420
419
  if (this.debug && typeof window !== 'undefined') {
421
420
  // @ts-ignore
@@ -790,19 +789,19 @@ var Engine = /*#__PURE__*/ function(Watcher) {
790
789
  3,
791
790
  3
792
791
  ];
793
- if (_this1.isMounted) {
792
+ if (this.isMounted) {
794
793
  warn('The engine-mounted life cycle can only be triggered once');
795
794
  return [
796
795
  2,
797
796
  Promise.resolve([])
798
797
  ];
799
798
  }
800
- if (!_this1._jobTasks.length) return [
799
+ if (!this._jobTasks.length) return [
801
800
  3,
802
801
  2
803
802
  ];
804
803
  console.time('engine-mounted need wait');
805
- needWait = _to_consumable_array(_this1._jobTasks);
804
+ needWait = _to_consumable_array(this._jobTasks);
806
805
  return [
807
806
  4,
808
807
  Promise.all(needWait)
@@ -812,15 +811,15 @@ var Engine = /*#__PURE__*/ function(Watcher) {
812
811
  console.timeEnd('engine-mounted need wait');
813
812
  _state.label = 2;
814
813
  case 2:
815
- _this1.isMounted = true;
814
+ this.isMounted = true;
816
815
  _state.label = 3;
817
816
  case 3:
818
817
  // 如果没有挂载的话,需要记录在挂载之前触发的所有任务
819
- if (!_this1.isMounted) {
818
+ if (!this.isMounted) {
820
819
  promise = new Promise(function(resolve) {
821
820
  promiseResolver = resolve;
822
821
  });
823
- _this1._jobTasks.push(promise);
822
+ this._jobTasks.push(promise);
824
823
  }
825
824
  return [
826
825
  4,
@@ -831,7 +830,7 @@ var Engine = /*#__PURE__*/ function(Watcher) {
831
830
  if (promiseResolver && promise) {
832
831
  // 每一个任务完成的时候,都把自己从task中去掉
833
832
  promiseResolver();
834
- _this1._jobTasks.splice(_this1._jobTasks.indexOf(promise), 1);
833
+ this._jobTasks.splice(this._jobTasks.indexOf(promise), 1);
835
834
  }
836
835
  return [
837
836
  2,
@@ -839,7 +838,7 @@ var Engine = /*#__PURE__*/ function(Watcher) {
839
838
  ];
840
839
  }
841
840
  });
842
- })();
841
+ }).call(this);
843
842
  }
844
843
  },
845
844
  {
@@ -974,8 +973,10 @@ var Engine = /*#__PURE__*/ function(Watcher) {
974
973
  key: "setState",
975
974
  value: function setState(controlId, value, rowIndex, options) {
976
975
  eventOptionsTemp = options;
976
+ // @i18n-translate-ignore
977
977
  this.debugLog('[%o]: 触发setState, 修改的值为%o, rowIndex=%o, options=%o', controlId, value, rowIndex, options);
978
978
  this.store.setState(controlId, value, rowIndex);
979
+ // @i18n-translate-ignore
979
980
  this.debugLog('[%o]: setState完成, 修改的值为%o, rowIndex=%o', controlId, value, rowIndex);
980
981
  eventOptionsTemp = null;
981
982
  }
@@ -1260,6 +1261,7 @@ var Engine = /*#__PURE__*/ function(Watcher) {
1260
1261
  */ key: "setData",
1261
1262
  value: function setData(dataSet, options) {
1262
1263
  var _this = this;
1264
+ // @i18n-translate-ignore
1263
1265
  this.debugLog("engine setData方法执行,参数为%o,%o。", dataSet, options);
1264
1266
  var onlySetData = options === null || options === void 0 ? void 0 : options.onlySetData;
1265
1267
  var newState = this.store.defaultState;
@@ -1381,16 +1383,19 @@ var Engine = /*#__PURE__*/ function(Watcher) {
1381
1383
  }
1382
1384
  }
1383
1385
  });
1386
+ // @i18n-translate-ignore
1384
1387
  _this.debugLog("engine setData方法默认值及表单数据组合完成,参数为%o。", newState);
1385
1388
  }
1386
1389
  }
1387
1390
  });
1391
+ // @i18n-translate-ignore
1388
1392
  this.debugLog("engine setData方法数据组合完成,参数为%o。", newState);
1389
1393
  this.setStates(newState, undefined, _object_spread({
1390
1394
  setData: true
1391
1395
  }, options));
1392
1396
  this.runtime.getFlatInstances();
1393
- this.debugLog("engine setData方法执行完成。");
1397
+ // @i18n-translate-ignore
1398
+ this.debugLog(getLocaleText('CMD.b44b1751969061759'));
1394
1399
  }
1395
1400
  },
1396
1401
  {
@@ -1520,6 +1525,7 @@ var Engine = /*#__PURE__*/ function(Watcher) {
1520
1525
  var instances = this.getInstances(instance, rowIndex === -1);
1521
1526
  instances.map(function(_instance) {
1522
1527
  if (_instance) {
1528
+ // @i18n-translate-ignore
1523
1529
  _this.debugLog("[%o]: 修改instance: %o的%o属性,修改的值为%o。", _instance.id, _instance, props, value);
1524
1530
  updateValueFromKeys(_instance.props, props, value);
1525
1531
  _this.schemaEvent('schema-change', {
@@ -1540,6 +1546,7 @@ var Engine = /*#__PURE__*/ function(Watcher) {
1540
1546
  if (!_instance) {
1541
1547
  return;
1542
1548
  }
1549
+ // @i18n-translate-ignore
1543
1550
  this.debugLog("[%o]: 修改instance: %o的%o属性,修改的值为%o。", _instance.id, _instance, props, value);
1544
1551
  updateValueFromKeys(_instance.props, props, value);
1545
1552
  this.schemaEvent('schema-change', {
@@ -54,8 +54,7 @@ var Store = /*#__PURE__*/ function() {
54
54
  _class_call_check(this, Store);
55
55
  _define_property(this, "emptyState", void 0);
56
56
  _define_property(this, "state", void 0);
57
- _define_property(this, "dataBindMapping", void 0 // 主要提供给二开使用
58
- );
57
+ _define_property(this, "dataBindMapping", void 0); // 主要提供给二开使用
59
58
  _define_property(this, "controlIdMapping", void 0);
60
59
  _define_property(this, "subtableHeadersControlIdMapping", void 0);
61
60
  _define_property(this, "defaultState", void 0);
@@ -61,15 +61,15 @@ function _unsupported_iterable_to_array(o, minLen) {
61
61
  }
62
62
  import { CONTROL_TYPE, CALC_TOKEN_TYPE, CALC_AGGREGATE_TYPE } from '@byteluck-fe/model-driven-shared';
63
63
  import { format } from 'mathjs';
64
- var DisplayType;
65
- (function(DisplayType) {
64
+ var DisplayType = /*#__PURE__*/ function(DisplayType) {
66
65
  /**
67
66
  * 完全等于
68
67
  */ DisplayType["EQ"] = "EQ";
69
68
  /**
70
69
  * 包含
71
70
  * */ DisplayType["IN"] = "IN";
72
- })(DisplayType || (DisplayType = {}));
71
+ return DisplayType;
72
+ }(DisplayType || {});
73
73
  export var CalcPlugin = /*#__PURE__*/ function() {
74
74
  "use strict";
75
75
  function CalcPlugin(options) {
@@ -60,7 +60,7 @@ function _define_property(obj, key, value) {
60
60
  return obj;
61
61
  }
62
62
  function _ts_generator(thisArg, body) {
63
- var f, y, t, g, _ = {
63
+ var f, y, t, _ = {
64
64
  label: 0,
65
65
  sent: function() {
66
66
  if (t[0] & 1) throw t[1];
@@ -68,12 +68,8 @@ function _ts_generator(thisArg, body) {
68
68
  },
69
69
  trys: [],
70
70
  ops: []
71
- };
72
- return g = {
73
- next: verb(0),
74
- "throw": verb(1),
75
- "return": verb(2)
76
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
71
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
72
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
77
73
  return this;
78
74
  }), g;
79
75
  function verb(n) {
@@ -86,7 +82,7 @@ function _ts_generator(thisArg, body) {
86
82
  }
87
83
  function step(op) {
88
84
  if (f) throw new TypeError("Generator is already executing.");
89
- while(_)try {
85
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
90
86
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
91
87
  if (y = 0, t) op = [
92
88
  op[0] & 2,
@@ -217,13 +213,13 @@ export var ControlsEventPlugin = /*#__PURE__*/ function() {
217
213
  key: "engineAddEventListener",
218
214
  value: function engineAddEventListener(eventKey, controlEventKey) {
219
215
  var _this = this;
220
- this.engine.on(eventKey, /*#__PURE__*/ function() {
221
- var _ref = _async_to_generator(function(payload) {
216
+ this.engine.on(eventKey, function(payload) {
217
+ return _async_to_generator(function() {
222
218
  return _ts_generator(this, function(_state) {
223
219
  switch(_state.label){
224
220
  case 0:
225
221
  // 初始化state的时候不触发change事件,必须在engine mounted以后才触发
226
- if ((eventKey === 'change' || eventKey === 'list-change') && !_this.engine.isMounted) {
222
+ if ((eventKey === 'change' || eventKey === 'list-change') && !this.engine.isMounted) {
227
223
  return [
228
224
  2
229
225
  ];
@@ -234,7 +230,7 @@ export var ControlsEventPlugin = /*#__PURE__*/ function() {
234
230
  ];
235
231
  return [
236
232
  4,
237
- _this.callControlEvent(controlEventKey, payload)
233
+ this.callControlEvent(controlEventKey, payload)
238
234
  ];
239
235
  case 1:
240
236
  return [
@@ -247,23 +243,20 @@ export var ControlsEventPlugin = /*#__PURE__*/ function() {
247
243
  ];
248
244
  }
249
245
  });
250
- });
251
- return function(payload) {
252
- return _ref.apply(this, arguments);
253
- };
254
- }());
246
+ }).call(_this);
247
+ });
255
248
  }
256
249
  },
257
250
  {
258
251
  key: "callControlEvent",
259
252
  value: function callControlEvent(name, payload) {
260
- var _this = this;
261
253
  return _async_to_generator(function() {
262
- var events, result;
254
+ var _this, events, result;
263
255
  return _ts_generator(this, function(_state) {
264
256
  switch(_state.label){
265
257
  case 0:
266
- events = _this.config[payload.instance.id];
258
+ _this = this;
259
+ events = this.config[payload.instance.id];
267
260
  if (!events || !Array.isArray(events[name])) {
268
261
  return [
269
262
  2,
@@ -272,15 +265,15 @@ export var ControlsEventPlugin = /*#__PURE__*/ function() {
272
265
  }
273
266
  return [
274
267
  4,
275
- Promise.all(events[name].map(/*#__PURE__*/ function() {
276
- var _ref = _async_to_generator(function(eventName) {
268
+ Promise.all(events[name].map(function(eventName) {
269
+ return _async_to_generator(function() {
277
270
  var execResult;
278
271
  return _ts_generator(this, function(_state) {
279
272
  switch(_state.label){
280
273
  case 0:
281
274
  return [
282
275
  4,
283
- _this.engine.getAction().execAction(eventName, //qiyu 注释掉的两个参数变为全局参数
276
+ this.engine.getAction().execAction(eventName, //qiyu 注释掉的两个参数变为全局参数
284
277
  // this.engine,
285
278
  // this.engine.getAction().actionUtils, //以前是params,空的
286
279
  payload)
@@ -293,11 +286,8 @@ export var ControlsEventPlugin = /*#__PURE__*/ function() {
293
286
  ];
294
287
  }
295
288
  });
296
- });
297
- return function(eventName) {
298
- return _ref.apply(this, arguments);
299
- };
300
- }()))
289
+ }).call(_this);
290
+ }))
301
291
  ];
302
292
  case 1:
303
293
  result = _state.sent();
@@ -317,7 +307,7 @@ export var ControlsEventPlugin = /*#__PURE__*/ function() {
317
307
  ];
318
308
  }
319
309
  });
320
- })();
310
+ }).call(this);
321
311
  }
322
312
  }
323
313
  ]);
@@ -106,7 +106,7 @@ function _unsupported_iterable_to_array(o, minLen) {
106
106
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
107
107
  }
108
108
  function _ts_generator(thisArg, body) {
109
- var f, y, t, g, _ = {
109
+ var f, y, t, _ = {
110
110
  label: 0,
111
111
  sent: function() {
112
112
  if (t[0] & 1) throw t[1];
@@ -114,12 +114,8 @@ function _ts_generator(thisArg, body) {
114
114
  },
115
115
  trys: [],
116
116
  ops: []
117
- };
118
- return g = {
119
- next: verb(0),
120
- "throw": verb(1),
121
- "return": verb(2)
122
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
117
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
118
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
123
119
  return this;
124
120
  }), g;
125
121
  function verb(n) {
@@ -132,7 +128,7 @@ function _ts_generator(thisArg, body) {
132
128
  }
133
129
  function step(op) {
134
130
  if (f) throw new TypeError("Generator is already executing.");
135
- while(_)try {
131
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
136
132
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
137
133
  if (y = 0, t) op = [
138
134
  op[0] & 2,
@@ -223,16 +219,15 @@ export var LifecycleEventPlugin = /*#__PURE__*/ function() {
223
219
  this.engine = engine;
224
220
  Object.entries(LifecycleEventKeyMap).forEach(function(param) {
225
221
  var _param = _sliced_to_array(param, 2), engineKey = _param[0], lifecycleKey = _param[1];
226
- var _this1 = _this;
227
- engine.on(engineKey, /*#__PURE__*/ function() {
228
- var _ref = _async_to_generator(function(payload) {
222
+ engine.on(engineKey, function(payload) {
223
+ return _async_to_generator(function() {
229
224
  var result;
230
225
  return _ts_generator(this, function(_state) {
231
226
  switch(_state.label){
232
227
  case 0:
233
228
  return [
234
229
  4,
235
- _this1.callLifecycleEvent(lifecycleKey, payload)
230
+ this.callLifecycleEvent(lifecycleKey, payload)
236
231
  ];
237
232
  case 1:
238
233
  result = _state.sent();
@@ -252,24 +247,21 @@ export var LifecycleEventPlugin = /*#__PURE__*/ function() {
252
247
  ];
253
248
  }
254
249
  });
255
- });
256
- return function(payload) {
257
- return _ref.apply(this, arguments);
258
- };
259
- }());
250
+ }).call(_this);
251
+ });
260
252
  });
261
253
  }
262
254
  },
263
255
  {
264
256
  key: "callLifecycleEvent",
265
257
  value: function callLifecycleEvent(name, payload) {
266
- var _this = this;
267
258
  return _async_to_generator(function() {
268
- var events, result;
259
+ var _this, events, result;
269
260
  return _ts_generator(this, function(_state) {
270
261
  switch(_state.label){
271
262
  case 0:
272
- events = _this.config;
263
+ _this = this;
264
+ events = this.config;
273
265
  if (!events || !Array.isArray(events[name])) {
274
266
  return [
275
267
  2,
@@ -278,15 +270,15 @@ export var LifecycleEventPlugin = /*#__PURE__*/ function() {
278
270
  }
279
271
  return [
280
272
  4,
281
- Promise.all(events[name].map(/*#__PURE__*/ function() {
282
- var _ref = _async_to_generator(function(eventName) {
273
+ Promise.all(events[name].map(function(eventName) {
274
+ return _async_to_generator(function() {
283
275
  var execResult;
284
276
  return _ts_generator(this, function(_state) {
285
277
  switch(_state.label){
286
278
  case 0:
287
279
  return [
288
280
  4,
289
- _this.engine.getAction().execAction(eventName, //qiyu 注释掉的两个参数变为全局参数
281
+ this.engine.getAction().execAction(eventName, //qiyu 注释掉的两个参数变为全局参数
290
282
  // this.engine,
291
283
  // this.engine.getAction().actionUtils, //以前是params,空的
292
284
  payload)
@@ -299,11 +291,8 @@ export var LifecycleEventPlugin = /*#__PURE__*/ function() {
299
291
  ];
300
292
  }
301
293
  });
302
- });
303
- return function(eventName) {
304
- return _ref.apply(this, arguments);
305
- };
306
- }()))
294
+ }).call(_this);
295
+ }))
307
296
  ];
308
297
  case 1:
309
298
  result = _state.sent();
@@ -313,7 +302,7 @@ export var LifecycleEventPlugin = /*#__PURE__*/ function() {
313
302
  ];
314
303
  }
315
304
  });
316
- })();
305
+ }).call(this);
317
306
  }
318
307
  }
319
308
  ]);