@byteluck-fe/model-driven-engine 2.9.0-alpha.10 → 2.9.0-alpha.16
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.
|
@@ -160,11 +160,13 @@ import { EventLogic } from "@byteluck-fe/model-driven-shared";
|
|
|
160
160
|
// }
|
|
161
161
|
export var ControlsEventPlugin = /*#__PURE__*/ function() {
|
|
162
162
|
"use strict";
|
|
163
|
-
function ControlsEventPlugin(config) {
|
|
163
|
+
function ControlsEventPlugin(config, customEvents) {
|
|
164
164
|
_class_call_check(this, ControlsEventPlugin);
|
|
165
165
|
_define_property(this, "config", void 0);
|
|
166
166
|
_define_property(this, "engine", void 0);
|
|
167
|
+
_define_property(this, "customEvents", void 0);
|
|
167
168
|
this.config = config;
|
|
169
|
+
this.customEvents = customEvents;
|
|
168
170
|
}
|
|
169
171
|
_create_class(ControlsEventPlugin, [
|
|
170
172
|
{
|
|
@@ -201,6 +203,14 @@ export var ControlsEventPlugin = /*#__PURE__*/ function() {
|
|
|
201
203
|
_this.engineAddEventListener(eventItem.code, eventItem.key);
|
|
202
204
|
}
|
|
203
205
|
});
|
|
206
|
+
//注册自定义组件事件
|
|
207
|
+
this.customEvents.map(function(item) {
|
|
208
|
+
var key = item.key;
|
|
209
|
+
if (item.namespace !== undefined && item.namespace !== null && item.namespace !== "") {
|
|
210
|
+
key = item.namespace + ":" + item.key;
|
|
211
|
+
}
|
|
212
|
+
_this.engineAddEventListener(key, key);
|
|
213
|
+
});
|
|
204
214
|
}
|
|
205
215
|
},
|
|
206
216
|
{
|