From db23d3d2f6a00024a5ea75f0543013f2e9abf8a6 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Wed, 30 Jun 2021 16:10:42 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E5=8F=82=E6=95=B0=E5=BD=A2?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/system.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/core/system.js diff --git a/src/core/system.js b/src/core/system.js new file mode 100644 index 0000000000..e4c079c714 --- /dev/null +++ b/src/core/system.js @@ -0,0 +1,25 @@ +/** + * @author windy + * @version 2.0 + * Created by windy on 2021/6/30 + */ +_.extend(BI, { + switchSystemParam: function(opt) { + BI.config('bi.constant.system', function (ob) { + return BI.deepExtend(ob, opt); + }); + }, +}); + +// 系统参数常量 +BI.constant('bi.constant.system', { + size: { // 尺寸 + TOOL_BAR_HEIGHT: 24, + LIST_ITEM_HEIGHT: 24, + TRIGGER_HEIGHT: 24, + }, +}); + +BI.prepares.push(function () { + BI.SIZE_CONSANTS = BI.Constants.getConstant('bi.constant.system').size; +});