Browse Source

无jira任务 constant es6写法优化

es6
imp 3 years ago
parent
commit
2305d708e1
  1. 5
      src/core/6.inject.js

5
src/core/6.inject.js

@ -39,6 +39,9 @@
_global.console && console.error("constant: [" + xtype + "]已经注册过了");
}
constantInjection[xtype] = cls;
return function () {
return BI.Constants.getConstant(xtype);
}
};
var modelInjection = {};
@ -294,7 +297,7 @@
_global.console && console.error("constant: [" + type + "] 未定义");
}
runConfigFunction(type);
return constantInjection[type];
return BI.isFunction(constantInjection[type]) ? constantInjection[type]() : constantInjection[type];
}
};

Loading…
Cancel
Save