From f91c1c0cfa4b58a29cb9867bc794e03d19b3c7a2 Mon Sep 17 00:00:00 2001 From: guy Date: Sat, 20 Nov 2021 14:09:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/6.inject.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/core/6.inject.js b/src/core/6.inject.js index c9f77055b..e4ccbf665 100644 --- a/src/core/6.inject.js +++ b/src/core/6.inject.js @@ -31,6 +31,9 @@ } } moduleInjection[xtype] = cls; + return function () { + return BI.Modules.getModule(xtype); + }; }; var constantInjection = {}; @@ -41,7 +44,7 @@ constantInjection[xtype] = cls; return function () { return BI.Constants.getConstant(xtype); - } + }; }; var modelInjection = {}; @@ -50,7 +53,7 @@ _global.console && console.error("model: [" + xtype + "] 已经注册过了"); } modelInjection[xtype] = cls; - return function (xtype, config) { + return function (config) { return BI.Models.getModel(xtype, config); }; }; @@ -61,9 +64,9 @@ _global.console && console.error("store: [" + xtype + "] 已经注册过了"); } storeInjection[xtype] = cls; - return function (xtype, config) { + return function (config) { return BI.Stores.getStore(xtype, config); - } + }; }; var serviceInjection = {}; @@ -72,9 +75,9 @@ _global.console && console.error("service: [" + xtype + "] 已经注册过了"); } serviceInjection[xtype] = cls; - return function (xtype, config) { + return function (config) { return BI.Services.getService(xtype, config); - } + }; }; var providerInjection = {}; @@ -83,9 +86,9 @@ _global.console && console.error("provider: [" + xtype + "] 已经注册过了"); } providerInjection[xtype] = cls; - return function (xtype, config) { + return function (config) { return BI.Providers.getProvider(xtype, config); - } + }; }; var configFunctions = {};