Browse Source

auto upgrade version to 2.0.20210730165120

es6
data 3 years ago
parent
commit
df0aba7a33
  1. 4
      dist/2.0/fineui.css
  2. 4
      dist/2.0/fineui.ie.min.js
  3. 2
      dist/2.0/fineui.ie.min.js.map
  4. 106
      dist/2.0/fineui.js
  5. 2
      dist/2.0/fineui.js.map
  6. 4
      dist/2.0/fineui.min.css
  7. 4
      dist/2.0/fineui.min.js
  8. 2
      dist/2.0/fineui.min.js.map
  9. 4
      dist/2.0/fineui_without_normalize.css
  10. 4
      dist/2.0/fineui_without_normalize.min.css
  11. 4
      dist/core.css
  12. 106
      dist/core.js
  13. 2
      dist/core.js.map
  14. 4
      dist/demo.css
  15. 106
      dist/demo.js
  16. 2
      dist/demo.js.map
  17. 4
      dist/fineui.css
  18. 4
      dist/fineui.ie.min.js
  19. 2
      dist/fineui.ie.min.js.map
  20. 106
      dist/fineui.js
  21. 2
      dist/fineui.js.map
  22. 4
      dist/fineui.min.css
  23. 4
      dist/fineui.min.js
  24. 2
      dist/fineui.min.js.map
  25. 4
      dist/fineui.proxy.css
  26. 106
      dist/fineui.proxy.js
  27. 2
      dist/fineui.proxy.js.map
  28. 4
      dist/fineui.proxy.min.css
  29. 4
      dist/fineui.proxy.min.js
  30. 2
      dist/fineui.proxy.min.js.map
  31. 81
      dist/fineui_without_jquery_polyfill.js
  32. 2
      dist/fineui_without_jquery_polyfill.js.map
  33. 2
      dist/font.css
  34. 2
      dist/resource.css
  35. 2
      dist/utils.js
  36. 2
      dist/utils.min.js
  37. 2
      package.json

4
dist/2.0/fineui.css vendored

File diff suppressed because one or more lines are too long

4
dist/2.0/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui.ie.min.js.map vendored

File diff suppressed because one or more lines are too long

