Browse Source

Pull request #1989: 无JIRA任务 bugfix

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

* commit '30f9418cfb86657e3e7b9357eadc47037373d117':
  add
master
guy 3 years ago
parent
commit
46604acccf
  1. 7
      src/core/platform/web/config.js
  2. 48
      src/core/wrapper/layout/adapt/adapt.horizontal.js
  3. 1
      src/core/wrapper/layout/adapt/adapt.table.js

7
src/core/platform/web/config.js

@ -28,7 +28,7 @@ BI.prepares.push(function () {
}, ob, {type: "bi.inline"}); }, ob, {type: "bi.inline"});
}); });
BI.Plugin.configWidget("bi.center_adapt", function (ob) { BI.Plugin.configWidget("bi.center_adapt", function (ob) {
var supportFlex = isSupportFlex(), justOneItem = (ob.items && ob.items.length <= 1); var supportFlex = isSupportFlex();
// var isAdapt = !ob.horizontalAlign || ob.horizontalAlign === BI.HorizontalAlign.Center || ob.horizontalAlign === BI.HorizontalAlign.Stretch; // var isAdapt = !ob.horizontalAlign || ob.horizontalAlign === BI.HorizontalAlign.Center || ob.horizontalAlign === BI.HorizontalAlign.Stretch;
// if (!isAdapt || justOneItem) { // if (!isAdapt || justOneItem) {
if (supportFlex) { if (supportFlex) {
@ -39,7 +39,7 @@ BI.prepares.push(function () {
// return ob; // return ob;
}); });
BI.Plugin.configWidget("bi.vertical_adapt", function (ob) { BI.Plugin.configWidget("bi.vertical_adapt", function (ob) {
var supportFlex = isSupportFlex(), justOneItem = (ob.items && ob.items.length <= 1); var supportFlex = isSupportFlex();
// var isAdapt = ob.horizontalAlign === BI.HorizontalAlign.Center || ob.horizontalAlign === BI.HorizontalAlign.Stretch; // var isAdapt = ob.horizontalAlign === BI.HorizontalAlign.Center || ob.horizontalAlign === BI.HorizontalAlign.Stretch;
// if (!isAdapt || justOneItem) { // if (!isAdapt || justOneItem) {
if (supportFlex) { if (supportFlex) {
@ -66,7 +66,8 @@ BI.prepares.push(function () {
} }
if (supportFlex) { if (supportFlex) {
return BI.extend({ return BI.extend({
horizontalAlign: BI.HorizontalAlign.Center horizontalAlign: BI.HorizontalAlign.Center,
scrollx: false
}, ob, {type: "bi.flex_horizontal"}); }, ob, {type: "bi.flex_horizontal"});
} }
return BI.extend({ return BI.extend({

48
src/core/wrapper/layout/adapt/adapt.horizontal.js

@ -3,52 +3,6 @@
* @class BI.HorizontalAdaptLayout * @class BI.HorizontalAdaptLayout
* @extends BI.Layout * @extends BI.Layout
*/ */
BI.HorizontalAdaptLayout = BI.inherit(BI.Layout, { BI.HorizontalAdaptLayout = function () {
props: function () {
return BI.extend(BI.HorizontalAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-h-a",
verticalAlign: BI.VerticalAlign.Top,
horizontalAlign: BI.HorizontalAlign.Center,
columnSize: [],
scrollx: false,
hgap: 0,
vgap: 0,
lgap: 0,
rgap: 0,
tgap: 0,
bgap: 0
});
},
render: function () {
var self = this, o = this.options;
BI.HorizontalAdaptLayout.superclass.render.apply(this, arguments);
return {
type: "bi.horizontal",
verticalAlign: o.verticalAlign,
horizontalAlign: o.horizontalAlign,
columnSize: o.columnSize,
items: o.items,
scrollx: o.scrollx,
scrolly: o.scrolly,
scrollable: o.scrollable,
ref: function (_ref) {
self.layout = _ref;
},
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
}; };
},
resize: function () {
// console.log("horizontal_adapt布局不需要resize");
},
populate: function (items) {
this.layout.populate.apply(this, arguments);
}
});
BI.shortcut("bi.horizontal_adapt", BI.HorizontalAdaptLayout); BI.shortcut("bi.horizontal_adapt", BI.HorizontalAdaptLayout);

1
src/core/wrapper/layout/adapt/adapt.table.js

@ -10,7 +10,6 @@ BI.TableAdaptLayout = BI.inherit(BI.Layout, {
columnSize: [], columnSize: [],
verticalAlign: BI.VerticalAlign.Top, verticalAlign: BI.VerticalAlign.Top,
horizontalAlign: BI.HorizontalAlign.Left, horizontalAlign: BI.HorizontalAlign.Left,
scrollx: true,
hgap: 0, hgap: 0,
vgap: 0, vgap: 0,
lgap: 0, lgap: 0,

Loading…
Cancel
Save