From a9cdc42dfa6af91862f6ec14cc889005df07b3ae Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Mon, 30 Nov 2020 15:28:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20BI.config(wid?= =?UTF-8?q?get)=E6=9C=89=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/inject.js | 5 ++++- src/core/shortcut.js | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/core/inject.js b/src/core/inject.js index 89d0bd9933..a549abf187 100644 --- a/src/core/inject.js +++ b/src/core/inject.js @@ -56,9 +56,12 @@ }; BI.Configs = BI.Configs || { + getConfigs: function () { + return configFunctions; + }, getConfig: function (type) { return configFunctions[type]; - } + }, }; var actions = {}; diff --git a/src/core/shortcut.js b/src/core/shortcut.js index 204e498cc6..1a65686623 100644 --- a/src/core/shortcut.js +++ b/src/core/shortcut.js @@ -35,10 +35,11 @@ function configWidget (type) { var configFunctions = BI.Configs.getConfig(type); if (configFunctions) { - BI.each(configFunctions[type], function (i, cf) { + BI.each(configFunctions, function (i, cf) { BI.Plugin.configWidget(type, cf.fn, cf.args); }); - configFunctions[type] && (configFunctions[type] = null); + var configs = BI.Configs.getConfigs(); + configs[type] && (configs[type] = null); } }