fineui是帆软报表和BI产品线所使用的前端框架。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
1.8 KiB

/**
* @author windy
* @version 2.0
* Created by windy on 2021/6/30
*/
// 系统参数常量
4 years ago
!(function () {
var system = {
4 years ago
dependencies: {},
responsiveMode: false,
3 years ago
workerMode: false,
size: {
// 尺寸
// 通用尺寸
4 years ago
TOOL_BAR_HEIGHT: 24,
LIST_ITEM_HEIGHT: 24,
TRIGGER_HEIGHT: 24,
TOAST_TOP: 10,
}
4 years ago
};
var provider = function () {
4 years ago
this.SYSTEM = system;
this.setSize = function (opt) {
BI.deepExtend(system, {size: opt});
};
this.setResponsiveMode = function (mode) {
system.responsiveMode = !!mode;
4 years ago
};
3 years ago
this.setWorkerMode = function (mode) {
system.workerMode = !!mode;
};
4 years ago
this.addDependency = function (moduleId, minVersion, maxVersion) {
system.dependencies[moduleId] = {
min: minVersion,
max: maxVersion
};
};
this.addDependencies = function (moduleConfig) {
BI.extend(system.dependencies, moduleConfig);
};
4 years ago
this.$get = function () {
return BI.inherit(BI.OB, {
4 years ago
getSize: function () {
return system.size;
4 years ago
},
4 years ago
getResponsiveMode: function () {
return system.responsiveMode;
},
3 years ago
getWorkerMode: function () {
return system.workerMode;
},
4 years ago
getDependencies: function () {
return system.dependencies;
}
4 years ago
});
};
};
BI.provider("bi.provider.system", provider);
})();
BI.prepares.push(function () {
BI.SIZE_CONSANTS = BI.Providers.getProvider("bi.provider.system").getSize();
4 years ago
});