Browse Source

无JIRA任务 BI.config(widget)有问题

master
windy 4 years ago
parent
commit
a9cdc42dfa
  1. 5
      src/core/inject.js
  2. 5
      src/core/shortcut.js

5
src/core/inject.js

@ -56,9 +56,12 @@
}; };
BI.Configs = BI.Configs || { BI.Configs = BI.Configs || {
getConfigs: function () {
return configFunctions;
},
getConfig: function (type) { getConfig: function (type) {
return configFunctions[type]; return configFunctions[type];
} },
}; };
var actions = {}; var actions = {};

5
src/core/shortcut.js

@ -35,10 +35,11 @@
function configWidget (type) { function configWidget (type) {
var configFunctions = BI.Configs.getConfig(type); var configFunctions = BI.Configs.getConfig(type);
if (configFunctions) { if (configFunctions) {
BI.each(configFunctions[type], function (i, cf) { BI.each(configFunctions, function (i, cf) {
BI.Plugin.configWidget(type, cf.fn, cf.args); BI.Plugin.configWidget(type, cf.fn, cf.args);
}); });
configFunctions[type] && (configFunctions[type] = null); var configs = BI.Configs.getConfigs();
configs[type] && (configs[type] = null);
} }
} }

Loading…
Cancel
Save