Browse Source

Merge pull request #1279 in VISUAL/fineui from ~WINDY/fineui:master to master

* commit '13ea18b9e740f17443950e5106a1ea9d610343e6':
  BI-61560 refactor: 提供mixin的注册key埋点
es6
windy 5 years ago
parent
commit
7663a726f5
  1. 6
      src/core/inject.js

6
src/core/inject.js

@ -143,7 +143,9 @@
}
};
var callPoint = function (inst, type) {
var callPoint = function (inst, types) {
types = BI.isArray(types) ? types : [types];
BI.each(types, function (idx, type) {
if (points[type]) {
for (var action in points[type]) {
var bfns = points[type][action].before;
@ -176,12 +178,14 @@
}
}
}
});
};
BI.Models = {
getModel: function (type, config) {
var inst = new modelInjection[type](config);
inst._constructor && inst._constructor(config);
inst.mixins && callPoint(inst, inst.mixins);
callPoint(inst, type);
return inst;
}

Loading…
Cancel
Save