From fd4e4eb9730109c9bb524da3656a61c2df3b70da Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Wed, 30 Jun 2021 17:06:52 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=93=E6=9E=84=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/system.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/core/system.js b/src/core/system.js index dd7bb0d48..40dc78c5d 100644 --- a/src/core/system.js +++ b/src/core/system.js @@ -6,7 +6,7 @@ // 系统参数常量 !(function () { var system = { - SIZE: { // 尺寸 + size: { // 尺寸 TOOL_BAR_HEIGHT: 24, LIST_ITEM_HEIGHT: 24, TRIGGER_HEIGHT: 24, @@ -14,15 +14,18 @@ }; var provider = function () { - this.inject = function (type, config) { - BI.deepExtend(system[type], config); + + this.SYSTEM = system; + + this.setSize = function (opt) { + BI.deepExtend(system, { size: opt }); }; this.$get = function () { return BI.inherit(BI.OB, { - getConfig: function (type) { - return system[type]; + getSize: function () { + return system.size; }, }); }; @@ -32,5 +35,5 @@ })(); BI.prepares.push(function () { - BI.SIZE_CONSANTS = BI.Providers.getProvider('bi.provider.system').getConfig('SIZE'); + BI.SIZE_CONSANTS = BI.Providers.getProvider('bi.provider.system').getSize(); });