Browse Source

KERNEL-1646 refactor: 修改命名

es6
Kira 5 years ago
parent
commit
49b8c4ccd5
  1. 14
      src/core/inject.js
  2. 2
      src/core/shortcut.js

14
src/core/inject.js

@ -49,7 +49,7 @@
var configFunctions = {};
BI.config = function (type, configFn, options) {
if (BI.initialize) {
if (BI.initialized) {
if (constantInjection[type]) {
return (constantInjection[type] = configFn(constantInjection[type]));
}
@ -64,16 +64,16 @@
if (!configFunctions[type]) {
configFunctions[type] = [];
BI.prepares.push(function () {
var stack = [], head;
for (var len = configFunctions[type].length, i = len - 1; i >= 0; i--) {
head = configFunctions[type][i];
stack.push(i);
var stack = [], head, count, index;
for (count = configFunctions[type].length, index = count - 1; index >= 0; index--) {
head = configFunctions[type][index];
stack.push(index);
if (head.options && head.options.prevent) {
break;
}
}
for (var len = stack.length, i = len - 1; i >= 0; i--) {
head = configFunctions[type][stack[i]];
for (count = stack.length, index = count - 1; index >= 0; index--) {
head = configFunctions[type][stack[index]];
if (constantInjection[type]) {
constantInjection[type] = head.fn(constantInjection[type]);
continue;

2
src/core/shortcut.js

@ -25,7 +25,7 @@
while (BI.prepares && BI.prepares.length > 0) {
BI.prepares.shift()();
}
BI.initialize = true;
BI.initialized = true;
var el, w;
item || (item = {});
if (BI.isWidget(options)) {

Loading…
Cancel
Save