Browse Source

Pull request #2051: 无JIRA任务 bugfix

Merge in VISUAL/fineui from ~GUY/fineui:master to master

* commit 'b29c15ce3819245fba2971b0e12c1962b5912e38':
  bugfix
es6
guy 3 years ago
parent
commit
1fe42dc8b4
  1. 4
      examples/dev.html
  2. 6
      src/core/6.inject.js

4
examples/dev.html

@ -25,8 +25,8 @@
BI.config("bi.provider.system", function (provider) { BI.config("bi.provider.system", function (provider) {
provider.addDependencies({ provider.addDependencies({
"my.module": { "my.module": {
min: "2.0", minVersion: "1.0",
max: "4.0" maxVersion: "4.0"
} }
}) })
}) })

6
src/core/6.inject.js

@ -108,12 +108,12 @@
for (var j = 0; j < modules.length; j++) { for (var j = 0; j < modules.length; j++) {
var module = modules[i]; var module = modules[i];
if (module && dependencies[module.moduleId] && module.version === version) { if (module && dependencies[module.moduleId] && module.version === version) {
var min = dependencies[module.moduleId].min, max = dependencies[module.moduleId].max; var minVersion = dependencies[module.moduleId].minVersion, maxVersion = dependencies[module.moduleId].maxVersion;
if (min && module.version < min){ if (minVersion && module.version < minVersion){
findVersion = true; findVersion = true;
break; break;
} }
if(max && module.version > max){ if(maxVersion && module.version > maxVersion){
findVersion = true; findVersion = true;
break; break;
} }

Loading…
Cancel
Save