Browse Source

移动端适配

es6
guy 3 years ago
parent
commit
9cdb71f365
  1. 4
      src/core/wrapper/layout/layout.absolute.js
  2. 4
      src/core/wrapper/layout/layout.adaptive.js

4
src/core/wrapper/layout/layout.absolute.js

@ -72,10 +72,10 @@ BI.AbsoluteLayout = BI.inherit(BI.Layout, {
}
if (BI.isNotNull(item.width)) {
w.element.css({width: item.width / BI.pixRatio + BI.pixUnit});
w.element.css({width: BI.isNumber(item.width) ? item.width / BI.pixRatio + BI.pixUnit : item.width});
}
if (BI.isNotNull(item.height)) {
w.element.css({height: item.height / BI.pixRatio + BI.pixUnit});
w.element.css({height: BI.isNumber(item.height) ? item.height / BI.pixRatio + BI.pixUnit : item.height});
}
w.element.css({position: "absolute"});
return w;

4
src/core/wrapper/layout/layout.adaptive.js

@ -72,10 +72,10 @@ BI.AdaptiveLayout = BI.inherit(BI.Layout, {
}
if (BI.isNotNull(item.width)) {
w.element.css({width: item.width / BI.pixRatio + BI.pixUnit});
w.element.css({width: BI.isNumber(item.width) ? item.width / BI.pixRatio + BI.pixUnit : item.width});
}
if (BI.isNotNull(item.height)) {
w.element.css({height: item.height / BI.pixRatio + BI.pixUnit});
w.element.css({height: BI.isNumber(item.height) ? item.height / BI.pixRatio + BI.pixUnit : item.height});
}
return w;
},

Loading…
Cancel
Save