106
dist/2.0/fineui.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-7-30 16:21:29 */ /*! time: 2021-7-30 16:50:15 */
/******/ (function(modules) { // webpackBootstrap /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache /******/ // The module cache
/******/ var installedModules = {}; /******/ var installedModules = {};
@ -20500,9 +20500,9 @@ BI.shortcut("bi.right_vertical_adapt", BI.RightVerticalAdaptLayout);
* @extends BI.Layout * @extends BI.Layout
*/ */
BI.TableAdaptLayout = BI.inherit(BI.Layout, { BI.TableAdaptLayout = BI.inherit(BI.Layout, {
props: function () { props: function (props) {
return BI.extend(BI.TableAdaptLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.TableAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-t-a", baseCls: "bi-t-a" + (props.verticalAlign === BI.VerticalAlign.Stretch ? " bi-h-fill" : ""),
columnSize: [], columnSize: [],
verticalAlign: BI.VerticalAlign.Top, verticalAlign: BI.VerticalAlign.Top,
horizontalAlign: BI.HorizontalAlign.Left, horizontalAlign: BI.HorizontalAlign.Left,
@ -20542,6 +20542,9 @@ BI.TableAdaptLayout = BI.inherit(BI.Layout, {
if (!this.hasWidget(this._getChildName(i))) { if (!this.hasWidget(this._getChildName(i))) {
var w = BI._lazyCreateWidget(item); var w = BI._lazyCreateWidget(item);
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"}); w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});
if (o.verticalAlign === BI.VerticalAlign.Stretch) {
w.element.addClass("h-fill-item");
}
td = BI._lazyCreateWidget({ td = BI._lazyCreateWidget({
type: "bi.default", type: "bi.default",
width: width, width: width,
@ -20942,8 +20945,9 @@ BI.shortcut("bi.vertical_fill", BI.VerticalFillLayout);
BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, { BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.FloatHorizontalFillLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.FloatHorizontalFillLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-h-float-fill", baseCls: "bi-h-float-fill bi-h-fill",
verticalAlign: BI.VerticalAlign.Top, horizontalAlign: BI.HorizontalAlign.Stretch,
verticalAlign: BI.VerticalAlign.Stretch,
hgap: 0, hgap: 0,
vgap: 0, vgap: 0,
lgap: 0, lgap: 0,
@ -20971,6 +20975,54 @@ BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, {
var self = this, o = this.options; var self = this, o = this.options;
items = BI.compact(items); items = BI.compact(items);
var rank = 0; var rank = 0;
function createWidget (i, item, desc) {
if (o.verticalAlign !== BI.VerticalAlign.Stretch) {
var w = BI._lazyCreateWidget({
type: "bi.vertical_adapt",
horizontalAlign: BI.HorizontalAlign.Stretch,
verticalAlign: o.verticalAlign,
items: [item]
});
} else {
var w = BI._lazyCreateWidget(item);
}
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-top": (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0)) / BI.pixRatio + BI.pixUnit
});
}
if (desc) {
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": ((i === o.items.length - 1 ? o.hgap : 0) + o.rgap + (item.rgap || 0) + (item.hgap || 0)) / BI.pixRatio + BI.pixUnit
});
}
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-left": (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0)) / BI.pixRatio + BI.pixUnit
});
}
} else {
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-left": ((i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0)) / BI.pixRatio + BI.pixUnit
});
}
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0)) / BI.pixRatio + BI.pixUnit
});
}
}
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-bottom": (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0)) / BI.pixRatio + BI.pixUnit
});
}
return w;
}
BI.any(items, function (i, item) { BI.any(items, function (i, item) {
if (BI.isEmptyObject(item)) { if (BI.isEmptyObject(item)) {
return true; return true;
@ -20979,9 +21031,9 @@ BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, {
if (columnSize === "fill") { if (columnSize === "fill") {
return true; return true;
} }
var w = BI._lazyCreateWidget(item); var w = createWidget(i, item);
self.addWidget(self._getChildName(rank++), w); self.addWidget(self._getChildName(rank++), w);
w.element.addClass("h-float-fill-item"); w.element.addClass("h-fill-item");
w.element.css({ w.element.css({
float: "left", float: "left",
position: "relative" position: "relative"
@ -20995,9 +21047,9 @@ BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, {
if (columnSize === "fill") { if (columnSize === "fill") {
return true; return true;
} }
var w = BI._lazyCreateWidget(item); var w = createWidget(i, item, true);
self.addWidget(self._getChildName(rank++), w); self.addWidget(self._getChildName(rank++), w);
w.element.addClass("h-float-fill-item"); w.element.addClass("h-fill-item");
w.element.css({ w.element.css({
float: "right", float: "right",
position: "relative" position: "relative"
@ -21006,9 +21058,9 @@ BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, {
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width; var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width;
if (columnSize === "fill") { if (columnSize === "fill") {
var w = BI._lazyCreateWidget(item); var w = createWidget(i, item);
self.addWidget(self._getChildName(rank++), w); self.addWidget(self._getChildName(rank++), w);
w.element.addClass("h-float-fill-item").css({ w.element.addClass("h-fill-item").css({
position: "relative" position: "relative"
}); });
} }
@ -24059,9 +24111,9 @@ BI.shortcut("bi.vtape", BI.VTapeLayout);
* @extends BI.Layout * @extends BI.Layout
*/ */
BI.TdLayout = BI.inherit(BI.Layout, { BI.TdLayout = BI.inherit(BI.Layout, {
props: function () { props: function (props) {
return BI.extend(BI.TdLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.TdLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-td", baseCls: "bi-td" + (props.verticalAlign === BI.VerticalAlign.Stretch ? " bi-h-fill" : ""),
columnSize: [], columnSize: [],
rowSize: [], rowSize: [],
verticalAlign: BI.VerticalAlign.Middle, verticalAlign: BI.VerticalAlign.Middle,
@ -24144,6 +24196,9 @@ BI.TdLayout = BI.inherit(BI.Layout, {
for (var i = 0; i < arr.length; i++) { for (var i = 0; i < arr.length; i++) {
var w = BI._lazyCreateWidget(arr[i]); var w = BI._lazyCreateWidget(arr[i]);
if (o.verticalAlign === BI.VerticalAlign.Stretch) {
w.element.addClass("h-fill-item");
}
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"}); w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});
var item = arr[i]; var item = arr[i];
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
@ -80846,7 +80901,26 @@ BI.prepares.push(function () {
}); });
BI.Plugin.configWidget("bi.inline", function (ob) { BI.Plugin.configWidget("bi.inline", function (ob) {
// 当列宽既需要自动列宽又需要自适应列宽时,inline布局也处理不了了,降级table处理吧 // 当列宽既需要自动列宽又需要自适应列宽时,inline布局也处理不了了,降级table处理吧
var hasAutoAndFillColumnSize;
if (ob.columnSize && ob.columnSize.indexOf("") >= 0 && ob.columnSize.indexOf("fill") >= 0) { if (ob.columnSize && ob.columnSize.indexOf("") >= 0 && ob.columnSize.indexOf("fill") >= 0) {
hasAutoAndFillColumnSize = true;
} else {
var hasAuto = false, hasFill = false;
BI.each(ob.items, function (i, item) {
if (item.width === "fill") {
hasFill = true;
} else if (BI.isNull(item.width) || item.width === "") {
hasAuto = true;
}
});
hasAutoAndFillColumnSize = hasAuto && hasFill;
}
if (hasAutoAndFillColumnSize) {
// 宽度是不是受限
if ((ob.scrollable !== true && ob.scrollx !== true) || ob.horizontalAlign === BI.HorizontalAlign.Stretch) {
return BI.extend({}, ob, {type: "bi.horizontal_float_fill"});
}
return BI.extend({ return BI.extend({
horizontalAlign: BI.HorizontalAlign.Stretch horizontalAlign: BI.HorizontalAlign.Stretch
}, ob, {type: "bi.table_adapt"}); }, ob, {type: "bi.table_adapt"});
@ -80915,6 +80989,12 @@ BI.prepares.push(function () {
scrollx: false scrollx: false
}, ob, {type: "bi.flex_horizontal"}); }, ob, {type: "bi.flex_horizontal"});
} }
if ((ob.horizontalAlign && ob.horizontalAlign !== BI.HorizontalAlign.Stretch) || (ob.scrollable === true || ob.scrollx === true)) {
// 宽度不受限,要用table布局
return BI.extend({
horizontalAlign: BI.HorizontalAlign.Stretch
}, ob, {type: "bi.table_adapt"});
}
return BI.extend({}, ob, {type: "bi.horizontal_float_fill"}); return BI.extend({}, ob, {type: "bi.horizontal_float_fill"});
}); });
BI.Plugin.configWidget("bi.vertical_fill", function (ob) { BI.Plugin.configWidget("bi.vertical_fill", function (ob) {

2
dist/2.0/fineui.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/2.0/fineui.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/2.0/fineui.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui.min.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/2.0/fineui_without_normalize.css vendored

File diff suppressed because one or more lines are too long

4
dist/2.0/fineui_without_normalize.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/core.css vendored

File diff suppressed because one or more lines are too long

106
dist/core.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-7-30 16:21:29 */ /*! time: 2021-7-30 16:50:15 */
/******/ (function(modules) { // webpackBootstrap /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache /******/ // The module cache
/******/ var installedModules = {}; /******/ var installedModules = {};
@ -20500,9 +20500,9 @@ BI.shortcut("bi.right_vertical_adapt", BI.RightVerticalAdaptLayout);
* @extends BI.Layout * @extends BI.Layout
*/ */
BI.TableAdaptLayout = BI.inherit(BI.Layout, { BI.TableAdaptLayout = BI.inherit(BI.Layout, {
props: function () { props: function (props) {
return BI.extend(BI.TableAdaptLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.TableAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-t-a", baseCls: "bi-t-a" + (props.verticalAlign === BI.VerticalAlign.Stretch ? " bi-h-fill" : ""),
columnSize: [], columnSize: [],
verticalAlign: BI.VerticalAlign.Top, verticalAlign: BI.VerticalAlign.Top,
horizontalAlign: BI.HorizontalAlign.Left, horizontalAlign: BI.HorizontalAlign.Left,
@ -20542,6 +20542,9 @@ BI.TableAdaptLayout = BI.inherit(BI.Layout, {
if (!this.hasWidget(this._getChildName(i))) { if (!this.hasWidget(this._getChildName(i))) {
var w = BI._lazyCreateWidget(item); var w = BI._lazyCreateWidget(item);
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"}); w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});
if (o.verticalAlign === BI.VerticalAlign.Stretch) {
w.element.addClass("h-fill-item");
}
td = BI._lazyCreateWidget({ td = BI._lazyCreateWidget({
type: "bi.default", type: "bi.default",
width: width, width: width,
@ -20942,8 +20945,9 @@ BI.shortcut("bi.vertical_fill", BI.VerticalFillLayout);
BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, { BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.FloatHorizontalFillLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.FloatHorizontalFillLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-h-float-fill", baseCls: "bi-h-float-fill bi-h-fill",
verticalAlign: BI.VerticalAlign.Top, horizontalAlign: BI.HorizontalAlign.Stretch,
verticalAlign: BI.VerticalAlign.Stretch,
hgap: 0, hgap: 0,
vgap: 0, vgap: 0,
lgap: 0, lgap: 0,
@ -20971,6 +20975,54 @@ BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, {
var self = this, o = this.options; var self = this, o = this.options;
items = BI.compact(items); items = BI.compact(items);
var rank = 0; var rank = 0;
function createWidget (i, item, desc) {
if (o.verticalAlign !== BI.VerticalAlign.Stretch) {
var w = BI._lazyCreateWidget({
type: "bi.vertical_adapt",
horizontalAlign: BI.HorizontalAlign.Stretch,
verticalAlign: o.verticalAlign,
items: [item]
});
} else {
var w = BI._lazyCreateWidget(item);
}
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-top": (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0)) / BI.pixRatio + BI.pixUnit
});
}
if (desc) {
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": ((i === o.items.length - 1 ? o.hgap : 0) + o.rgap + (item.rgap || 0) + (item.hgap || 0)) / BI.pixRatio + BI.pixUnit
});
}
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-left": (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0)) / BI.pixRatio + BI.pixUnit
});
}
} else {
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-left": ((i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0)) / BI.pixRatio + BI.pixUnit
});
}
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0)) / BI.pixRatio + BI.pixUnit
});
}
}
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-bottom": (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0)) / BI.pixRatio + BI.pixUnit
});
}
return w;
}
BI.any(items, function (i, item) { BI.any(items, function (i, item) {
if (BI.isEmptyObject(item)) { if (BI.isEmptyObject(item)) {
return true; return true;
@ -20979,9 +21031,9 @@ BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, {
if (columnSize === "fill") { if (columnSize === "fill") {
return true; return true;
} }
var w = BI._lazyCreateWidget(item); var w = createWidget(i, item);
self.addWidget(self._getChildName(rank++), w); self.addWidget(self._getChildName(rank++), w);
w.element.addClass("h-float-fill-item"); w.element.addClass("h-fill-item");
w.element.css({ w.element.css({
float: "left", float: "left",
position: "relative" position: "relative"
@ -20995,9 +21047,9 @@ BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, {
if (columnSize === "fill") { if (columnSize === "fill") {
return true; return true;
} }
var w = BI._lazyCreateWidget(item); var w = createWidget(i, item, true);
self.addWidget(self._getChildName(rank++), w); self.addWidget(self._getChildName(rank++), w);
w.element.addClass("h-float-fill-item"); w.element.addClass("h-fill-item");
w.element.css({ w.element.css({
float: "right", float: "right",
position: "relative" position: "relative"
@ -21006,9 +21058,9 @@ BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, {
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width; var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width;
if (columnSize === "fill") { if (columnSize === "fill") {
var w = BI._lazyCreateWidget(item); var w = createWidget(i, item);
self.addWidget(self._getChildName(rank++), w); self.addWidget(self._getChildName(rank++), w);
w.element.addClass("h-float-fill-item").css({ w.element.addClass("h-fill-item").css({
position: "relative" position: "relative"
}); });
} }
@ -24059,9 +24111,9 @@ BI.shortcut("bi.vtape", BI.VTapeLayout);
* @extends BI.Layout * @extends BI.Layout
*/ */
BI.TdLayout = BI.inherit(BI.Layout, { BI.TdLayout = BI.inherit(BI.Layout, {
props: function () { props: function (props) {
return BI.extend(BI.TdLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.TdLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-td", baseCls: "bi-td" + (props.verticalAlign === BI.VerticalAlign.Stretch ? " bi-h-fill" : ""),
columnSize: [], columnSize: [],
rowSize: [], rowSize: [],
verticalAlign: BI.VerticalAlign.Middle, verticalAlign: BI.VerticalAlign.Middle,
@ -24144,6 +24196,9 @@ BI.TdLayout = BI.inherit(BI.Layout, {
for (var i = 0; i < arr.length; i++) { for (var i = 0; i < arr.length; i++) {
var w = BI._lazyCreateWidget(arr[i]); var w = BI._lazyCreateWidget(arr[i]);
if (o.verticalAlign === BI.VerticalAlign.Stretch) {
w.element.addClass("h-fill-item");
}
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"}); w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});
var item = arr[i]; var item = arr[i];
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
@ -80846,7 +80901,26 @@ BI.prepares.push(function () {
}); });
BI.Plugin.configWidget("bi.inline", function (ob) { BI.Plugin.configWidget("bi.inline", function (ob) {
// 当列宽既需要自动列宽又需要自适应列宽时,inline布局也处理不了了,降级table处理吧 // 当列宽既需要自动列宽又需要自适应列宽时,inline布局也处理不了了,降级table处理吧
var hasAutoAndFillColumnSize;
if (ob.columnSize && ob.columnSize.indexOf("") >= 0 && ob.columnSize.indexOf("fill") >= 0) { if (ob.columnSize && ob.columnSize.indexOf("") >= 0 && ob.columnSize.indexOf("fill") >= 0) {
hasAutoAndFillColumnSize = true;
} else {
var hasAuto = false, hasFill = false;
BI.each(ob.items, function (i, item) {
if (item.width === "fill") {
hasFill = true;
} else if (BI.isNull(item.width) || item.width === "") {
hasAuto = true;
}
});
hasAutoAndFillColumnSize = hasAuto && hasFill;
}
if (hasAutoAndFillColumnSize) {
// 宽度是不是受限
if ((ob.scrollable !== true && ob.scrollx !== true) || ob.horizontalAlign === BI.HorizontalAlign.Stretch) {
return BI.extend({}, ob, {type: "bi.horizontal_float_fill"});
}
return BI.extend({ return BI.extend({
horizontalAlign: BI.HorizontalAlign.Stretch horizontalAlign: BI.HorizontalAlign.Stretch
}, ob, {type: "bi.table_adapt"}); }, ob, {type: "bi.table_adapt"});
@ -80915,6 +80989,12 @@ BI.prepares.push(function () {
scrollx: false scrollx: false
}, ob, {type: "bi.flex_horizontal"}); }, ob, {type: "bi.flex_horizontal"});
} }
if ((ob.horizontalAlign && ob.horizontalAlign !== BI.HorizontalAlign.Stretch) || (ob.scrollable === true || ob.scrollx === true)) {
// 宽度不受限,要用table布局
return BI.extend({
horizontalAlign: BI.HorizontalAlign.Stretch
}, ob, {type: "bi.table_adapt"});
}
return BI.extend({}, ob, {type: "bi.horizontal_float_fill"}); return BI.extend({}, ob, {type: "bi.horizontal_float_fill"});
}); });
BI.Plugin.configWidget("bi.vertical_fill", function (ob) { BI.Plugin.configWidget("bi.vertical_fill", function (ob) {

2
dist/core.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/demo.css vendored

File diff suppressed because one or more lines are too long

106
dist/demo.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-7-30 16:21:29 */ /*! time: 2021-7-30 16:50:15 */
/******/ (function(modules) { // webpackBootstrap /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache /******/ // The module cache
/******/ var installedModules = {}; /******/ var installedModules = {};
@ -20500,9 +20500,9 @@ BI.shortcut("bi.right_vertical_adapt", BI.RightVerticalAdaptLayout);
* @extends BI.Layout * @extends BI.Layout
*/ */
BI.TableAdaptLayout = BI.inherit(BI.Layout, { BI.TableAdaptLayout = BI.inherit(BI.Layout, {
props: function () { props: function (props) {
return BI.extend(BI.TableAdaptLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.TableAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-t-a", baseCls: "bi-t-a" + (props.verticalAlign === BI.VerticalAlign.Stretch ? " bi-h-fill" : ""),
columnSize: [], columnSize: [],
verticalAlign: BI.VerticalAlign.Top, verticalAlign: BI.VerticalAlign.Top,
horizontalAlign: BI.HorizontalAlign.Left, horizontalAlign: BI.HorizontalAlign.Left,
@ -20542,6 +20542,9 @@ BI.TableAdaptLayout = BI.inherit(BI.Layout, {
if (!this.hasWidget(this._getChildName(i))) { if (!this.hasWidget(this._getChildName(i))) {
var w = BI._lazyCreateWidget(item); var w = BI._lazyCreateWidget(item);
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"}); w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});
if (o.verticalAlign === BI.VerticalAlign.Stretch) {
w.element.addClass("h-fill-item");
}
td = BI._lazyCreateWidget({ td = BI._lazyCreateWidget({
type: "bi.default", type: "bi.default",
width: width, width: width,
@ -20942,8 +20945,9 @@ BI.shortcut("bi.vertical_fill", BI.VerticalFillLayout);
BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, { BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.FloatHorizontalFillLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.FloatHorizontalFillLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-h-float-fill", baseCls: "bi-h-float-fill bi-h-fill",
verticalAlign: BI.VerticalAlign.Top, horizontalAlign: BI.HorizontalAlign.Stretch,
verticalAlign: BI.VerticalAlign.Stretch,
hgap: 0, hgap: 0,
vgap: 0, vgap: 0,
lgap: 0, lgap: 0,
@ -20971,6 +20975,54 @@ BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, {
var self = this, o = this.options; var self = this, o = this.options;
items = BI.compact(items); items = BI.compact(items);
var rank = 0; var rank = 0;
function createWidget (i, item, desc) {
if (o.verticalAlign !== BI.VerticalAlign.Stretch) {
var w = BI._lazyCreateWidget({
type: "bi.vertical_adapt",
horizontalAlign: BI.HorizontalAlign.Stretch,
verticalAlign: o.verticalAlign,
items: [item]
});
} else {
var w = BI._lazyCreateWidget(item);
}
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-top": (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0)) / BI.pixRatio + BI.pixUnit
});
}
if (desc) {
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": ((i === o.items.length - 1 ? o.hgap : 0) + o.rgap + (item.rgap || 0) + (item.hgap || 0)) / BI.pixRatio + BI.pixUnit
});
}
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-left": (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0)) / BI.pixRatio + BI.pixUnit
});
}
} else {
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-left": ((i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0)) / BI.pixRatio + BI.pixUnit
});
}
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0)) / BI.pixRatio + BI.pixUnit
});
}
}
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-bottom": (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0)) / BI.pixRatio + BI.pixUnit
});
}
return w;
}
BI.any(items, function (i, item) { BI.any(items, function (i, item) {
if (BI.isEmptyObject(item)) { if (BI.isEmptyObject(item)) {
return true; return true;
@ -20979,9 +21031,9 @@ BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, {
if (columnSize === "fill") { if (columnSize === "fill") {
return true; return true;
} }
var w = BI._lazyCreateWidget(item); var w = createWidget(i, item);
self.addWidget(self._getChildName(rank++), w); self.addWidget(self._getChildName(rank++), w);
w.element.addClass("h-float-fill-item"); w.element.addClass("h-fill-item");
w.element.css({ w.element.css({
float: "left", float: "left",
position: "relative" position: "relative"
@ -20995,9 +21047,9 @@ BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, {
if (columnSize === "fill") { if (columnSize === "fill") {
return true; return true;
} }
var w = BI._lazyCreateWidget(item); var w = createWidget(i, item, true);
self.addWidget(self._getChildName(rank++), w); self.addWidget(self._getChildName(rank++), w);
w.element.addClass("h-float-fill-item"); w.element.addClass("h-fill-item");
w.element.css({ w.element.css({
float: "right", float: "right",
position: "relative" position: "relative"
@ -21006,9 +21058,9 @@ BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, {
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width; var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width;
if (columnSize === "fill") { if (columnSize === "fill") {
var w = BI._lazyCreateWidget(item); var w = createWidget(i, item);
self.addWidget(self._getChildName(rank++), w); self.addWidget(self._getChildName(rank++), w);
w.element.addClass("h-float-fill-item").css({ w.element.addClass("h-fill-item").css({
position: "relative" position: "relative"
}); });
} }
@ -24059,9 +24111,9 @@ BI.shortcut("bi.vtape", BI.VTapeLayout);
* @extends BI.Layout * @extends BI.Layout
*/ */
BI.TdLayout = BI.inherit(BI.Layout, { BI.TdLayout = BI.inherit(BI.Layout, {
props: function () { props: function (props) {
return BI.extend(BI.TdLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.TdLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-td", baseCls: "bi-td" + (props.verticalAlign === BI.VerticalAlign.Stretch ? " bi-h-fill" : ""),
columnSize: [], columnSize: [],
rowSize: [], rowSize: [],
verticalAlign: BI.VerticalAlign.Middle, verticalAlign: BI.VerticalAlign.Middle,
@ -24144,6 +24196,9 @@ BI.TdLayout = BI.inherit(BI.Layout, {
for (var i = 0; i < arr.length; i++) { for (var i = 0; i < arr.length; i++) {
var w = BI._lazyCreateWidget(arr[i]); var w = BI._lazyCreateWidget(arr[i]);
if (o.verticalAlign === BI.VerticalAlign.Stretch) {
w.element.addClass("h-fill-item");
}
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"}); w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});
var item = arr[i]; var item = arr[i];
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
@ -80846,7 +80901,26 @@ BI.prepares.push(function () {
}); });
BI.Plugin.configWidget("bi.inline", function (ob) { BI.Plugin.configWidget("bi.inline", function (ob) {
// 当列宽既需要自动列宽又需要自适应列宽时,inline布局也处理不了了,降级table处理吧 // 当列宽既需要自动列宽又需要自适应列宽时,inline布局也处理不了了,降级table处理吧
var hasAutoAndFillColumnSize;
if (ob.columnSize && ob.columnSize.indexOf("") >= 0 && ob.columnSize.indexOf("fill") >= 0) { if (ob.columnSize && ob.columnSize.indexOf("") >= 0 && ob.columnSize.indexOf("fill") >= 0) {
hasAutoAndFillColumnSize = true;
} else {
var hasAuto = false, hasFill = false;
BI.each(ob.items, function (i, item) {
if (item.width === "fill") {
hasFill = true;
} else if (BI.isNull(item.width) || item.width === "") {
hasAuto = true;
}
});
hasAutoAndFillColumnSize = hasAuto && hasFill;
}
if (hasAutoAndFillColumnSize) {
// 宽度是不是受限
if ((ob.scrollable !== true && ob.scrollx !== true) || ob.horizontalAlign === BI.HorizontalAlign.Stretch) {
return BI.extend({}, ob, {type: "bi.horizontal_float_fill"});
}
return BI.extend({ return BI.extend({
horizontalAlign: BI.HorizontalAlign.Stretch horizontalAlign: BI.HorizontalAlign.Stretch
}, ob, {type: "bi.table_adapt"}); }, ob, {type: "bi.table_adapt"});
@ -80915,6 +80989,12 @@ BI.prepares.push(function () {
scrollx: false scrollx: false
}, ob, {type: "bi.flex_horizontal"}); }, ob, {type: "bi.flex_horizontal"});
} }
if ((ob.horizontalAlign && ob.horizontalAlign !== BI.HorizontalAlign.Stretch) || (ob.scrollable === true || ob.scrollx === true)) {
// 宽度不受限,要用table布局
return BI.extend({
horizontalAlign: BI.HorizontalAlign.Stretch
}, ob, {type: "bi.table_adapt"});
}
return BI.extend({}, ob, {type: "bi.horizontal_float_fill"}); return BI.extend({}, ob, {type: "bi.horizontal_float_fill"});
}); });
BI.Plugin.configWidget("bi.vertical_fill", function (ob) { BI.Plugin.configWidget("bi.vertical_fill", function (ob) {

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.css vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.ie.min.js.map vendored

File diff suppressed because one or more lines are too long

106
dist/fineui.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-7-30 16:21:29 */ /*! time: 2021-7-30 16:50:15 */
/******/ (function(modules) { // webpackBootstrap /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache /******/ // The module cache
/******/ var installedModules = {}; /******/ var installedModules = {};
@ -20500,9 +20500,9 @@ BI.shortcut("bi.right_vertical_adapt", BI.RightVerticalAdaptLayout);
* @extends BI.Layout * @extends BI.Layout
*/ */
BI.TableAdaptLayout = BI.inherit(BI.Layout, { BI.TableAdaptLayout = BI.inherit(BI.Layout, {
props: function () { props: function (props) {
return BI.extend(BI.TableAdaptLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.TableAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-t-a", baseCls: "bi-t-a" + (props.verticalAlign === BI.VerticalAlign.Stretch ? " bi-h-fill" : ""),
columnSize: [], columnSize: [],
verticalAlign: BI.VerticalAlign.Top, verticalAlign: BI.VerticalAlign.Top,
horizontalAlign: BI.HorizontalAlign.Left, horizontalAlign: BI.HorizontalAlign.Left,
@ -20542,6 +20542,9 @@ BI.TableAdaptLayout = BI.inherit(BI.Layout, {
if (!this.hasWidget(this._getChildName(i))) { if (!this.hasWidget(this._getChildName(i))) {
var w = BI._lazyCreateWidget(item); var w = BI._lazyCreateWidget(item);
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"}); w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});
if (o.verticalAlign === BI.VerticalAlign.Stretch) {
w.element.addClass("h-fill-item");
}
td = BI._lazyCreateWidget({ td = BI._lazyCreateWidget({
type: "bi.default", type: "bi.default",
width: width, width: width,
@ -20942,8 +20945,9 @@ BI.shortcut("bi.vertical_fill", BI.VerticalFillLayout);
BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, { BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.FloatHorizontalFillLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.FloatHorizontalFillLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-h-float-fill", baseCls: "bi-h-float-fill bi-h-fill",
verticalAlign: BI.VerticalAlign.Top, horizontalAlign: BI.HorizontalAlign.Stretch,
verticalAlign: BI.VerticalAlign.Stretch,
hgap: 0, hgap: 0,
vgap: 0, vgap: 0,
lgap: 0, lgap: 0,
@ -20971,6 +20975,54 @@ BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, {
var self = this, o = this.options; var self = this, o = this.options;
items = BI.compact(items); items = BI.compact(items);
var rank = 0; var rank = 0;
function createWidget (i, item, desc) {
if (o.verticalAlign !== BI.VerticalAlign.Stretch) {
var w = BI._lazyCreateWidget({
type: "bi.vertical_adapt",
horizontalAlign: BI.HorizontalAlign.Stretch,
verticalAlign: o.verticalAlign,
items: [item]
});
} else {
var w = BI._lazyCreateWidget(item);
}
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-top": (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0)) / BI.pixRatio + BI.pixUnit
});
}
if (desc) {
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": ((i === o.items.length - 1 ? o.hgap : 0) + o.rgap + (item.rgap || 0) + (item.hgap || 0)) / BI.pixRatio + BI.pixUnit
});
}
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-left": (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0)) / BI.pixRatio + BI.pixUnit
});
}
} else {
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-left": ((i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0)) / BI.pixRatio + BI.pixUnit
});
}
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0)) / BI.pixRatio + BI.pixUnit
});
}
}
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-bottom": (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0)) / BI.pixRatio + BI.pixUnit
});
}
return w;
}
BI.any(items, function (i, item) { BI.any(items, function (i, item) {
if (BI.isEmptyObject(item)) { if (BI.isEmptyObject(item)) {
return true; return true;
@ -20979,9 +21031,9 @@ BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, {
if (columnSize === "fill") { if (columnSize === "fill") {
return true; return true;
} }
var w = BI._lazyCreateWidget(item); var w = createWidget(i, item);
self.addWidget(self._getChildName(rank++), w); self.addWidget(self._getChildName(rank++), w);
w.element.addClass("h-float-fill-item"); w.element.addClass("h-fill-item");
w.element.css({ w.element.css({
float: "left", float: "left",
position: "relative" position: "relative"
@ -20995,9 +21047,9 @@ BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, {
if (columnSize === "fill") { if (columnSize === "fill") {
return true; return true;
} }
var w = BI._lazyCreateWidget(item); var w = createWidget(i, item, true);
self.addWidget(self._getChildName(rank++), w); self.addWidget(self._getChildName(rank++), w);
w.element.addClass("h-float-fill-item"); w.element.addClass("h-fill-item");
w.element.css({ w.element.css({
float: "right", float: "right",
position: "relative" position: "relative"
@ -21006,9 +21058,9 @@ BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, {
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width; var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width;
if (columnSize === "fill") { if (columnSize === "fill") {
var w = BI._lazyCreateWidget(item); var w = createWidget(i, item);
self.addWidget(self._getChildName(rank++), w); self.addWidget(self._getChildName(rank++), w);
w.element.addClass("h-float-fill-item").css({ w.element.addClass("h-fill-item").css({
position: "relative" position: "relative"
}); });
} }
@ -24059,9 +24111,9 @@ BI.shortcut("bi.vtape", BI.VTapeLayout);
* @extends BI.Layout * @extends BI.Layout
*/ */
BI.TdLayout = BI.inherit(BI.Layout, { BI.TdLayout = BI.inherit(BI.Layout, {
props: function () { props: function (props) {
return BI.extend(BI.TdLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.TdLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-td", baseCls: "bi-td" + (props.verticalAlign === BI.VerticalAlign.Stretch ? " bi-h-fill" : ""),
columnSize: [], columnSize: [],
rowSize: [], rowSize: [],
verticalAlign: BI.VerticalAlign.Middle, verticalAlign: BI.VerticalAlign.Middle,
@ -24144,6 +24196,9 @@ BI.TdLayout = BI.inherit(BI.Layout, {
for (var i = 0; i < arr.length; i++) { for (var i = 0; i < arr.length; i++) {
var w = BI._lazyCreateWidget(arr[i]); var w = BI._lazyCreateWidget(arr[i]);
if (o.verticalAlign === BI.VerticalAlign.Stretch) {
w.element.addClass("h-fill-item");
}
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"}); w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});
var item = arr[i]; var item = arr[i];
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
@ -80846,7 +80901,26 @@ BI.prepares.push(function () {
}); });
BI.Plugin.configWidget("bi.inline", function (ob) { BI.Plugin.configWidget("bi.inline", function (ob) {
// 当列宽既需要自动列宽又需要自适应列宽时,inline布局也处理不了了,降级table处理吧 // 当列宽既需要自动列宽又需要自适应列宽时,inline布局也处理不了了,降级table处理吧
var hasAutoAndFillColumnSize;
if (ob.columnSize && ob.columnSize.indexOf("") >= 0 && ob.columnSize.indexOf("fill") >= 0) { if (ob.columnSize && ob.columnSize.indexOf("") >= 0 && ob.columnSize.indexOf("fill") >= 0) {
hasAutoAndFillColumnSize = true;
} else {
var hasAuto = false, hasFill = false;
BI.each(ob.items, function (i, item) {
if (item.width === "fill") {
hasFill = true;
} else if (BI.isNull(item.width) || item.width === "") {
hasAuto = true;
}
});
hasAutoAndFillColumnSize = hasAuto && hasFill;
}
if (hasAutoAndFillColumnSize) {
// 宽度是不是受限
if ((ob.scrollable !== true && ob.scrollx !== true) || ob.horizontalAlign === BI.HorizontalAlign.Stretch) {
return BI.extend({}, ob, {type: "bi.horizontal_float_fill"});
}
return BI.extend({ return BI.extend({
horizontalAlign: BI.HorizontalAlign.Stretch horizontalAlign: BI.HorizontalAlign.Stretch
}, ob, {type: "bi.table_adapt"}); }, ob, {type: "bi.table_adapt"});
@ -80915,6 +80989,12 @@ BI.prepares.push(function () {
scrollx: false scrollx: false
}, ob, {type: "bi.flex_horizontal"}); }, ob, {type: "bi.flex_horizontal"});
} }
if ((ob.horizontalAlign && ob.horizontalAlign !== BI.HorizontalAlign.Stretch) || (ob.scrollable === true || ob.scrollx === true)) {
// 宽度不受限,要用table布局
return BI.extend({
horizontalAlign: BI.HorizontalAlign.Stretch
}, ob, {type: "bi.table_adapt"});
}
return BI.extend({}, ob, {type: "bi.horizontal_float_fill"}); return BI.extend({}, ob, {type: "bi.horizontal_float_fill"});
}); });
BI.Plugin.configWidget("bi.vertical_fill", function (ob) { BI.Plugin.configWidget("bi.vertical_fill", function (ob) {

2
dist/fineui.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.min.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.proxy.css vendored

File diff suppressed because one or more lines are too long

106
dist/fineui.proxy.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-7-30 16:21:29 */ /*! time: 2021-7-30 16:50:15 */
/******/ (function(modules) { // webpackBootstrap /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache /******/ // The module cache
/******/ var installedModules = {}; /******/ var installedModules = {};
@ -17961,9 +17961,9 @@ BI.shortcut("bi.right_vertical_adapt", BI.RightVerticalAdaptLayout);
* @extends BI.Layout * @extends BI.Layout
*/ */
BI.TableAdaptLayout = BI.inherit(BI.Layout, { BI.TableAdaptLayout = BI.inherit(BI.Layout, {
props: function () { props: function (props) {
return BI.extend(BI.TableAdaptLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.TableAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-t-a", baseCls: "bi-t-a" + (props.verticalAlign === BI.VerticalAlign.Stretch ? " bi-h-fill" : ""),
columnSize: [], columnSize: [],
verticalAlign: BI.VerticalAlign.Top, verticalAlign: BI.VerticalAlign.Top,
horizontalAlign: BI.HorizontalAlign.Left, horizontalAlign: BI.HorizontalAlign.Left,
@ -18003,6 +18003,9 @@ BI.TableAdaptLayout = BI.inherit(BI.Layout, {
if (!this.hasWidget(this._getChildName(i))) { if (!this.hasWidget(this._getChildName(i))) {
var w = BI._lazyCreateWidget(item); var w = BI._lazyCreateWidget(item);
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"}); w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});
if (o.verticalAlign === BI.VerticalAlign.Stretch) {
w.element.addClass("h-fill-item");
}
td = BI._lazyCreateWidget({ td = BI._lazyCreateWidget({
type: "bi.default", type: "bi.default",
width: width, width: width,
@ -18403,8 +18406,9 @@ BI.shortcut("bi.vertical_fill", BI.VerticalFillLayout);
BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, { BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.FloatHorizontalFillLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.FloatHorizontalFillLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-h-float-fill", baseCls: "bi-h-float-fill bi-h-fill",
verticalAlign: BI.VerticalAlign.Top, horizontalAlign: BI.HorizontalAlign.Stretch,
verticalAlign: BI.VerticalAlign.Stretch,
hgap: 0, hgap: 0,
vgap: 0, vgap: 0,
lgap: 0, lgap: 0,
@ -18432,6 +18436,54 @@ BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, {
var self = this, o = this.options; var self = this, o = this.options;
items = BI.compact(items); items = BI.compact(items);
var rank = 0; var rank = 0;
function createWidget (i, item, desc) {
if (o.verticalAlign !== BI.VerticalAlign.Stretch) {
var w = BI._lazyCreateWidget({
type: "bi.vertical_adapt",
horizontalAlign: BI.HorizontalAlign.Stretch,
verticalAlign: o.verticalAlign,
items: [item]
});
} else {
var w = BI._lazyCreateWidget(item);
}
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-top": (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0)) / BI.pixRatio + BI.pixUnit
});
}
if (desc) {
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": ((i === o.items.length - 1 ? o.hgap : 0) + o.rgap + (item.rgap || 0) + (item.hgap || 0)) / BI.pixRatio + BI.pixUnit
});
}
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-left": (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0)) / BI.pixRatio + BI.pixUnit
});
}
} else {
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-left": ((i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0)) / BI.pixRatio + BI.pixUnit
});
}
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0)) / BI.pixRatio + BI.pixUnit
});
}
}
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-bottom": (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0)) / BI.pixRatio + BI.pixUnit
});
}
return w;
}
BI.any(items, function (i, item) { BI.any(items, function (i, item) {
if (BI.isEmptyObject(item)) { if (BI.isEmptyObject(item)) {
return true; return true;
@ -18440,9 +18492,9 @@ BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, {
if (columnSize === "fill") { if (columnSize === "fill") {
return true; return true;
} }
var w = BI._lazyCreateWidget(item); var w = createWidget(i, item);
self.addWidget(self._getChildName(rank++), w); self.addWidget(self._getChildName(rank++), w);
w.element.addClass("h-float-fill-item"); w.element.addClass("h-fill-item");
w.element.css({ w.element.css({
float: "left", float: "left",
position: "relative" position: "relative"
@ -18456,9 +18508,9 @@ BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, {
if (columnSize === "fill") { if (columnSize === "fill") {
return true; return true;
} }
var w = BI._lazyCreateWidget(item); var w = createWidget(i, item, true);
self.addWidget(self._getChildName(rank++), w); self.addWidget(self._getChildName(rank++), w);
w.element.addClass("h-float-fill-item"); w.element.addClass("h-fill-item");
w.element.css({ w.element.css({
float: "right", float: "right",
position: "relative" position: "relative"
@ -18467,9 +18519,9 @@ BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, {
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width; var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width;
if (columnSize === "fill") { if (columnSize === "fill") {
var w = BI._lazyCreateWidget(item); var w = createWidget(i, item);
self.addWidget(self._getChildName(rank++), w); self.addWidget(self._getChildName(rank++), w);
w.element.addClass("h-float-fill-item").css({ w.element.addClass("h-fill-item").css({
position: "relative" position: "relative"
}); });
} }
@ -21520,9 +21572,9 @@ BI.shortcut("bi.vtape", BI.VTapeLayout);
* @extends BI.Layout * @extends BI.Layout
*/ */
BI.TdLayout = BI.inherit(BI.Layout, { BI.TdLayout = BI.inherit(BI.Layout, {
props: function () { props: function (props) {
return BI.extend(BI.TdLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.TdLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-td", baseCls: "bi-td" + (props.verticalAlign === BI.VerticalAlign.Stretch ? " bi-h-fill" : ""),
columnSize: [], columnSize: [],
rowSize: [], rowSize: [],
verticalAlign: BI.VerticalAlign.Middle, verticalAlign: BI.VerticalAlign.Middle,
@ -21605,6 +21657,9 @@ BI.TdLayout = BI.inherit(BI.Layout, {
for (var i = 0; i < arr.length; i++) { for (var i = 0; i < arr.length; i++) {
var w = BI._lazyCreateWidget(arr[i]); var w = BI._lazyCreateWidget(arr[i]);
if (o.verticalAlign === BI.VerticalAlign.Stretch) {
w.element.addClass("h-fill-item");
}
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"}); w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});
var item = arr[i]; var item = arr[i];
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
@ -78307,7 +78362,26 @@ BI.prepares.push(function () {
}); });
BI.Plugin.configWidget("bi.inline", function (ob) { BI.Plugin.configWidget("bi.inline", function (ob) {
// 当列宽既需要自动列宽又需要自适应列宽时,inline布局也处理不了了,降级table处理吧 // 当列宽既需要自动列宽又需要自适应列宽时,inline布局也处理不了了,降级table处理吧
var hasAutoAndFillColumnSize;
if (ob.columnSize && ob.columnSize.indexOf("") >= 0 && ob.columnSize.indexOf("fill") >= 0) { if (ob.columnSize && ob.columnSize.indexOf("") >= 0 && ob.columnSize.indexOf("fill") >= 0) {
hasAutoAndFillColumnSize = true;
} else {
var hasAuto = false, hasFill = false;
BI.each(ob.items, function (i, item) {
if (item.width === "fill") {
hasFill = true;
} else if (BI.isNull(item.width) || item.width === "") {
hasAuto = true;
}
});
hasAutoAndFillColumnSize = hasAuto && hasFill;
}
if (hasAutoAndFillColumnSize) {
// 宽度是不是受限
if ((ob.scrollable !== true && ob.scrollx !== true) || ob.horizontalAlign === BI.HorizontalAlign.Stretch) {
return BI.extend({}, ob, {type: "bi.horizontal_float_fill"});
}
return BI.extend({ return BI.extend({
horizontalAlign: BI.HorizontalAlign.Stretch horizontalAlign: BI.HorizontalAlign.Stretch
}, ob, {type: "bi.table_adapt"}); }, ob, {type: "bi.table_adapt"});
@ -78376,6 +78450,12 @@ BI.prepares.push(function () {
scrollx: false scrollx: false
}, ob, {type: "bi.flex_horizontal"}); }, ob, {type: "bi.flex_horizontal"});
} }
if ((ob.horizontalAlign && ob.horizontalAlign !== BI.HorizontalAlign.Stretch) || (ob.scrollable === true || ob.scrollx === true)) {
// 宽度不受限,要用table布局
return BI.extend({
horizontalAlign: BI.HorizontalAlign.Stretch
}, ob, {type: "bi.table_adapt"});
}
return BI.extend({}, ob, {type: "bi.horizontal_float_fill"}); return BI.extend({}, ob, {type: "bi.horizontal_float_fill"});
}); });
BI.Plugin.configWidget("bi.vertical_fill", function (ob) { BI.Plugin.configWidget("bi.vertical_fill", function (ob) {

2
dist/fineui.proxy.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.proxy.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.proxy.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.proxy.min.js.map vendored

File diff suppressed because one or more lines are too long

81
dist/fineui_without_jquery_polyfill.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-7-30 16:21:29 */ /*! time: 2021-7-30 16:50:15 */
/******/ (function(modules) { // webpackBootstrap /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache /******/ // The module cache
/******/ var installedModules = {}; /******/ var installedModules = {};
@ -17556,9 +17556,9 @@ BI.shortcut("bi.right_vertical_adapt", BI.RightVerticalAdaptLayout);
* @extends BI.Layout * @extends BI.Layout
*/ */
BI.TableAdaptLayout = BI.inherit(BI.Layout, { BI.TableAdaptLayout = BI.inherit(BI.Layout, {
props: function () { props: function (props) {
return BI.extend(BI.TableAdaptLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.TableAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-t-a", baseCls: "bi-t-a" + (props.verticalAlign === BI.VerticalAlign.Stretch ? " bi-h-fill" : ""),
columnSize: [], columnSize: [],
verticalAlign: BI.VerticalAlign.Top, verticalAlign: BI.VerticalAlign.Top,
horizontalAlign: BI.HorizontalAlign.Left, horizontalAlign: BI.HorizontalAlign.Left,
@ -17598,6 +17598,9 @@ BI.TableAdaptLayout = BI.inherit(BI.Layout, {
if (!this.hasWidget(this._getChildName(i))) { if (!this.hasWidget(this._getChildName(i))) {
var w = BI._lazyCreateWidget(item); var w = BI._lazyCreateWidget(item);
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"}); w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});
if (o.verticalAlign === BI.VerticalAlign.Stretch) {
w.element.addClass("h-fill-item");
}
td = BI._lazyCreateWidget({ td = BI._lazyCreateWidget({
type: "bi.default", type: "bi.default",
width: width, width: width,
@ -17998,8 +18001,9 @@ BI.shortcut("bi.vertical_fill", BI.VerticalFillLayout);
BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, { BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.FloatHorizontalFillLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.FloatHorizontalFillLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-h-float-fill", baseCls: "bi-h-float-fill bi-h-fill",
verticalAlign: BI.VerticalAlign.Top, horizontalAlign: BI.HorizontalAlign.Stretch,
verticalAlign: BI.VerticalAlign.Stretch,
hgap: 0, hgap: 0,
vgap: 0, vgap: 0,
lgap: 0, lgap: 0,
@ -18027,6 +18031,54 @@ BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, {
var self = this, o = this.options; var self = this, o = this.options;
items = BI.compact(items); items = BI.compact(items);
var rank = 0; var rank = 0;
function createWidget (i, item, desc) {
if (o.verticalAlign !== BI.VerticalAlign.Stretch) {
var w = BI._lazyCreateWidget({
type: "bi.vertical_adapt",
horizontalAlign: BI.HorizontalAlign.Stretch,
verticalAlign: o.verticalAlign,
items: [item]
});
} else {
var w = BI._lazyCreateWidget(item);
}
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-top": (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0)) / BI.pixRatio + BI.pixUnit
});
}
if (desc) {
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": ((i === o.items.length - 1 ? o.hgap : 0) + o.rgap + (item.rgap || 0) + (item.hgap || 0)) / BI.pixRatio + BI.pixUnit
});
}
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-left": (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0)) / BI.pixRatio + BI.pixUnit
});
}
} else {
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-left": ((i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0)) / BI.pixRatio + BI.pixUnit
});
}
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0)) / BI.pixRatio + BI.pixUnit
});
}
}
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-bottom": (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0)) / BI.pixRatio + BI.pixUnit
});
}
return w;
}
BI.any(items, function (i, item) { BI.any(items, function (i, item) {
if (BI.isEmptyObject(item)) { if (BI.isEmptyObject(item)) {
return true; return true;
@ -18035,9 +18087,9 @@ BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, {
if (columnSize === "fill") { if (columnSize === "fill") {
return true; return true;
} }
var w = BI._lazyCreateWidget(item); var w = createWidget(i, item);
self.addWidget(self._getChildName(rank++), w); self.addWidget(self._getChildName(rank++), w);
w.element.addClass("h-float-fill-item"); w.element.addClass("h-fill-item");
w.element.css({ w.element.css({
float: "left", float: "left",
position: "relative" position: "relative"
@ -18051,9 +18103,9 @@ BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, {
if (columnSize === "fill") { if (columnSize === "fill") {
return true; return true;
} }
var w = BI._lazyCreateWidget(item); var w = createWidget(i, item, true);
self.addWidget(self._getChildName(rank++), w); self.addWidget(self._getChildName(rank++), w);
w.element.addClass("h-float-fill-item"); w.element.addClass("h-fill-item");
w.element.css({ w.element.css({
float: "right", float: "right",
position: "relative" position: "relative"
@ -18062,9 +18114,9 @@ BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, {
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width; var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width;
if (columnSize === "fill") { if (columnSize === "fill") {
var w = BI._lazyCreateWidget(item); var w = createWidget(i, item);
self.addWidget(self._getChildName(rank++), w); self.addWidget(self._getChildName(rank++), w);
w.element.addClass("h-float-fill-item").css({ w.element.addClass("h-fill-item").css({
position: "relative" position: "relative"
}); });
} }
@ -21115,9 +21167,9 @@ BI.shortcut("bi.vtape", BI.VTapeLayout);
* @extends BI.Layout * @extends BI.Layout
*/ */
BI.TdLayout = BI.inherit(BI.Layout, { BI.TdLayout = BI.inherit(BI.Layout, {
props: function () { props: function (props) {
return BI.extend(BI.TdLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.TdLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-td", baseCls: "bi-td" + (props.verticalAlign === BI.VerticalAlign.Stretch ? " bi-h-fill" : ""),
columnSize: [], columnSize: [],
rowSize: [], rowSize: [],
verticalAlign: BI.VerticalAlign.Middle, verticalAlign: BI.VerticalAlign.Middle,
@ -21200,6 +21252,9 @@ BI.TdLayout = BI.inherit(BI.Layout, {
for (var i = 0; i < arr.length; i++) { for (var i = 0; i < arr.length; i++) {
var w = BI._lazyCreateWidget(arr[i]); var w = BI._lazyCreateWidget(arr[i]);
if (o.verticalAlign === BI.VerticalAlign.Stretch) {
w.element.addClass("h-fill-item");
}
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"}); w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});
var item = arr[i]; var item = arr[i];
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {

2
dist/fineui_without_jquery_polyfill.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/font.css vendored

File diff suppressed because one or more lines are too long

2
dist/resource.css vendored

File diff suppressed because one or more lines are too long

2
dist/utils.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-7-30 16:21:29 */ /*! time: 2021-7-30 16:50:15 */
/******/ (function(modules) { // webpackBootstrap /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache /******/ // The module cache
/******/ var installedModules = {}; /******/ var installedModules = {};

2
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

2
package.json

@ -1,6 +1,6 @@
{ {
"name": "fineui", "name": "fineui",
"version": "2.0.20210730162322", "version": "2.0.20210730165120",
"description": "fineui", "description": "fineui",
"main": "dist/fineui.min.js", "main": "dist/fineui.min.js",
"types": "dist/lib/index.d.ts", "types": "dist/lib/index.d.ts",

Loading…
Cancel
Save