Browse Source

feature: scrollable支持xy

es6
guy 3 years ago
parent
commit
6a8ac75950
  1. 13
      src/core/wrapper/layout.js

13
src/core/wrapper/layout.js

@ -62,11 +62,24 @@ BI.Layout = BI.inherit(BI.Widget, {
_init4Scroll: function () { _init4Scroll: function () {
switch (this.options.scrollable) { switch (this.options.scrollable) {
case true: case true:
case "xy":
this.element.css("overflow", "auto"); this.element.css("overflow", "auto");
break; break;
case false: case false:
this.element.css("overflow", "hidden"); this.element.css("overflow", "hidden");
break; break;
case "x":
this.element.css({
"overflow-x": "auto",
"overflow-y": "hidden"
});
break;
case "y":
this.element.css({
"overflow-x": "hidden",
"overflow-y": "auto"
});
break;
default : default :
break; break;
} }

Loading…
Cancel
Save