Browse Source

BI-32702 新增display:table布局以及adapt布局规则

es6
windy 6 years ago
parent
commit
fa1519155d
  1. 29
      dist/base.css
  2. 13
      dist/base.js
  3. 47
      dist/bundle.css
  4. 76
      dist/bundle.ie.js
  5. 68
      dist/bundle.ie.min.js
  6. 76
      dist/bundle.js
  7. 2
      dist/bundle.min.css
  8. 68
      dist/bundle.min.js
  9. 18
      dist/core.css
  10. 55
      dist/core.js
  11. 18
      dist/core_without_normalize.css
  12. 47
      dist/fineui.css
  13. 76
      dist/fineui.ie.js
  14. 68
      dist/fineui.ie.min.js
  15. 76
      dist/fineui.js
  16. 2
      dist/fineui.min.css
  17. 68
      dist/fineui.min.js
  18. 36
      dist/fineui_without_jquery_polyfill.js
  19. 2
      dist/utils.min.js
  20. 8
      dist/widget.js
  21. 6
      src/base/pane.js
  22. 7
      src/base/single/label/label.js
  23. 40
      src/core/platform/web/config.js
  24. 101
      src/core/wrapper/layout/adapt/adapt.table.js
  25. 6
      src/core/wrapper/layout/adapt/inline.center.js
  26. 9
      src/core/wrapper/layout/adapt/inline.vertical.js
  27. 13
      src/css/base/combo/combo.css
  28. 4
      src/css/base/pane.css
  29. 12
      src/css/base/trigger/trigger.css
  30. 18
      src/css/core/wrapper/inline.css
  31. 2
      src/less/base/combo/combo.bubble.less
  32. 5
      src/less/base/pane.less
  33. 17
      src/less/base/trigger/trigger.less
  34. 13
      src/less/core/wrapper/inline.center.less
  35. 14
      src/less/core/wrapper/inline.vertical.less
  36. 16
      src/less/visual.less
  37. 2
      src/widget/yearmonth/trigger.yearmonth.js
  38. 6
      src/widget/yearquarter/trigger.yearquarter.js

29
dist/base.css vendored

@ -421,6 +421,7 @@
} }
.bi-bubble-combo .button-combo-triangle-wrapper { .bi-bubble-combo .button-combo-triangle-wrapper {
position: fixed !important; position: fixed !important;
line-height: 0;
z-index: 10000000; z-index: 10000000;
} }
.bi-bubble-combo .bubble-combo-triangle-left { .bi-bubble-combo .bubble-combo-triangle-left {
@ -428,13 +429,14 @@
position: absolute; position: absolute;
width: 6px; width: 6px;
height: 16px; height: 16px;
text-align: left;
} }
.bi-bubble-combo .bubble-combo-triangle-left:before { .bi-bubble-combo .bubble-combo-triangle-left:before {
position: absolute; position: absolute;
width: 6px; width: 6px;
height: 6px; height: 6px;
margin-left: 2px; margin-left: -3px;
margin-top: -3px; margin-top: 4px;
content: ""; content: "";
transform: rotate(-45deg); transform: rotate(-45deg);
} }
@ -443,6 +445,7 @@
position: absolute; position: absolute;
width: 6px; width: 6px;
height: 16px; height: 16px;
text-align: left;
} }
.bi-bubble-combo .bubble-combo-triangle-right:before { .bi-bubble-combo .bubble-combo-triangle-right:before {
position: absolute; position: absolute;
@ -458,12 +461,13 @@
position: absolute; position: absolute;
width: 16px; width: 16px;
height: 6px; height: 6px;
text-align: left;
} }
.bi-bubble-combo .bubble-combo-triangle-top:before { .bi-bubble-combo .bubble-combo-triangle-top:before {
position: absolute; position: absolute;
width: 6px; width: 6px;
height: 6px; height: 6px;
margin-left: 3px; margin-left: 4px;
margin-top: -3px; margin-top: -3px;
content: ""; content: "";
transform: rotate(45deg); transform: rotate(45deg);
@ -473,12 +477,13 @@
position: absolute; position: absolute;
width: 16px; width: 16px;
height: 6px; height: 6px;
text-align: left;
} }
.bi-bubble-combo .bubble-combo-triangle-bottom:before { .bi-bubble-combo .bubble-combo-triangle-bottom:before {
position: absolute; position: absolute;
width: 6px; width: 6px;
height: 6px; height: 6px;
margin-left: 3px; margin-left: 4px;
margin-top: 2px; margin-top: 2px;
content: ""; content: "";
transform: rotate(-135deg); transform: rotate(-135deg);
@ -666,7 +671,7 @@
.bi-loading-widget { .bi-loading-widget {
font-size: 0; font-size: 0;
} }
.bi-loading-widget div { .bi-loading-widget .animate-rect {
background-color: rgba(54, 133, 242, 0.9); background-color: rgba(54, 133, 242, 0.9);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#e63685f2,endColorstr=#e63685f2); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#e63685f2,endColorstr=#e63685f2);
-webkit-border-radius: 1.5px; -webkit-border-radius: 1.5px;
@ -782,7 +787,7 @@
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/wave_loading.gif'); _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/wave_loading.gif');
_background: none; _background: none;
} }
.bi-loading-widget.hack div { .bi-loading-widget.hack .animate-rect {
background-color: rgba(54, 133, 242, 0); background-color: rgba(54, 133, 242, 0);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#003685f2,endColorstr=#003685f2); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#003685f2,endColorstr=#003685f2);
} }
@ -1645,18 +1650,6 @@ ul.ztree.zTreeDragUL {
.bi-trigger .bi-trigger-icon-button { .bi-trigger .bi-trigger-icon-button {
font-size: 16px; font-size: 16px;
} }
.bi-trigger .trigger-up {
display: none;
}
.bi-trigger .trigger-down {
display: block;
}
.bi-combo-popup > .bi-trigger .trigger-up {
display: block;
}
.bi-combo-popup > .bi-trigger .trigger-down {
display: none;
}
.bi-select-text-trigger { .bi-select-text-trigger {
-webkit-border-radius: 2px; -webkit-border-radius: 2px;

13
dist/base.js vendored

@ -260,17 +260,17 @@ BI.Pane = BI.inherit(BI.Widget, {
vgap: 2.5, vgap: 2.5,
items: [{ items: [{
type: "bi.layout", type: "bi.layout",
cls: "rect1", cls: "animate-rect rect1",
height: 25, height: 25,
width: 3 width: 3
}, { }, {
type: "bi.layout", type: "bi.layout",
cls: "rect2", cls: "animate-rect rect2",
height: 25, height: 25,
width: 3 width: 3
}, { }, {
type: "bi.layout", type: "bi.layout",
cls: "rect3", cls: "animate-rect rect3",
height: 25, height: 25,
width: 3 width: 3
}] }]
@ -10355,6 +10355,7 @@ BI.Label = BI.inherit(BI.Single, {
} }
] ]
}); });
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
if (o.whiteSpace == "normal") { if (o.whiteSpace == "normal") {
@ -10371,6 +10372,7 @@ BI.Label = BI.inherit(BI.Single, {
element: this, element: this,
items: [this.text] items: [this.text]
}); });
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
if (BI.isNumber(o.height) && o.height > 0) { if (BI.isNumber(o.height) && o.height > 0) {
@ -10406,6 +10408,7 @@ BI.Label = BI.inherit(BI.Single, {
el: (this.text = BI.createWidget(json)) el: (this.text = BI.createWidget(json))
}] }]
}); });
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
if (BI.isNumber(o.textWidth) && o.textWidth > 0) { if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
@ -10426,6 +10429,7 @@ BI.Label = BI.inherit(BI.Single, {
} }
] ]
}); });
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
if (o.whiteSpace == "normal") { if (o.whiteSpace == "normal") {
@ -10442,6 +10446,8 @@ BI.Label = BI.inherit(BI.Single, {
element: this, element: this,
items: [this.text] items: [this.text]
}); });
// 父亲有line-height,而当前label是inline-block,那么他的行高一定是父亲的lineHeight,就算text上设置了line-height
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
if (BI.isNumber(o.height) && o.height > 0) { if (BI.isNumber(o.height) && o.height > 0) {
@ -10500,6 +10506,7 @@ BI.Label = BI.inherit(BI.Single, {
element: this, element: this,
items: [this.text] items: [this.text]
}); });
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
this.text = BI.createWidget(BI.extend(json, { this.text = BI.createWidget(BI.extend(json, {

47
dist/bundle.css vendored

@ -1937,6 +1937,15 @@ textarea {
vertical-align: middle; vertical-align: middle;
content: ' '; content: ' ';
} }
.bi-inline-center-adapt-layout > .inline-center-adapt-item {
display: inline-block;
}
.bi-inline-center-adapt-layout > .inline-center-adapt-item.x-icon {
display: inline-block !important;
}
.bi-inline-center-adapt-layout > .bi-combo.bi-combo-popup {
display: inline-block !important;
}
.bi-inline-vertical-adapt-layout:after { .bi-inline-vertical-adapt-layout:after {
display: inline-block; display: inline-block;
@ -1945,6 +1954,15 @@ textarea {
vertical-align: middle; vertical-align: middle;
content: ' '; content: ' ';
} }
.bi-inline-vertical-adapt-layout > .inline-vertical-adapt-item {
display: inline-block;
}
.bi-inline-vertical-adapt-layout > .inline-vertical-adapt-item.x-icon {
display: inline-block !important;
}
.bi-inline-vertical-adapt-layout > .bi-combo.bi-combo-popup {
display: inline-block !important;
}
.bi-theme-dark { .bi-theme-dark {
background-color: #191B2B; background-color: #191B2B;
color: #d6e0dc; color: #d6e0dc;
@ -2375,6 +2393,7 @@ textarea {
} }
.bi-bubble-combo .button-combo-triangle-wrapper { .bi-bubble-combo .button-combo-triangle-wrapper {
position: fixed !important; position: fixed !important;
line-height: 0;
z-index: 10000000; z-index: 10000000;
} }
.bi-bubble-combo .bubble-combo-triangle-left { .bi-bubble-combo .bubble-combo-triangle-left {
@ -2382,13 +2401,14 @@ textarea {
position: absolute; position: absolute;
width: 6px; width: 6px;
height: 16px; height: 16px;
text-align: left;
} }
.bi-bubble-combo .bubble-combo-triangle-left:before { .bi-bubble-combo .bubble-combo-triangle-left:before {
position: absolute; position: absolute;
width: 6px; width: 6px;
height: 6px; height: 6px;
margin-left: 2px; margin-left: -3px;
margin-top: -3px; margin-top: 4px;
content: ""; content: "";
transform: rotate(-45deg); transform: rotate(-45deg);
} }
@ -2397,6 +2417,7 @@ textarea {
position: absolute; position: absolute;
width: 6px; width: 6px;
height: 16px; height: 16px;
text-align: left;
} }
.bi-bubble-combo .bubble-combo-triangle-right:before { .bi-bubble-combo .bubble-combo-triangle-right:before {
position: absolute; position: absolute;
@ -2412,12 +2433,13 @@ textarea {
position: absolute; position: absolute;
width: 16px; width: 16px;
height: 6px; height: 6px;
text-align: left;
} }
.bi-bubble-combo .bubble-combo-triangle-top:before { .bi-bubble-combo .bubble-combo-triangle-top:before {
position: absolute; position: absolute;
width: 6px; width: 6px;
height: 6px; height: 6px;
margin-left: 3px; margin-left: 4px;
margin-top: -3px; margin-top: -3px;
content: ""; content: "";
transform: rotate(45deg); transform: rotate(45deg);
@ -2427,12 +2449,13 @@ textarea {
position: absolute; position: absolute;
width: 16px; width: 16px;
height: 6px; height: 6px;
text-align: left;
} }
.bi-bubble-combo .bubble-combo-triangle-bottom:before { .bi-bubble-combo .bubble-combo-triangle-bottom:before {
position: absolute; position: absolute;
width: 6px; width: 6px;
height: 6px; height: 6px;
margin-left: 3px; margin-left: 4px;
margin-top: 2px; margin-top: 2px;
content: ""; content: "";
transform: rotate(-135deg); transform: rotate(-135deg);
@ -2620,7 +2643,7 @@ textarea {
.bi-loading-widget { .bi-loading-widget {
font-size: 0; font-size: 0;
} }
.bi-loading-widget div { .bi-loading-widget .animate-rect {
background-color: rgba(54, 133, 242, 0.9); background-color: rgba(54, 133, 242, 0.9);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#e63685f2,endColorstr=#e63685f2); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#e63685f2,endColorstr=#e63685f2);
-webkit-border-radius: 1.5px; -webkit-border-radius: 1.5px;
@ -2736,7 +2759,7 @@ textarea {
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/wave_loading.gif'); _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/wave_loading.gif');
_background: none; _background: none;
} }
.bi-loading-widget.hack div { .bi-loading-widget.hack .animate-rect {
background-color: rgba(54, 133, 242, 0); background-color: rgba(54, 133, 242, 0);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#003685f2,endColorstr=#003685f2); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#003685f2,endColorstr=#003685f2);
} }
@ -3599,18 +3622,6 @@ ul.ztree.zTreeDragUL {
.bi-trigger .bi-trigger-icon-button { .bi-trigger .bi-trigger-icon-button {
font-size: 16px; font-size: 16px;
} }
.bi-trigger .trigger-up {
display: none;
}
.bi-trigger .trigger-down {
display: block;
}
.bi-combo-popup > .bi-trigger .trigger-up {
display: block;
}
.bi-combo-popup > .bi-trigger .trigger-down {
display: none;
}
.bi-select-text-trigger { .bi-select-text-trigger {
-webkit-border-radius: 2px; -webkit-border-radius: 2px;

76
dist/bundle.ie.js vendored

@ -19037,6 +19037,11 @@ _.extend(BI, {
});// 工程配置 });// 工程配置
BI.prepares.push(function () { BI.prepares.push(function () {
// 注册布局 // 注册布局
// adapt类布局优先级规则
// 1、在非IE且支持flex的浏览器下使用flex布局
// 2、IE或者不支持flex的浏览器下使用inline布局
// 3、在2的情况下如果布局的items大于1的话使用display:table的布局
// 4、在3的情况下如果IE版本低于8使用table标签布局
var _isSupprtFlex; var _isSupprtFlex;
var isSupportFlex = function () { var isSupportFlex = function () {
if (_isSupprtFlex == null) { if (_isSupprtFlex == null) {
@ -19045,25 +19050,39 @@ BI.prepares.push(function () {
return _isSupprtFlex; return _isSupprtFlex;
}; };
BI.Plugin.registerWidget("bi.horizontal", function (ob) { BI.Plugin.registerWidget("bi.horizontal", function (ob) {
var isIE = BI.isIE(), supportFlex = isSupportFlex(), isLessIE8 = isIE && BI.getIEVersion() < 8;
// center_adapt // center_adapt
if (ob.verticalAlign === BI.VerticalAlign.Middle && ob.horizontalAlign === BI.HorizontalAlign.Center) { if (ob.verticalAlign === BI.VerticalAlign.Middle && ob.horizontalAlign === BI.HorizontalAlign.Center) {
return ob; if (isLessIE8) {
return ob;
}
return BI.extend(ob, {type: "bi.table_adapt"});
} }
// vertical_adapt // vertical_adapt
if (ob.verticalAlign === BI.VerticalAlign.Middle && ob.horizontalAlign === BI.HorizontalAlign.Left) { if (ob.verticalAlign === BI.VerticalAlign.Middle && ob.horizontalAlign === BI.HorizontalAlign.Left) {
return ob; if (isLessIE8) {
return ob;
}
return BI.extend(ob, {type: "bi.table_adapt"});
} }
// horizontal_adapt // horizontal_adapt
if (ob.verticalAlign === BI.VerticalAlign.Top && ob.horizontalAlign === BI.HorizontalAlign.Center) { if (ob.verticalAlign === BI.VerticalAlign.Top && ob.horizontalAlign === BI.HorizontalAlign.Center) {
return ob; if (isLessIE8) {
return ob;
}
return BI.extend(ob, {type: "bi.table_adapt"});
} }
if (!BI.isIE() && isSupportFlex()) { if(!isIE) {
return BI.extend(ob, {type: "bi.flex_horizontal"}); // if(supportFlex) {
// return BI.extend(ob, {type: "bi.flex_horizontal"});
// }
return BI.extend(ob, {type: "bi.table_adapt"});
} }
return ob; return ob;
}); });
BI.Plugin.registerWidget("bi.center_adapt", function (ob) { BI.Plugin.registerWidget("bi.center_adapt", function (ob) {
if (!BI.isIE() && isSupportFlex() && ob.items && ob.items.length <= 1) { var isIE = BI.isIE(), supportFlex = isSupportFlex(), justOneItem = (ob.items && ob.items.length <= 1);
if (!isIE && supportFlex && justOneItem) {
// 有滚动条的情况下需要用到flex_wrapper_center布局 // 有滚动条的情况下需要用到flex_wrapper_center布局
if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) { if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) {
// 不是IE用flex_wrapper_center布局 // 不是IE用flex_wrapper_center布局
@ -19071,10 +19090,15 @@ BI.prepares.push(function () {
} }
return BI.extend(ob, {type: "bi.flex_center"}); return BI.extend(ob, {type: "bi.flex_center"});
} }
// 一个item的情况下inline布局睥睨天下
if(justOneItem) {
return BI.extend(ob, {type: "bi.inline_center_adapt"});
}
return ob; return ob;
}); });
BI.Plugin.registerWidget("bi.vertical_adapt", function (ob) { BI.Plugin.registerWidget("bi.vertical_adapt", function (ob) {
if (!BI.isIE() && isSupportFlex()) { var isIE = BI.isIE(), supportFlex = isSupportFlex();
if (!isIE && supportFlex) {
// 有滚动条的情况下需要用到flex_wrapper_center布局 // 有滚动条的情况下需要用到flex_wrapper_center布局
if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) { if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) {
// 不是IE用flex_wrapper_center布局 // 不是IE用flex_wrapper_center布局
@ -19082,7 +19106,7 @@ BI.prepares.push(function () {
} }
return BI.extend(ob, {type: "bi.flex_vertical_center"}); return BI.extend(ob, {type: "bi.flex_vertical_center"});
} }
return ob; return BI.extend(ob, {type: "bi.inline_vertical_adapt"});
}); });
BI.Plugin.registerWidget("bi.horizontal_adapt", function (ob) { BI.Plugin.registerWidget("bi.horizontal_adapt", function (ob) {
if (ob.items && ob.items.length <= 1) { if (ob.items && ob.items.length <= 1) {
@ -31099,11 +31123,9 @@ BI.InlineCenterAdaptLayout = BI.inherit(BI.Layout, {
var w = BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this, arguments); var w = BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this, arguments);
w.element.css({ w.element.css({
position: "relative", position: "relative",
display: "inline-block", "vertical-align": "middle"
"vertical-align": "middle",
"*display": "inline",
"*zoom": 1
}); });
w.element.addClass("inline-center-adapt-item");
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
@ -31175,7 +31197,8 @@ BI.InlineVerticalAdaptLayout = BI.inherit(BI.Layout, {
render: function () { render: function () {
BI.InlineVerticalAdaptLayout.superclass.render.apply(this, arguments); BI.InlineVerticalAdaptLayout.superclass.render.apply(this, arguments);
this.element.css({ this.element.css({
whiteSpace: "nowrap" whiteSpace: "nowrap",
textAlign: "left"
}); });
this.populate(this.options.items); this.populate(this.options.items);
}, },
@ -31185,11 +31208,9 @@ BI.InlineVerticalAdaptLayout = BI.inherit(BI.Layout, {
var w = BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this, arguments); var w = BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this, arguments);
w.element.css({ w.element.css({
position: "relative", position: "relative",
display: "inline-block", "vertical-align": "middle"
"vertical-align": "middle",
"*display": "inline",
"*zoom": 1
}); });
w.element.addClass("inline-vertical-adapt-item");
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
@ -35274,17 +35295,17 @@ BI.Pane = BI.inherit(BI.Widget, {
vgap: 2.5, vgap: 2.5,
items: [{ items: [{
type: "bi.layout", type: "bi.layout",
cls: "rect1", cls: "animate-rect rect1",
height: 25, height: 25,
width: 3 width: 3
}, { }, {
type: "bi.layout", type: "bi.layout",
cls: "rect2", cls: "animate-rect rect2",
height: 25, height: 25,
width: 3 width: 3
}, { }, {
type: "bi.layout", type: "bi.layout",
cls: "rect3", cls: "animate-rect rect3",
height: 25, height: 25,
width: 3 width: 3
}] }]
@ -45369,6 +45390,7 @@ BI.Label = BI.inherit(BI.Single, {
} }
] ]
}); });
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
if (o.whiteSpace == "normal") { if (o.whiteSpace == "normal") {
@ -45385,6 +45407,7 @@ BI.Label = BI.inherit(BI.Single, {
element: this, element: this,
items: [this.text] items: [this.text]
}); });
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
if (BI.isNumber(o.height) && o.height > 0) { if (BI.isNumber(o.height) && o.height > 0) {
@ -45420,6 +45443,7 @@ BI.Label = BI.inherit(BI.Single, {
el: (this.text = BI.createWidget(json)) el: (this.text = BI.createWidget(json))
}] }]
}); });
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
if (BI.isNumber(o.textWidth) && o.textWidth > 0) { if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
@ -45440,6 +45464,7 @@ BI.Label = BI.inherit(BI.Single, {
} }
] ]
}); });
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
if (o.whiteSpace == "normal") { if (o.whiteSpace == "normal") {
@ -45456,6 +45481,8 @@ BI.Label = BI.inherit(BI.Single, {
element: this, element: this,
items: [this.text] items: [this.text]
}); });
// 父亲有line-height,而当前label是inline-block,那么他的行高一定是父亲的lineHeight,就算text上设置了line-height
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
if (BI.isNumber(o.height) && o.height > 0) { if (BI.isNumber(o.height) && o.height > 0) {
@ -45514,6 +45541,7 @@ BI.Label = BI.inherit(BI.Single, {
element: this, element: this,
items: [this.text] items: [this.text]
}); });
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
this.text = BI.createWidget(BI.extend(json, { this.text = BI.createWidget(BI.extend(json, {
@ -79162,7 +79190,7 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
extraCls: "bi-year-month-trigger", extraCls: "bi-year-month-trigger",
min: "1900-01-01", // 最小日期 min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期 max: "2099-12-31", // 最大日期
height: 24 height: 22
}, },
beforeInit: function (callback) { beforeInit: function (callback) {
@ -80164,7 +80192,7 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
extraCls: "bi-year-quarter-trigger", extraCls: "bi-year-quarter-trigger",
min: "1900-01-01", // 最小日期 min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期 max: "2099-12-31", // 最大日期
height: 24 height: 22
}, },
_init: function () { _init: function () {
@ -80195,9 +80223,9 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
el: { el: {
type: "bi.text_button", type: "bi.text_button",
text: BI.i18nText("BI-Multi_Date_Quarter"), text: BI.i18nText("BI-Multi_Date_Quarter"),
width: o.height < 24 ? 24 : o.height width: 24
}, },
width: o.height}] width: 24}]
}] }]
}, { }, {
el: { el: {

68
dist/bundle.ie.min.js vendored

File diff suppressed because one or more lines are too long

76
dist/bundle.js vendored

@ -19037,6 +19037,11 @@ _.extend(BI, {
});// 工程配置 });// 工程配置
BI.prepares.push(function () { BI.prepares.push(function () {
// 注册布局 // 注册布局
// adapt类布局优先级规则
// 1、在非IE且支持flex的浏览器下使用flex布局
// 2、IE或者不支持flex的浏览器下使用inline布局
// 3、在2的情况下如果布局的items大于1的话使用display:table的布局
// 4、在3的情况下如果IE版本低于8使用table标签布局
var _isSupprtFlex; var _isSupprtFlex;
var isSupportFlex = function () { var isSupportFlex = function () {
if (_isSupprtFlex == null) { if (_isSupprtFlex == null) {
@ -19045,25 +19050,39 @@ BI.prepares.push(function () {
return _isSupprtFlex; return _isSupprtFlex;
}; };
BI.Plugin.registerWidget("bi.horizontal", function (ob) { BI.Plugin.registerWidget("bi.horizontal", function (ob) {
var isIE = BI.isIE(), supportFlex = isSupportFlex(), isLessIE8 = isIE && BI.getIEVersion() < 8;
// center_adapt // center_adapt
if (ob.verticalAlign === BI.VerticalAlign.Middle && ob.horizontalAlign === BI.HorizontalAlign.Center) { if (ob.verticalAlign === BI.VerticalAlign.Middle && ob.horizontalAlign === BI.HorizontalAlign.Center) {
return ob; if (isLessIE8) {
return ob;
}
return BI.extend(ob, {type: "bi.table_adapt"});
} }
// vertical_adapt // vertical_adapt
if (ob.verticalAlign === BI.VerticalAlign.Middle && ob.horizontalAlign === BI.HorizontalAlign.Left) { if (ob.verticalAlign === BI.VerticalAlign.Middle && ob.horizontalAlign === BI.HorizontalAlign.Left) {
return ob; if (isLessIE8) {
return ob;
}
return BI.extend(ob, {type: "bi.table_adapt"});
} }
// horizontal_adapt // horizontal_adapt
if (ob.verticalAlign === BI.VerticalAlign.Top && ob.horizontalAlign === BI.HorizontalAlign.Center) { if (ob.verticalAlign === BI.VerticalAlign.Top && ob.horizontalAlign === BI.HorizontalAlign.Center) {
return ob; if (isLessIE8) {
return ob;
}
return BI.extend(ob, {type: "bi.table_adapt"});
} }
if (!BI.isIE() && isSupportFlex()) { if(!isIE) {
return BI.extend(ob, {type: "bi.flex_horizontal"}); // if(supportFlex) {
// return BI.extend(ob, {type: "bi.flex_horizontal"});
// }
return BI.extend(ob, {type: "bi.table_adapt"});
} }
return ob; return ob;
}); });
BI.Plugin.registerWidget("bi.center_adapt", function (ob) { BI.Plugin.registerWidget("bi.center_adapt", function (ob) {
if (!BI.isIE() && isSupportFlex() && ob.items && ob.items.length <= 1) { var isIE = BI.isIE(), supportFlex = isSupportFlex(), justOneItem = (ob.items && ob.items.length <= 1);
if (!isIE && supportFlex && justOneItem) {
// 有滚动条的情况下需要用到flex_wrapper_center布局 // 有滚动条的情况下需要用到flex_wrapper_center布局
if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) { if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) {
// 不是IE用flex_wrapper_center布局 // 不是IE用flex_wrapper_center布局
@ -19071,10 +19090,15 @@ BI.prepares.push(function () {
} }
return BI.extend(ob, {type: "bi.flex_center"}); return BI.extend(ob, {type: "bi.flex_center"});
} }
// 一个item的情况下inline布局睥睨天下
if(justOneItem) {
return BI.extend(ob, {type: "bi.inline_center_adapt"});
}
return ob; return ob;
}); });
BI.Plugin.registerWidget("bi.vertical_adapt", function (ob) { BI.Plugin.registerWidget("bi.vertical_adapt", function (ob) {
if (!BI.isIE() && isSupportFlex()) { var isIE = BI.isIE(), supportFlex = isSupportFlex();
if (!isIE && supportFlex) {
// 有滚动条的情况下需要用到flex_wrapper_center布局 // 有滚动条的情况下需要用到flex_wrapper_center布局
if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) { if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) {
// 不是IE用flex_wrapper_center布局 // 不是IE用flex_wrapper_center布局
@ -19082,7 +19106,7 @@ BI.prepares.push(function () {
} }
return BI.extend(ob, {type: "bi.flex_vertical_center"}); return BI.extend(ob, {type: "bi.flex_vertical_center"});
} }
return ob; return BI.extend(ob, {type: "bi.inline_vertical_adapt"});
}); });
BI.Plugin.registerWidget("bi.horizontal_adapt", function (ob) { BI.Plugin.registerWidget("bi.horizontal_adapt", function (ob) {
if (ob.items && ob.items.length <= 1) { if (ob.items && ob.items.length <= 1) {
@ -31099,11 +31123,9 @@ BI.InlineCenterAdaptLayout = BI.inherit(BI.Layout, {
var w = BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this, arguments); var w = BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this, arguments);
w.element.css({ w.element.css({
position: "relative", position: "relative",
display: "inline-block", "vertical-align": "middle"
"vertical-align": "middle",
"*display": "inline",
"*zoom": 1
}); });
w.element.addClass("inline-center-adapt-item");
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
@ -31175,7 +31197,8 @@ BI.InlineVerticalAdaptLayout = BI.inherit(BI.Layout, {
render: function () { render: function () {
BI.InlineVerticalAdaptLayout.superclass.render.apply(this, arguments); BI.InlineVerticalAdaptLayout.superclass.render.apply(this, arguments);
this.element.css({ this.element.css({
whiteSpace: "nowrap" whiteSpace: "nowrap",
textAlign: "left"
}); });
this.populate(this.options.items); this.populate(this.options.items);
}, },
@ -31185,11 +31208,9 @@ BI.InlineVerticalAdaptLayout = BI.inherit(BI.Layout, {
var w = BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this, arguments); var w = BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this, arguments);
w.element.css({ w.element.css({
position: "relative", position: "relative",
display: "inline-block", "vertical-align": "middle"
"vertical-align": "middle",
"*display": "inline",
"*zoom": 1
}); });
w.element.addClass("inline-vertical-adapt-item");
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
@ -35678,17 +35699,17 @@ BI.Pane = BI.inherit(BI.Widget, {
vgap: 2.5, vgap: 2.5,
items: [{ items: [{
type: "bi.layout", type: "bi.layout",
cls: "rect1", cls: "animate-rect rect1",
height: 25, height: 25,
width: 3 width: 3
}, { }, {
type: "bi.layout", type: "bi.layout",
cls: "rect2", cls: "animate-rect rect2",
height: 25, height: 25,
width: 3 width: 3
}, { }, {
type: "bi.layout", type: "bi.layout",
cls: "rect3", cls: "animate-rect rect3",
height: 25, height: 25,
width: 3 width: 3
}] }]
@ -45773,6 +45794,7 @@ BI.Label = BI.inherit(BI.Single, {
} }
] ]
}); });
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
if (o.whiteSpace == "normal") { if (o.whiteSpace == "normal") {
@ -45789,6 +45811,7 @@ BI.Label = BI.inherit(BI.Single, {
element: this, element: this,
items: [this.text] items: [this.text]
}); });
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
if (BI.isNumber(o.height) && o.height > 0) { if (BI.isNumber(o.height) && o.height > 0) {
@ -45824,6 +45847,7 @@ BI.Label = BI.inherit(BI.Single, {
el: (this.text = BI.createWidget(json)) el: (this.text = BI.createWidget(json))
}] }]
}); });
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
if (BI.isNumber(o.textWidth) && o.textWidth > 0) { if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
@ -45844,6 +45868,7 @@ BI.Label = BI.inherit(BI.Single, {
} }
] ]
}); });
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
if (o.whiteSpace == "normal") { if (o.whiteSpace == "normal") {
@ -45860,6 +45885,8 @@ BI.Label = BI.inherit(BI.Single, {
element: this, element: this,
items: [this.text] items: [this.text]
}); });
// 父亲有line-height,而当前label是inline-block,那么他的行高一定是父亲的lineHeight,就算text上设置了line-height
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
if (BI.isNumber(o.height) && o.height > 0) { if (BI.isNumber(o.height) && o.height > 0) {
@ -45918,6 +45945,7 @@ BI.Label = BI.inherit(BI.Single, {
element: this, element: this,
items: [this.text] items: [this.text]
}); });
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
this.text = BI.createWidget(BI.extend(json, { this.text = BI.createWidget(BI.extend(json, {
@ -79566,7 +79594,7 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
extraCls: "bi-year-month-trigger", extraCls: "bi-year-month-trigger",
min: "1900-01-01", // 最小日期 min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期 max: "2099-12-31", // 最大日期
height: 24 height: 22
}, },
beforeInit: function (callback) { beforeInit: function (callback) {
@ -80568,7 +80596,7 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
extraCls: "bi-year-quarter-trigger", extraCls: "bi-year-quarter-trigger",
min: "1900-01-01", // 最小日期 min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期 max: "2099-12-31", // 最大日期
height: 24 height: 22
}, },
_init: function () { _init: function () {
@ -80599,9 +80627,9 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
el: { el: {
type: "bi.text_button", type: "bi.text_button",
text: BI.i18nText("BI-Multi_Date_Quarter"), text: BI.i18nText("BI-Multi_Date_Quarter"),
width: o.height < 24 ? 24 : o.height width: 24
}, },
width: o.height}] width: 24}]
}] }]
}, { }, {
el: { el: {

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

68
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

18
dist/core.css vendored

@ -1937,6 +1937,15 @@ textarea {
vertical-align: middle; vertical-align: middle;
content: ' '; content: ' ';
} }
.bi-inline-center-adapt-layout > .inline-center-adapt-item {
display: inline-block;
}
.bi-inline-center-adapt-layout > .inline-center-adapt-item.x-icon {
display: inline-block !important;
}
.bi-inline-center-adapt-layout > .bi-combo.bi-combo-popup {
display: inline-block !important;
}
.bi-inline-vertical-adapt-layout:after { .bi-inline-vertical-adapt-layout:after {
display: inline-block; display: inline-block;
@ -1945,6 +1954,15 @@ textarea {
vertical-align: middle; vertical-align: middle;
content: ' '; content: ' ';
} }
.bi-inline-vertical-adapt-layout > .inline-vertical-adapt-item {
display: inline-block;
}
.bi-inline-vertical-adapt-layout > .inline-vertical-adapt-item.x-icon {
display: inline-block !important;
}
.bi-inline-vertical-adapt-layout > .bi-combo.bi-combo-popup {
display: inline-block !important;
}
.bi-theme-dark { .bi-theme-dark {
background-color: #191B2B; background-color: #191B2B;
color: #d6e0dc; color: #d6e0dc;

55
dist/core.js vendored

@ -19037,6 +19037,11 @@ _.extend(BI, {
});// 工程配置 });// 工程配置
BI.prepares.push(function () { BI.prepares.push(function () {
// 注册布局 // 注册布局
// adapt类布局优先级规则
// 1、在非IE且支持flex的浏览器下使用flex布局
// 2、IE或者不支持flex的浏览器下使用inline布局
// 3、在2的情况下如果布局的items大于1的话使用display:table的布局
// 4、在3的情况下如果IE版本低于8使用table标签布局
var _isSupprtFlex; var _isSupprtFlex;
var isSupportFlex = function () { var isSupportFlex = function () {
if (_isSupprtFlex == null) { if (_isSupprtFlex == null) {
@ -19045,25 +19050,39 @@ BI.prepares.push(function () {
return _isSupprtFlex; return _isSupprtFlex;
}; };
BI.Plugin.registerWidget("bi.horizontal", function (ob) { BI.Plugin.registerWidget("bi.horizontal", function (ob) {
var isIE = BI.isIE(), supportFlex = isSupportFlex(), isLessIE8 = isIE && BI.getIEVersion() < 8;
// center_adapt // center_adapt
if (ob.verticalAlign === BI.VerticalAlign.Middle && ob.horizontalAlign === BI.HorizontalAlign.Center) { if (ob.verticalAlign === BI.VerticalAlign.Middle && ob.horizontalAlign === BI.HorizontalAlign.Center) {
return ob; if (isLessIE8) {
return ob;
}
return BI.extend(ob, {type: "bi.table_adapt"});
} }
// vertical_adapt // vertical_adapt
if (ob.verticalAlign === BI.VerticalAlign.Middle && ob.horizontalAlign === BI.HorizontalAlign.Left) { if (ob.verticalAlign === BI.VerticalAlign.Middle && ob.horizontalAlign === BI.HorizontalAlign.Left) {
return ob; if (isLessIE8) {
return ob;
}
return BI.extend(ob, {type: "bi.table_adapt"});
} }
// horizontal_adapt // horizontal_adapt
if (ob.verticalAlign === BI.VerticalAlign.Top && ob.horizontalAlign === BI.HorizontalAlign.Center) { if (ob.verticalAlign === BI.VerticalAlign.Top && ob.horizontalAlign === BI.HorizontalAlign.Center) {
return ob; if (isLessIE8) {
return ob;
}
return BI.extend(ob, {type: "bi.table_adapt"});
} }
if (!BI.isIE() && isSupportFlex()) { if(!isIE) {
return BI.extend(ob, {type: "bi.flex_horizontal"}); // if(supportFlex) {
// return BI.extend(ob, {type: "bi.flex_horizontal"});
// }
return BI.extend(ob, {type: "bi.table_adapt"});
} }
return ob; return ob;
}); });
BI.Plugin.registerWidget("bi.center_adapt", function (ob) { BI.Plugin.registerWidget("bi.center_adapt", function (ob) {
if (!BI.isIE() && isSupportFlex() && ob.items && ob.items.length <= 1) { var isIE = BI.isIE(), supportFlex = isSupportFlex(), justOneItem = (ob.items && ob.items.length <= 1);
if (!isIE && supportFlex && justOneItem) {
// 有滚动条的情况下需要用到flex_wrapper_center布局 // 有滚动条的情况下需要用到flex_wrapper_center布局
if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) { if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) {
// 不是IE用flex_wrapper_center布局 // 不是IE用flex_wrapper_center布局
@ -19071,10 +19090,15 @@ BI.prepares.push(function () {
} }
return BI.extend(ob, {type: "bi.flex_center"}); return BI.extend(ob, {type: "bi.flex_center"});
} }
// 一个item的情况下inline布局睥睨天下
if(justOneItem) {
return BI.extend(ob, {type: "bi.inline_center_adapt"});
}
return ob; return ob;
}); });
BI.Plugin.registerWidget("bi.vertical_adapt", function (ob) { BI.Plugin.registerWidget("bi.vertical_adapt", function (ob) {
if (!BI.isIE() && isSupportFlex()) { var isIE = BI.isIE(), supportFlex = isSupportFlex();
if (!isIE && supportFlex) {
// 有滚动条的情况下需要用到flex_wrapper_center布局 // 有滚动条的情况下需要用到flex_wrapper_center布局
if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) { if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) {
// 不是IE用flex_wrapper_center布局 // 不是IE用flex_wrapper_center布局
@ -19082,7 +19106,7 @@ BI.prepares.push(function () {
} }
return BI.extend(ob, {type: "bi.flex_vertical_center"}); return BI.extend(ob, {type: "bi.flex_vertical_center"});
} }
return ob; return BI.extend(ob, {type: "bi.inline_vertical_adapt"});
}); });
BI.Plugin.registerWidget("bi.horizontal_adapt", function (ob) { BI.Plugin.registerWidget("bi.horizontal_adapt", function (ob) {
if (ob.items && ob.items.length <= 1) { if (ob.items && ob.items.length <= 1) {
@ -31099,11 +31123,9 @@ BI.InlineCenterAdaptLayout = BI.inherit(BI.Layout, {
var w = BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this, arguments); var w = BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this, arguments);
w.element.css({ w.element.css({
position: "relative", position: "relative",
display: "inline-block", "vertical-align": "middle"
"vertical-align": "middle",
"*display": "inline",
"*zoom": 1
}); });
w.element.addClass("inline-center-adapt-item");
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
@ -31175,7 +31197,8 @@ BI.InlineVerticalAdaptLayout = BI.inherit(BI.Layout, {
render: function () { render: function () {
BI.InlineVerticalAdaptLayout.superclass.render.apply(this, arguments); BI.InlineVerticalAdaptLayout.superclass.render.apply(this, arguments);
this.element.css({ this.element.css({
whiteSpace: "nowrap" whiteSpace: "nowrap",
textAlign: "left"
}); });
this.populate(this.options.items); this.populate(this.options.items);
}, },
@ -31185,11 +31208,9 @@ BI.InlineVerticalAdaptLayout = BI.inherit(BI.Layout, {
var w = BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this, arguments); var w = BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this, arguments);
w.element.css({ w.element.css({
position: "relative", position: "relative",
display: "inline-block", "vertical-align": "middle"
"vertical-align": "middle",
"*display": "inline",
"*zoom": 1
}); });
w.element.addClass("inline-vertical-adapt-item");
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"

18
dist/core_without_normalize.css vendored

@ -1656,6 +1656,15 @@ textarea {
vertical-align: middle; vertical-align: middle;
content: ' '; content: ' ';
} }
.bi-inline-center-adapt-layout > .inline-center-adapt-item {
display: inline-block;
}
.bi-inline-center-adapt-layout > .inline-center-adapt-item.x-icon {
display: inline-block !important;
}
.bi-inline-center-adapt-layout > .bi-combo.bi-combo-popup {
display: inline-block !important;
}
.bi-inline-vertical-adapt-layout:after { .bi-inline-vertical-adapt-layout:after {
display: inline-block; display: inline-block;
@ -1664,6 +1673,15 @@ textarea {
vertical-align: middle; vertical-align: middle;
content: ' '; content: ' ';
} }
.bi-inline-vertical-adapt-layout > .inline-vertical-adapt-item {
display: inline-block;
}
.bi-inline-vertical-adapt-layout > .inline-vertical-adapt-item.x-icon {
display: inline-block !important;
}
.bi-inline-vertical-adapt-layout > .bi-combo.bi-combo-popup {
display: inline-block !important;
}
.bi-theme-dark { .bi-theme-dark {
background-color: #191B2B; background-color: #191B2B;
color: #d6e0dc; color: #d6e0dc;

47
dist/fineui.css vendored

@ -1937,6 +1937,15 @@ textarea {
vertical-align: middle; vertical-align: middle;
content: ' '; content: ' ';
} }
.bi-inline-center-adapt-layout > .inline-center-adapt-item {
display: inline-block;
}
.bi-inline-center-adapt-layout > .inline-center-adapt-item.x-icon {
display: inline-block !important;
}
.bi-inline-center-adapt-layout > .bi-combo.bi-combo-popup {
display: inline-block !important;
}
.bi-inline-vertical-adapt-layout:after { .bi-inline-vertical-adapt-layout:after {
display: inline-block; display: inline-block;
@ -1945,6 +1954,15 @@ textarea {
vertical-align: middle; vertical-align: middle;
content: ' '; content: ' ';
} }
.bi-inline-vertical-adapt-layout > .inline-vertical-adapt-item {
display: inline-block;
}
.bi-inline-vertical-adapt-layout > .inline-vertical-adapt-item.x-icon {
display: inline-block !important;
}
.bi-inline-vertical-adapt-layout > .bi-combo.bi-combo-popup {
display: inline-block !important;
}
.bi-theme-dark { .bi-theme-dark {
background-color: #191B2B; background-color: #191B2B;
color: #d6e0dc; color: #d6e0dc;
@ -2375,6 +2393,7 @@ textarea {
} }
.bi-bubble-combo .button-combo-triangle-wrapper { .bi-bubble-combo .button-combo-triangle-wrapper {
position: fixed !important; position: fixed !important;
line-height: 0;
z-index: 10000000; z-index: 10000000;
} }
.bi-bubble-combo .bubble-combo-triangle-left { .bi-bubble-combo .bubble-combo-triangle-left {
@ -2382,13 +2401,14 @@ textarea {
position: absolute; position: absolute;
width: 6px; width: 6px;
height: 16px; height: 16px;
text-align: left;
} }
.bi-bubble-combo .bubble-combo-triangle-left:before { .bi-bubble-combo .bubble-combo-triangle-left:before {
position: absolute; position: absolute;
width: 6px; width: 6px;
height: 6px; height: 6px;
margin-left: 2px; margin-left: -3px;
margin-top: -3px; margin-top: 4px;
content: ""; content: "";
transform: rotate(-45deg); transform: rotate(-45deg);
} }
@ -2397,6 +2417,7 @@ textarea {
position: absolute; position: absolute;
width: 6px; width: 6px;
height: 16px; height: 16px;
text-align: left;
} }
.bi-bubble-combo .bubble-combo-triangle-right:before { .bi-bubble-combo .bubble-combo-triangle-right:before {
position: absolute; position: absolute;
@ -2412,12 +2433,13 @@ textarea {
position: absolute; position: absolute;
width: 16px; width: 16px;
height: 6px; height: 6px;
text-align: left;
} }
.bi-bubble-combo .bubble-combo-triangle-top:before { .bi-bubble-combo .bubble-combo-triangle-top:before {
position: absolute; position: absolute;
width: 6px; width: 6px;
height: 6px; height: 6px;
margin-left: 3px; margin-left: 4px;
margin-top: -3px; margin-top: -3px;
content: ""; content: "";
transform: rotate(45deg); transform: rotate(45deg);
@ -2427,12 +2449,13 @@ textarea {
position: absolute; position: absolute;
width: 16px; width: 16px;
height: 6px; height: 6px;
text-align: left;
} }
.bi-bubble-combo .bubble-combo-triangle-bottom:before { .bi-bubble-combo .bubble-combo-triangle-bottom:before {
position: absolute; position: absolute;
width: 6px; width: 6px;
height: 6px; height: 6px;
margin-left: 3px; margin-left: 4px;
margin-top: 2px; margin-top: 2px;
content: ""; content: "";
transform: rotate(-135deg); transform: rotate(-135deg);
@ -2620,7 +2643,7 @@ textarea {
.bi-loading-widget { .bi-loading-widget {
font-size: 0; font-size: 0;
} }
.bi-loading-widget div { .bi-loading-widget .animate-rect {
background-color: rgba(54, 133, 242, 0.9); background-color: rgba(54, 133, 242, 0.9);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#e63685f2,endColorstr=#e63685f2); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#e63685f2,endColorstr=#e63685f2);
-webkit-border-radius: 1.5px; -webkit-border-radius: 1.5px;
@ -2736,7 +2759,7 @@ textarea {
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/wave_loading.gif'); _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/wave_loading.gif');
_background: none; _background: none;
} }
.bi-loading-widget.hack div { .bi-loading-widget.hack .animate-rect {
background-color: rgba(54, 133, 242, 0); background-color: rgba(54, 133, 242, 0);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#003685f2,endColorstr=#003685f2); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#003685f2,endColorstr=#003685f2);
} }
@ -3599,18 +3622,6 @@ ul.ztree.zTreeDragUL {
.bi-trigger .bi-trigger-icon-button { .bi-trigger .bi-trigger-icon-button {
font-size: 16px; font-size: 16px;
} }
.bi-trigger .trigger-up {
display: none;
}
.bi-trigger .trigger-down {
display: block;
}
.bi-combo-popup > .bi-trigger .trigger-up {
display: block;
}
.bi-combo-popup > .bi-trigger .trigger-down {
display: none;
}
.bi-select-text-trigger { .bi-select-text-trigger {
-webkit-border-radius: 2px; -webkit-border-radius: 2px;

76
dist/fineui.ie.js vendored

@ -19279,6 +19279,11 @@ _.extend(BI, {
});// 工程配置 });// 工程配置
BI.prepares.push(function () { BI.prepares.push(function () {
// 注册布局 // 注册布局
// adapt类布局优先级规则
// 1、在非IE且支持flex的浏览器下使用flex布局
// 2、IE或者不支持flex的浏览器下使用inline布局
// 3、在2的情况下如果布局的items大于1的话使用display:table的布局
// 4、在3的情况下如果IE版本低于8使用table标签布局
var _isSupprtFlex; var _isSupprtFlex;
var isSupportFlex = function () { var isSupportFlex = function () {
if (_isSupprtFlex == null) { if (_isSupprtFlex == null) {
@ -19287,25 +19292,39 @@ BI.prepares.push(function () {
return _isSupprtFlex; return _isSupprtFlex;
}; };
BI.Plugin.registerWidget("bi.horizontal", function (ob) { BI.Plugin.registerWidget("bi.horizontal", function (ob) {
var isIE = BI.isIE(), supportFlex = isSupportFlex(), isLessIE8 = isIE && BI.getIEVersion() < 8;
// center_adapt // center_adapt
if (ob.verticalAlign === BI.VerticalAlign.Middle && ob.horizontalAlign === BI.HorizontalAlign.Center) { if (ob.verticalAlign === BI.VerticalAlign.Middle && ob.horizontalAlign === BI.HorizontalAlign.Center) {
return ob; if (isLessIE8) {
return ob;
}
return BI.extend(ob, {type: "bi.table_adapt"});
} }
// vertical_adapt // vertical_adapt
if (ob.verticalAlign === BI.VerticalAlign.Middle && ob.horizontalAlign === BI.HorizontalAlign.Left) { if (ob.verticalAlign === BI.VerticalAlign.Middle && ob.horizontalAlign === BI.HorizontalAlign.Left) {
return ob; if (isLessIE8) {
return ob;
}
return BI.extend(ob, {type: "bi.table_adapt"});
} }
// horizontal_adapt // horizontal_adapt
if (ob.verticalAlign === BI.VerticalAlign.Top && ob.horizontalAlign === BI.HorizontalAlign.Center) { if (ob.verticalAlign === BI.VerticalAlign.Top && ob.horizontalAlign === BI.HorizontalAlign.Center) {
return ob; if (isLessIE8) {
return ob;
}
return BI.extend(ob, {type: "bi.table_adapt"});
} }
if (!BI.isIE() && isSupportFlex()) { if(!isIE) {
return BI.extend(ob, {type: "bi.flex_horizontal"}); // if(supportFlex) {
// return BI.extend(ob, {type: "bi.flex_horizontal"});
// }
return BI.extend(ob, {type: "bi.table_adapt"});
} }
return ob; return ob;
}); });
BI.Plugin.registerWidget("bi.center_adapt", function (ob) { BI.Plugin.registerWidget("bi.center_adapt", function (ob) {
if (!BI.isIE() && isSupportFlex() && ob.items && ob.items.length <= 1) { var isIE = BI.isIE(), supportFlex = isSupportFlex(), justOneItem = (ob.items && ob.items.length <= 1);
if (!isIE && supportFlex && justOneItem) {
// 有滚动条的情况下需要用到flex_wrapper_center布局 // 有滚动条的情况下需要用到flex_wrapper_center布局
if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) { if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) {
// 不是IE用flex_wrapper_center布局 // 不是IE用flex_wrapper_center布局
@ -19313,10 +19332,15 @@ BI.prepares.push(function () {
} }
return BI.extend(ob, {type: "bi.flex_center"}); return BI.extend(ob, {type: "bi.flex_center"});
} }
// 一个item的情况下inline布局睥睨天下
if(justOneItem) {
return BI.extend(ob, {type: "bi.inline_center_adapt"});
}
return ob; return ob;
}); });
BI.Plugin.registerWidget("bi.vertical_adapt", function (ob) { BI.Plugin.registerWidget("bi.vertical_adapt", function (ob) {
if (!BI.isIE() && isSupportFlex()) { var isIE = BI.isIE(), supportFlex = isSupportFlex();
if (!isIE && supportFlex) {
// 有滚动条的情况下需要用到flex_wrapper_center布局 // 有滚动条的情况下需要用到flex_wrapper_center布局
if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) { if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) {
// 不是IE用flex_wrapper_center布局 // 不是IE用flex_wrapper_center布局
@ -19324,7 +19348,7 @@ BI.prepares.push(function () {
} }
return BI.extend(ob, {type: "bi.flex_vertical_center"}); return BI.extend(ob, {type: "bi.flex_vertical_center"});
} }
return ob; return BI.extend(ob, {type: "bi.inline_vertical_adapt"});
}); });
BI.Plugin.registerWidget("bi.horizontal_adapt", function (ob) { BI.Plugin.registerWidget("bi.horizontal_adapt", function (ob) {
if (ob.items && ob.items.length <= 1) { if (ob.items && ob.items.length <= 1) {
@ -31341,11 +31365,9 @@ BI.InlineCenterAdaptLayout = BI.inherit(BI.Layout, {
var w = BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this, arguments); var w = BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this, arguments);
w.element.css({ w.element.css({
position: "relative", position: "relative",
display: "inline-block", "vertical-align": "middle"
"vertical-align": "middle",
"*display": "inline",
"*zoom": 1
}); });
w.element.addClass("inline-center-adapt-item");
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
@ -31417,7 +31439,8 @@ BI.InlineVerticalAdaptLayout = BI.inherit(BI.Layout, {
render: function () { render: function () {
BI.InlineVerticalAdaptLayout.superclass.render.apply(this, arguments); BI.InlineVerticalAdaptLayout.superclass.render.apply(this, arguments);
this.element.css({ this.element.css({
whiteSpace: "nowrap" whiteSpace: "nowrap",
textAlign: "left"
}); });
this.populate(this.options.items); this.populate(this.options.items);
}, },
@ -31427,11 +31450,9 @@ BI.InlineVerticalAdaptLayout = BI.inherit(BI.Layout, {
var w = BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this, arguments); var w = BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this, arguments);
w.element.css({ w.element.css({
position: "relative", position: "relative",
display: "inline-block", "vertical-align": "middle"
"vertical-align": "middle",
"*display": "inline",
"*zoom": 1
}); });
w.element.addClass("inline-vertical-adapt-item");
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
@ -35516,17 +35537,17 @@ BI.Pane = BI.inherit(BI.Widget, {
vgap: 2.5, vgap: 2.5,
items: [{ items: [{
type: "bi.layout", type: "bi.layout",
cls: "rect1", cls: "animate-rect rect1",
height: 25, height: 25,
width: 3 width: 3
}, { }, {
type: "bi.layout", type: "bi.layout",
cls: "rect2", cls: "animate-rect rect2",
height: 25, height: 25,
width: 3 width: 3
}, { }, {
type: "bi.layout", type: "bi.layout",
cls: "rect3", cls: "animate-rect rect3",
height: 25, height: 25,
width: 3 width: 3
}] }]
@ -45611,6 +45632,7 @@ BI.Label = BI.inherit(BI.Single, {
} }
] ]
}); });
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
if (o.whiteSpace == "normal") { if (o.whiteSpace == "normal") {
@ -45627,6 +45649,7 @@ BI.Label = BI.inherit(BI.Single, {
element: this, element: this,
items: [this.text] items: [this.text]
}); });
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
if (BI.isNumber(o.height) && o.height > 0) { if (BI.isNumber(o.height) && o.height > 0) {
@ -45662,6 +45685,7 @@ BI.Label = BI.inherit(BI.Single, {
el: (this.text = BI.createWidget(json)) el: (this.text = BI.createWidget(json))
}] }]
}); });
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
if (BI.isNumber(o.textWidth) && o.textWidth > 0) { if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
@ -45682,6 +45706,7 @@ BI.Label = BI.inherit(BI.Single, {
} }
] ]
}); });
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
if (o.whiteSpace == "normal") { if (o.whiteSpace == "normal") {
@ -45698,6 +45723,8 @@ BI.Label = BI.inherit(BI.Single, {
element: this, element: this,
items: [this.text] items: [this.text]
}); });
// 父亲有line-height,而当前label是inline-block,那么他的行高一定是父亲的lineHeight,就算text上设置了line-height
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
if (BI.isNumber(o.height) && o.height > 0) { if (BI.isNumber(o.height) && o.height > 0) {
@ -45756,6 +45783,7 @@ BI.Label = BI.inherit(BI.Single, {
element: this, element: this,
items: [this.text] items: [this.text]
}); });
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
this.text = BI.createWidget(BI.extend(json, { this.text = BI.createWidget(BI.extend(json, {
@ -79404,7 +79432,7 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
extraCls: "bi-year-month-trigger", extraCls: "bi-year-month-trigger",
min: "1900-01-01", // 最小日期 min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期 max: "2099-12-31", // 最大日期
height: 24 height: 22
}, },
beforeInit: function (callback) { beforeInit: function (callback) {
@ -80406,7 +80434,7 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
extraCls: "bi-year-quarter-trigger", extraCls: "bi-year-quarter-trigger",
min: "1900-01-01", // 最小日期 min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期 max: "2099-12-31", // 最大日期
height: 24 height: 22
}, },
_init: function () { _init: function () {
@ -80437,9 +80465,9 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
el: { el: {
type: "bi.text_button", type: "bi.text_button",
text: BI.i18nText("BI-Multi_Date_Quarter"), text: BI.i18nText("BI-Multi_Date_Quarter"),
width: o.height < 24 ? 24 : o.height width: 24
}, },
width: o.height}] width: 24}]
}] }]
}, { }, {
el: { el: {

68
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

76
dist/fineui.js vendored

@ -19279,6 +19279,11 @@ _.extend(BI, {
});// 工程配置 });// 工程配置
BI.prepares.push(function () { BI.prepares.push(function () {
// 注册布局 // 注册布局
// adapt类布局优先级规则
// 1、在非IE且支持flex的浏览器下使用flex布局
// 2、IE或者不支持flex的浏览器下使用inline布局
// 3、在2的情况下如果布局的items大于1的话使用display:table的布局
// 4、在3的情况下如果IE版本低于8使用table标签布局
var _isSupprtFlex; var _isSupprtFlex;
var isSupportFlex = function () { var isSupportFlex = function () {
if (_isSupprtFlex == null) { if (_isSupprtFlex == null) {
@ -19287,25 +19292,39 @@ BI.prepares.push(function () {
return _isSupprtFlex; return _isSupprtFlex;
}; };
BI.Plugin.registerWidget("bi.horizontal", function (ob) { BI.Plugin.registerWidget("bi.horizontal", function (ob) {
var isIE = BI.isIE(), supportFlex = isSupportFlex(), isLessIE8 = isIE && BI.getIEVersion() < 8;
// center_adapt // center_adapt
if (ob.verticalAlign === BI.VerticalAlign.Middle && ob.horizontalAlign === BI.HorizontalAlign.Center) { if (ob.verticalAlign === BI.VerticalAlign.Middle && ob.horizontalAlign === BI.HorizontalAlign.Center) {
return ob; if (isLessIE8) {
return ob;
}
return BI.extend(ob, {type: "bi.table_adapt"});
} }
// vertical_adapt // vertical_adapt
if (ob.verticalAlign === BI.VerticalAlign.Middle && ob.horizontalAlign === BI.HorizontalAlign.Left) { if (ob.verticalAlign === BI.VerticalAlign.Middle && ob.horizontalAlign === BI.HorizontalAlign.Left) {
return ob; if (isLessIE8) {
return ob;
}
return BI.extend(ob, {type: "bi.table_adapt"});
} }
// horizontal_adapt // horizontal_adapt
if (ob.verticalAlign === BI.VerticalAlign.Top && ob.horizontalAlign === BI.HorizontalAlign.Center) { if (ob.verticalAlign === BI.VerticalAlign.Top && ob.horizontalAlign === BI.HorizontalAlign.Center) {
return ob; if (isLessIE8) {
return ob;
}
return BI.extend(ob, {type: "bi.table_adapt"});
} }
if (!BI.isIE() && isSupportFlex()) { if(!isIE) {
return BI.extend(ob, {type: "bi.flex_horizontal"}); // if(supportFlex) {
// return BI.extend(ob, {type: "bi.flex_horizontal"});
// }
return BI.extend(ob, {type: "bi.table_adapt"});
} }
return ob; return ob;
}); });
BI.Plugin.registerWidget("bi.center_adapt", function (ob) { BI.Plugin.registerWidget("bi.center_adapt", function (ob) {
if (!BI.isIE() && isSupportFlex() && ob.items && ob.items.length <= 1) { var isIE = BI.isIE(), supportFlex = isSupportFlex(), justOneItem = (ob.items && ob.items.length <= 1);
if (!isIE && supportFlex && justOneItem) {
// 有滚动条的情况下需要用到flex_wrapper_center布局 // 有滚动条的情况下需要用到flex_wrapper_center布局
if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) { if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) {
// 不是IE用flex_wrapper_center布局 // 不是IE用flex_wrapper_center布局
@ -19313,10 +19332,15 @@ BI.prepares.push(function () {
} }
return BI.extend(ob, {type: "bi.flex_center"}); return BI.extend(ob, {type: "bi.flex_center"});
} }
// 一个item的情况下inline布局睥睨天下
if(justOneItem) {
return BI.extend(ob, {type: "bi.inline_center_adapt"});
}
return ob; return ob;
}); });
BI.Plugin.registerWidget("bi.vertical_adapt", function (ob) { BI.Plugin.registerWidget("bi.vertical_adapt", function (ob) {
if (!BI.isIE() && isSupportFlex()) { var isIE = BI.isIE(), supportFlex = isSupportFlex();
if (!isIE && supportFlex) {
// 有滚动条的情况下需要用到flex_wrapper_center布局 // 有滚动条的情况下需要用到flex_wrapper_center布局
if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) { if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) {
// 不是IE用flex_wrapper_center布局 // 不是IE用flex_wrapper_center布局
@ -19324,7 +19348,7 @@ BI.prepares.push(function () {
} }
return BI.extend(ob, {type: "bi.flex_vertical_center"}); return BI.extend(ob, {type: "bi.flex_vertical_center"});
} }
return ob; return BI.extend(ob, {type: "bi.inline_vertical_adapt"});
}); });
BI.Plugin.registerWidget("bi.horizontal_adapt", function (ob) { BI.Plugin.registerWidget("bi.horizontal_adapt", function (ob) {
if (ob.items && ob.items.length <= 1) { if (ob.items && ob.items.length <= 1) {
@ -31341,11 +31365,9 @@ BI.InlineCenterAdaptLayout = BI.inherit(BI.Layout, {
var w = BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this, arguments); var w = BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this, arguments);
w.element.css({ w.element.css({
position: "relative", position: "relative",
display: "inline-block", "vertical-align": "middle"
"vertical-align": "middle",
"*display": "inline",
"*zoom": 1
}); });
w.element.addClass("inline-center-adapt-item");
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
@ -31417,7 +31439,8 @@ BI.InlineVerticalAdaptLayout = BI.inherit(BI.Layout, {
render: function () { render: function () {
BI.InlineVerticalAdaptLayout.superclass.render.apply(this, arguments); BI.InlineVerticalAdaptLayout.superclass.render.apply(this, arguments);
this.element.css({ this.element.css({
whiteSpace: "nowrap" whiteSpace: "nowrap",
textAlign: "left"
}); });
this.populate(this.options.items); this.populate(this.options.items);
}, },
@ -31427,11 +31450,9 @@ BI.InlineVerticalAdaptLayout = BI.inherit(BI.Layout, {
var w = BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this, arguments); var w = BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this, arguments);
w.element.css({ w.element.css({
position: "relative", position: "relative",
display: "inline-block", "vertical-align": "middle"
"vertical-align": "middle",
"*display": "inline",
"*zoom": 1
}); });
w.element.addClass("inline-vertical-adapt-item");
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
@ -35920,17 +35941,17 @@ BI.Pane = BI.inherit(BI.Widget, {
vgap: 2.5, vgap: 2.5,
items: [{ items: [{
type: "bi.layout", type: "bi.layout",
cls: "rect1", cls: "animate-rect rect1",
height: 25, height: 25,
width: 3 width: 3
}, { }, {
type: "bi.layout", type: "bi.layout",
cls: "rect2", cls: "animate-rect rect2",
height: 25, height: 25,
width: 3 width: 3
}, { }, {
type: "bi.layout", type: "bi.layout",
cls: "rect3", cls: "animate-rect rect3",
height: 25, height: 25,
width: 3 width: 3
}] }]
@ -46015,6 +46036,7 @@ BI.Label = BI.inherit(BI.Single, {
} }
] ]
}); });
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
if (o.whiteSpace == "normal") { if (o.whiteSpace == "normal") {
@ -46031,6 +46053,7 @@ BI.Label = BI.inherit(BI.Single, {
element: this, element: this,
items: [this.text] items: [this.text]
}); });
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
if (BI.isNumber(o.height) && o.height > 0) { if (BI.isNumber(o.height) && o.height > 0) {
@ -46066,6 +46089,7 @@ BI.Label = BI.inherit(BI.Single, {
el: (this.text = BI.createWidget(json)) el: (this.text = BI.createWidget(json))
}] }]
}); });
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
if (BI.isNumber(o.textWidth) && o.textWidth > 0) { if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
@ -46086,6 +46110,7 @@ BI.Label = BI.inherit(BI.Single, {
} }
] ]
}); });
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
if (o.whiteSpace == "normal") { if (o.whiteSpace == "normal") {
@ -46102,6 +46127,8 @@ BI.Label = BI.inherit(BI.Single, {
element: this, element: this,
items: [this.text] items: [this.text]
}); });
// 父亲有line-height,而当前label是inline-block,那么他的行高一定是父亲的lineHeight,就算text上设置了line-height
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
if (BI.isNumber(o.height) && o.height > 0) { if (BI.isNumber(o.height) && o.height > 0) {
@ -46160,6 +46187,7 @@ BI.Label = BI.inherit(BI.Single, {
element: this, element: this,
items: [this.text] items: [this.text]
}); });
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
this.text = BI.createWidget(BI.extend(json, { this.text = BI.createWidget(BI.extend(json, {
@ -79808,7 +79836,7 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
extraCls: "bi-year-month-trigger", extraCls: "bi-year-month-trigger",
min: "1900-01-01", // 最小日期 min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期 max: "2099-12-31", // 最大日期
height: 24 height: 22
}, },
beforeInit: function (callback) { beforeInit: function (callback) {
@ -80810,7 +80838,7 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
extraCls: "bi-year-quarter-trigger", extraCls: "bi-year-quarter-trigger",
min: "1900-01-01", // 最小日期 min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期 max: "2099-12-31", // 最大日期
height: 24 height: 22
}, },
_init: function () { _init: function () {
@ -80841,9 +80869,9 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
el: { el: {
type: "bi.text_button", type: "bi.text_button",
text: BI.i18nText("BI-Multi_Date_Quarter"), text: BI.i18nText("BI-Multi_Date_Quarter"),
width: o.height < 24 ? 24 : o.height width: 24
}, },
width: o.height}] width: 24}]
}] }]
}, { }, {
el: { el: {

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

68
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

36
dist/fineui_without_jquery_polyfill.js vendored

@ -20092,11 +20092,9 @@ BI.InlineCenterAdaptLayout = BI.inherit(BI.Layout, {
var w = BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this, arguments); var w = BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this, arguments);
w.element.css({ w.element.css({
position: "relative", position: "relative",
display: "inline-block", "vertical-align": "middle"
"vertical-align": "middle",
"*display": "inline",
"*zoom": 1
}); });
w.element.addClass("inline-center-adapt-item");
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
@ -20168,7 +20166,8 @@ BI.InlineVerticalAdaptLayout = BI.inherit(BI.Layout, {
render: function () { render: function () {
BI.InlineVerticalAdaptLayout.superclass.render.apply(this, arguments); BI.InlineVerticalAdaptLayout.superclass.render.apply(this, arguments);
this.element.css({ this.element.css({
whiteSpace: "nowrap" whiteSpace: "nowrap",
textAlign: "left"
}); });
this.populate(this.options.items); this.populate(this.options.items);
}, },
@ -20178,11 +20177,9 @@ BI.InlineVerticalAdaptLayout = BI.inherit(BI.Layout, {
var w = BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this, arguments); var w = BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this, arguments);
w.element.css({ w.element.css({
position: "relative", position: "relative",
display: "inline-block", "vertical-align": "middle"
"vertical-align": "middle",
"*display": "inline",
"*zoom": 1
}); });
w.element.addClass("inline-vertical-adapt-item");
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
@ -24470,17 +24467,17 @@ BI.Pane = BI.inherit(BI.Widget, {
vgap: 2.5, vgap: 2.5,
items: [{ items: [{
type: "bi.layout", type: "bi.layout",
cls: "rect1", cls: "animate-rect rect1",
height: 25, height: 25,
width: 3 width: 3
}, { }, {
type: "bi.layout", type: "bi.layout",
cls: "rect2", cls: "animate-rect rect2",
height: 25, height: 25,
width: 3 width: 3
}, { }, {
type: "bi.layout", type: "bi.layout",
cls: "rect3", cls: "animate-rect rect3",
height: 25, height: 25,
width: 3 width: 3
}] }]
@ -33045,6 +33042,7 @@ BI.Label = BI.inherit(BI.Single, {
} }
] ]
}); });
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
if (o.whiteSpace == "normal") { if (o.whiteSpace == "normal") {
@ -33061,6 +33059,7 @@ BI.Label = BI.inherit(BI.Single, {
element: this, element: this,
items: [this.text] items: [this.text]
}); });
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
if (BI.isNumber(o.height) && o.height > 0) { if (BI.isNumber(o.height) && o.height > 0) {
@ -33096,6 +33095,7 @@ BI.Label = BI.inherit(BI.Single, {
el: (this.text = BI.createWidget(json)) el: (this.text = BI.createWidget(json))
}] }]
}); });
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
if (BI.isNumber(o.textWidth) && o.textWidth > 0) { if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
@ -33116,6 +33116,7 @@ BI.Label = BI.inherit(BI.Single, {
} }
] ]
}); });
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
if (o.whiteSpace == "normal") { if (o.whiteSpace == "normal") {
@ -33132,6 +33133,8 @@ BI.Label = BI.inherit(BI.Single, {
element: this, element: this,
items: [this.text] items: [this.text]
}); });
// 父亲有line-height,而当前label是inline-block,那么他的行高一定是父亲的lineHeight,就算text上设置了line-height
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
if (BI.isNumber(o.height) && o.height > 0) { if (BI.isNumber(o.height) && o.height > 0) {
@ -33190,6 +33193,7 @@ BI.Label = BI.inherit(BI.Single, {
element: this, element: this,
items: [this.text] items: [this.text]
}); });
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
this.text = BI.createWidget(BI.extend(json, { this.text = BI.createWidget(BI.extend(json, {
@ -62669,7 +62673,7 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
extraCls: "bi-year-month-trigger", extraCls: "bi-year-month-trigger",
min: "1900-01-01", // 最小日期 min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期 max: "2099-12-31", // 最大日期
height: 24 height: 22
}, },
beforeInit: function (callback) { beforeInit: function (callback) {
@ -63671,7 +63675,7 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
extraCls: "bi-year-quarter-trigger", extraCls: "bi-year-quarter-trigger",
min: "1900-01-01", // 最小日期 min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期 max: "2099-12-31", // 最大日期
height: 24 height: 22
}, },
_init: function () { _init: function () {
@ -63702,9 +63706,9 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
el: { el: {
type: "bi.text_button", type: "bi.text_button",
text: BI.i18nText("BI-Multi_Date_Quarter"), text: BI.i18nText("BI-Multi_Date_Quarter"),
width: o.height < 24 ? 24 : o.height width: 24
}, },
width: o.height}] width: 24}]
}] }]
}, { }, {
el: { el: {

2
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

8
dist/widget.js vendored

@ -20946,7 +20946,7 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
extraCls: "bi-year-month-trigger", extraCls: "bi-year-month-trigger",
min: "1900-01-01", // 最小日期 min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期 max: "2099-12-31", // 最大日期
height: 24 height: 22
}, },
beforeInit: function (callback) { beforeInit: function (callback) {
@ -21948,7 +21948,7 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
extraCls: "bi-year-quarter-trigger", extraCls: "bi-year-quarter-trigger",
min: "1900-01-01", // 最小日期 min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期 max: "2099-12-31", // 最大日期
height: 24 height: 22
}, },
_init: function () { _init: function () {
@ -21979,9 +21979,9 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
el: { el: {
type: "bi.text_button", type: "bi.text_button",
text: BI.i18nText("BI-Multi_Date_Quarter"), text: BI.i18nText("BI-Multi_Date_Quarter"),
width: o.height < 24 ? 24 : o.height width: 24
}, },
width: o.height}] width: 24}]
}] }]
}, { }, {
el: { el: {

6
src/base/pane.js

@ -59,17 +59,17 @@ BI.Pane = BI.inherit(BI.Widget, {
vgap: 2.5, vgap: 2.5,
items: [{ items: [{
type: "bi.layout", type: "bi.layout",
cls: "rect1", cls: "animate-rect rect1",
height: 25, height: 25,
width: 3 width: 3
}, { }, {
type: "bi.layout", type: "bi.layout",
cls: "rect2", cls: "animate-rect rect2",
height: 25, height: 25,
width: 3 width: 3
}, { }, {
type: "bi.layout", type: "bi.layout",
cls: "rect3", cls: "animate-rect rect3",
height: 25, height: 25,
width: 3 width: 3
}] }]

7
src/base/single/label/label.js

@ -270,6 +270,7 @@ BI.Label = BI.inherit(BI.Single, {
} }
] ]
}); });
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
if (o.whiteSpace == "normal") { if (o.whiteSpace == "normal") {
@ -286,6 +287,7 @@ BI.Label = BI.inherit(BI.Single, {
element: this, element: this,
items: [this.text] items: [this.text]
}); });
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
if (BI.isNumber(o.height) && o.height > 0) { if (BI.isNumber(o.height) && o.height > 0) {
@ -321,6 +323,7 @@ BI.Label = BI.inherit(BI.Single, {
el: (this.text = BI.createWidget(json)) el: (this.text = BI.createWidget(json))
}] }]
}); });
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
if (BI.isNumber(o.textWidth) && o.textWidth > 0) { if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
@ -341,6 +344,7 @@ BI.Label = BI.inherit(BI.Single, {
} }
] ]
}); });
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
if (o.whiteSpace == "normal") { if (o.whiteSpace == "normal") {
@ -357,6 +361,8 @@ BI.Label = BI.inherit(BI.Single, {
element: this, element: this,
items: [this.text] items: [this.text]
}); });
// 父亲有line-height,而当前label是inline-block,那么他的行高一定是父亲的lineHeight,就算text上设置了line-height
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
if (BI.isNumber(o.height) && o.height > 0) { if (BI.isNumber(o.height) && o.height > 0) {
@ -415,6 +421,7 @@ BI.Label = BI.inherit(BI.Single, {
element: this, element: this,
items: [this.text] items: [this.text]
}); });
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return; return;
} }
this.text = BI.createWidget(BI.extend(json, { this.text = BI.createWidget(BI.extend(json, {

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

@ -1,6 +1,11 @@
// 工程配置 // 工程配置
BI.prepares.push(function () { BI.prepares.push(function () {
// 注册布局 // 注册布局
// adapt类布局优先级规则
// 1、在非IE且支持flex的浏览器下使用flex布局
// 2、IE或者不支持flex的浏览器下使用inline布局
// 3、在2的情况下如果布局的items大于1的话使用display:table的布局
// 4、在3的情况下如果IE版本低于8使用table标签布局
var _isSupprtFlex; var _isSupprtFlex;
var isSupportFlex = function () { var isSupportFlex = function () {
if (_isSupprtFlex == null) { if (_isSupprtFlex == null) {
@ -9,25 +14,39 @@ BI.prepares.push(function () {
return _isSupprtFlex; return _isSupprtFlex;
}; };
BI.Plugin.registerWidget("bi.horizontal", function (ob) { BI.Plugin.registerWidget("bi.horizontal", function (ob) {
var isIE = BI.isIE(), supportFlex = isSupportFlex(), isLessIE8 = isIE && BI.getIEVersion() < 8;
// center_adapt // center_adapt
if (ob.verticalAlign === BI.VerticalAlign.Middle && ob.horizontalAlign === BI.HorizontalAlign.Center) { if (ob.verticalAlign === BI.VerticalAlign.Middle && ob.horizontalAlign === BI.HorizontalAlign.Center) {
return ob; if (isLessIE8) {
return ob;
}
return BI.extend(ob, {type: "bi.table_adapt"});
} }
// vertical_adapt // vertical_adapt
if (ob.verticalAlign === BI.VerticalAlign.Middle && ob.horizontalAlign === BI.HorizontalAlign.Left) { if (ob.verticalAlign === BI.VerticalAlign.Middle && ob.horizontalAlign === BI.HorizontalAlign.Left) {
return ob; if (isLessIE8) {
return ob;
}
return BI.extend(ob, {type: "bi.table_adapt"});
} }
// horizontal_adapt // horizontal_adapt
if (ob.verticalAlign === BI.VerticalAlign.Top && ob.horizontalAlign === BI.HorizontalAlign.Center) { if (ob.verticalAlign === BI.VerticalAlign.Top && ob.horizontalAlign === BI.HorizontalAlign.Center) {
return ob; if (isLessIE8) {
return ob;
}
return BI.extend(ob, {type: "bi.table_adapt"});
} }
if (!BI.isIE() && isSupportFlex()) { if(!isIE) {
return BI.extend(ob, {type: "bi.flex_horizontal"}); // if(supportFlex) {
// return BI.extend(ob, {type: "bi.flex_horizontal"});
// }
return BI.extend(ob, {type: "bi.table_adapt"});
} }
return ob; return ob;
}); });
BI.Plugin.registerWidget("bi.center_adapt", function (ob) { BI.Plugin.registerWidget("bi.center_adapt", function (ob) {
if (!BI.isIE() && isSupportFlex() && ob.items && ob.items.length <= 1) { var isIE = BI.isIE(), supportFlex = isSupportFlex(), justOneItem = (ob.items && ob.items.length <= 1);
if (!isIE && supportFlex && justOneItem) {
// 有滚动条的情况下需要用到flex_wrapper_center布局 // 有滚动条的情况下需要用到flex_wrapper_center布局
if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) { if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) {
// 不是IE用flex_wrapper_center布局 // 不是IE用flex_wrapper_center布局
@ -35,10 +54,15 @@ BI.prepares.push(function () {
} }
return BI.extend(ob, {type: "bi.flex_center"}); return BI.extend(ob, {type: "bi.flex_center"});
} }
// 一个item的情况下inline布局睥睨天下
if(justOneItem) {
return BI.extend(ob, {type: "bi.inline_center_adapt"});
}
return ob; return ob;
}); });
BI.Plugin.registerWidget("bi.vertical_adapt", function (ob) { BI.Plugin.registerWidget("bi.vertical_adapt", function (ob) {
if (!BI.isIE() && isSupportFlex()) { var isIE = BI.isIE(), supportFlex = isSupportFlex();
if (!isIE && supportFlex) {
// 有滚动条的情况下需要用到flex_wrapper_center布局 // 有滚动条的情况下需要用到flex_wrapper_center布局
if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) { if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) {
// 不是IE用flex_wrapper_center布局 // 不是IE用flex_wrapper_center布局
@ -46,7 +70,7 @@ BI.prepares.push(function () {
} }
return BI.extend(ob, {type: "bi.flex_vertical_center"}); return BI.extend(ob, {type: "bi.flex_vertical_center"});
} }
return ob; return BI.extend(ob, {type: "bi.inline_vertical_adapt"});
}); });
BI.Plugin.registerWidget("bi.horizontal_adapt", function (ob) { BI.Plugin.registerWidget("bi.horizontal_adapt", function (ob) {
if (ob.items && ob.items.length <= 1) { if (ob.items && ob.items.length <= 1) {

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

@ -0,0 +1,101 @@
/**
* 使用display:table和display:table-cell实现的horizontal布局
* @class BI.TableAdaptLayout
* @extends BI.Layout
*/
BI.TableAdaptLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.TableAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-table-center-adapt-layout",
columnSize: [],
verticalAlign: BI.VerticalAlign.Top,
horizontalAlign: BI.HorizontalAlign.Left,
hgap: 0,
vgap: 0,
lgap: 0,
rgap: 0,
tgap: 0,
bgap: 0
});
},
render: function () {
var o = this.options;
BI.TableAdaptLayout.superclass.render.apply(this, arguments);
this.$table = BI.Widget._renderEngine.createElement("<div>").css({
position: "relative",
display: "table",
height: o.verticalAlign === BI.VerticalAlign.Middle ? "100%" : "auto",
width: o.horizontalAlign === BI.HorizontalAlign.Center ? "100%" : "auto",
"white-space": "nowrap"
});
this.populate(this.options.items);
},
_addElement: function (i, item) {
var o = this.options;
var td;
var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i];
if (!this.hasWidget(this._getChildName(i))) {
var w = BI.createWidget(item);
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});
td = BI.createWidget({
type: "bi.default",
width: width,
items: [w]
});
this.addWidget(this._getChildName(i), td);
} else {
td = this.getWidgetByName(this._getChildName(i));
td.element.width(width);
}
td.element.css({"max-width": o.columnSize[i] + "px"});
if (i === 0) {
td.element.addClass("first-element");
}
td.element.css({
position: "relative",
display: "table-cell",
"vertical-align": "middle",
margin: "0",
padding: "0",
height: "100%"
});
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) + "px"
});
}
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) + "px"
});
}
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) + "px"
});
}
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) + "px"
});
}
return td;
},
appendFragment: function (frag) {
this.$table.append(frag);
this.element.append(this.$table);
},
resize: function () {
// console.log("center_adapt布局不需要resize");
},
populate: function (items) {
BI.TableAdaptLayout.superclass.populate.apply(this, arguments);
this._mount();
}
});
BI.shortcut("bi.table_adapt", BI.TableAdaptLayout);

6
src/core/wrapper/layout/adapt/inline.center.js

@ -35,11 +35,9 @@ BI.InlineCenterAdaptLayout = BI.inherit(BI.Layout, {
var w = BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this, arguments); var w = BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this, arguments);
w.element.css({ w.element.css({
position: "relative", position: "relative",
display: "inline-block", "vertical-align": "middle"
"vertical-align": "middle",
"*display": "inline",
"*zoom": 1
}); });
w.element.addClass("inline-center-adapt-item");
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"

9
src/core/wrapper/layout/adapt/inline.vertical.js

@ -24,7 +24,8 @@ BI.InlineVerticalAdaptLayout = BI.inherit(BI.Layout, {
render: function () { render: function () {
BI.InlineVerticalAdaptLayout.superclass.render.apply(this, arguments); BI.InlineVerticalAdaptLayout.superclass.render.apply(this, arguments);
this.element.css({ this.element.css({
whiteSpace: "nowrap" whiteSpace: "nowrap",
textAlign: "left"
}); });
this.populate(this.options.items); this.populate(this.options.items);
}, },
@ -34,11 +35,9 @@ BI.InlineVerticalAdaptLayout = BI.inherit(BI.Layout, {
var w = BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this, arguments); var w = BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this, arguments);
w.element.css({ w.element.css({
position: "relative", position: "relative",
display: "inline-block", "vertical-align": "middle"
"vertical-align": "middle",
"*display": "inline",
"*zoom": 1
}); });
w.element.addClass("inline-vertical-adapt-item");
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"

13
src/css/base/combo/combo.css

@ -1,5 +1,6 @@
.bi-bubble-combo .button-combo-triangle-wrapper { .bi-bubble-combo .button-combo-triangle-wrapper {
position: fixed !important; position: fixed !important;
line-height: 0;
z-index: 10000000; z-index: 10000000;
} }
.bi-bubble-combo .bubble-combo-triangle-left { .bi-bubble-combo .bubble-combo-triangle-left {
@ -7,13 +8,14 @@
position: absolute; position: absolute;
width: 6px; width: 6px;
height: 16px; height: 16px;
text-align: left;
} }
.bi-bubble-combo .bubble-combo-triangle-left:before { .bi-bubble-combo .bubble-combo-triangle-left:before {
position: absolute; position: absolute;
width: 6px; width: 6px;
height: 6px; height: 6px;
margin-left: 2px; margin-left: -3px;
margin-top: -3px; margin-top: 4px;
content: ""; content: "";
transform: rotate(-45deg); transform: rotate(-45deg);
} }
@ -22,6 +24,7 @@
position: absolute; position: absolute;
width: 6px; width: 6px;
height: 16px; height: 16px;
text-align: left;
} }
.bi-bubble-combo .bubble-combo-triangle-right:before { .bi-bubble-combo .bubble-combo-triangle-right:before {
position: absolute; position: absolute;
@ -37,12 +40,13 @@
position: absolute; position: absolute;
width: 16px; width: 16px;
height: 6px; height: 6px;
text-align: left;
} }
.bi-bubble-combo .bubble-combo-triangle-top:before { .bi-bubble-combo .bubble-combo-triangle-top:before {
position: absolute; position: absolute;
width: 6px; width: 6px;
height: 6px; height: 6px;
margin-left: 3px; margin-left: 4px;
margin-top: -3px; margin-top: -3px;
content: ""; content: "";
transform: rotate(45deg); transform: rotate(45deg);
@ -52,12 +56,13 @@
position: absolute; position: absolute;
width: 16px; width: 16px;
height: 6px; height: 6px;
text-align: left;
} }
.bi-bubble-combo .bubble-combo-triangle-bottom:before { .bi-bubble-combo .bubble-combo-triangle-bottom:before {
position: absolute; position: absolute;
width: 6px; width: 6px;
height: 6px; height: 6px;
margin-left: 3px; margin-left: 4px;
margin-top: 2px; margin-top: 2px;
content: ""; content: "";
transform: rotate(-135deg); transform: rotate(-135deg);

4
src/css/base/pane.css

@ -11,7 +11,7 @@
.bi-loading-widget { .bi-loading-widget {
font-size: 0; font-size: 0;
} }
.bi-loading-widget div { .bi-loading-widget .animate-rect {
background-color: rgba(54, 133, 242, 0.9); background-color: rgba(54, 133, 242, 0.9);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#e63685f2,endColorstr=#e63685f2); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#e63685f2,endColorstr=#e63685f2);
-webkit-border-radius: 1.5px; -webkit-border-radius: 1.5px;
@ -127,7 +127,7 @@
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/wave_loading.gif'); _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/wave_loading.gif');
_background: none; _background: none;
} }
.bi-loading-widget.hack div { .bi-loading-widget.hack .animate-rect {
background-color: rgba(54, 133, 242, 0); background-color: rgba(54, 133, 242, 0);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#003685f2,endColorstr=#003685f2); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#003685f2,endColorstr=#003685f2);
} }

12
src/css/base/trigger/trigger.css

@ -3,18 +3,6 @@
.bi-trigger .bi-trigger-icon-button { .bi-trigger .bi-trigger-icon-button {
font-size: 16px; font-size: 16px;
} }
.bi-trigger .trigger-up {
display: none;
}
.bi-trigger .trigger-down {
display: block;
}
.bi-combo-popup > .bi-trigger .trigger-up {
display: block;
}
.bi-combo-popup > .bi-trigger .trigger-down {
display: none;
}
.bi-select-text-trigger { .bi-select-text-trigger {
-webkit-border-radius: 2px; -webkit-border-radius: 2px;

18
src/css/core/wrapper/inline.css

@ -5,6 +5,15 @@
vertical-align: middle; vertical-align: middle;
content: ' '; content: ' ';
} }
.bi-inline-center-adapt-layout > .inline-center-adapt-item {
display: inline-block;
}
.bi-inline-center-adapt-layout > .inline-center-adapt-item.x-icon {
display: inline-block !important;
}
.bi-inline-center-adapt-layout > .bi-combo.bi-combo-popup {
display: inline-block !important;
}
.bi-inline-vertical-adapt-layout:after { .bi-inline-vertical-adapt-layout:after {
display: inline-block; display: inline-block;
@ -13,3 +22,12 @@
vertical-align: middle; vertical-align: middle;
content: ' '; content: ' ';
} }
.bi-inline-vertical-adapt-layout > .inline-vertical-adapt-item {
display: inline-block;
}
.bi-inline-vertical-adapt-layout > .inline-vertical-adapt-item.x-icon {
display: inline-block !important;
}
.bi-inline-vertical-adapt-layout > .bi-combo.bi-combo-popup {
display: inline-block !important;
}

2
src/less/base/combo/combo.bubble.less

@ -3,6 +3,8 @@
.bi-bubble-combo { .bi-bubble-combo {
& .button-combo-triangle-wrapper { & .button-combo-triangle-wrapper {
position: fixed !important; position: fixed !important;
// 消除祖先节点设置的line-height:normal对空白节点的行高影响
line-height: 0;
.z-index-layer(@zIndex-popup); .z-index-layer(@zIndex-popup);
} }
& .bubble-combo-triangle-left { & .bubble-combo-triangle-left {

5
src/less/base/pane.less

@ -13,7 +13,8 @@
.bi-loading-widget { .bi-loading-widget {
font-size: 0; font-size: 0;
div { // 直接控制div标签将会导致使用div的table布局样式问题
& .animate-rect {
.background-color(@background-color-highlight, 90%); .background-color(@background-color-highlight, 90%);
.border-radius(1.5px); .border-radius(1.5px);
.animation(loading-widget 0.8s infinite linear); .animation(loading-widget 0.8s infinite linear);
@ -34,7 +35,7 @@
}); });
&.hack { &.hack {
.imagePath(@icon-wave-loading); .imagePath(@icon-wave-loading);
div { & .animate-rect {
.background-color(@background-color-highlight, 0%); .background-color(@background-color-highlight, 0%);
} }
} }

17
src/less/base/trigger/trigger.less

@ -4,21 +4,4 @@
& .bi-trigger-icon-button{ & .bi-trigger-icon-button{
font-size: @font-size-16; font-size: @font-size-16;
} }
& .trigger-up {
display: none;
}
& .trigger-down {
display: block;
}
}
.bi-combo-popup {
& > .bi-trigger {
.trigger-up {
display: block;
}
.trigger-down {
display: none;
}
}
} }

13
src/less/core/wrapper/inline.center.less

@ -6,4 +6,17 @@
vertical-align:middle; vertical-align:middle;
content:' '; content:' ';
} }
& > .inline-center-adapt-item {
display: inline-block;
&.x-icon {
display: inline-block !important;
}
}
// 这样写对于布局来说过于具体,但是x-icon也加了,这边也加一下对combo的处理
& > .bi-combo {
&.bi-combo-popup {
display: inline-block !important;
}
}
} }

14
src/less/core/wrapper/inline.vertical.less

@ -6,4 +6,18 @@
vertical-align:middle; vertical-align:middle;
content:' '; content:' ';
} }
& > .inline-vertical-adapt-item {
display: inline-block;
&.x-icon {
display: inline-block !important;
}
}
// 这样写对于布局来说过于具体,好孩子不要学
& > .bi-combo {
&.bi-combo-popup {
display: inline-block !important;
}
}
} }

16
src/less/visual.less

@ -195,12 +195,14 @@
position: absolute; position: absolute;
width: 16px; width: 16px;
height: 6px; height: 6px;
//虽然position:absolute使得:before的display属性为block,但是其仍然受到祖先text-align:center的影响,这边重置掉
text-align: left;
&:before { &:before {
position: absolute; position: absolute;
width: 6px; width: 6px;
height: 6px; height: 6px;
margin-left: 3px; margin-left: 4px;
margin-top: 2px; margin-top: 2px;
content: ""; content: "";
transform: rotate(-135deg); transform: rotate(-135deg);
@ -211,12 +213,14 @@
position: absolute; position: absolute;
width: 16px; width: 16px;
height: 6px; height: 6px;
//虽然position:absolute使得:before的display属性为block,但是其仍然受到祖先text-align:center的影响,这边重置掉
text-align: left;
&:before { &:before {
position: absolute; position: absolute;
width: 6px; width: 6px;
height: 6px; height: 6px;
margin-left: 3px; margin-left: 4px;
margin-top: -3px; margin-top: -3px;
content: ""; content: "";
transform: rotate(45deg); transform: rotate(45deg);
@ -228,6 +232,8 @@
position: absolute; position: absolute;
width: 6px; width: 6px;
height: 16px; height: 16px;
//虽然position:absolute使得:before的display属性为block,但是其仍然受到祖先text-align:center的影响,这边重置掉
text-align: left;
&:before { &:before {
position: absolute; position: absolute;
@ -244,13 +250,15 @@
position: absolute; position: absolute;
width: 6px; width: 6px;
height: 16px; height: 16px;
//虽然position:absolute使得:before的display属性为block,但是其仍然受到祖先text-align:center的影响,这边重置掉
text-align: left;
&:before { &:before {
position: absolute; position: absolute;
width: 6px; width: 6px;
height: 6px; height: 6px;
margin-left: 2px; margin-left: -3px;
margin-top: -3px; margin-top: 4px;
content: ""; content: "";
transform: rotate(-45deg); transform: rotate(-45deg);
} }

2
src/widget/yearmonth/trigger.yearmonth.js

@ -8,7 +8,7 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
extraCls: "bi-year-month-trigger", extraCls: "bi-year-month-trigger",
min: "1900-01-01", // 最小日期 min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期 max: "2099-12-31", // 最大日期
height: 24 height: 22
}, },
beforeInit: function (callback) { beforeInit: function (callback) {

6
src/widget/yearquarter/trigger.yearquarter.js

@ -8,7 +8,7 @@ BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, {
extraCls: "bi-year-quarter-trigger", extraCls: "bi-year-quarter-trigger",
min: "1900-01-01", // 最小日期 min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期 max: "2099-12-31", // 最大日期
height: 24 height: 22
}, },
_init: function () { _init: function () {
@ -39,9 +39,9 @@ BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, {
el: { el: {
type: "bi.text_button", type: "bi.text_button",
text: BI.i18nText("BI-Multi_Date_Quarter"), text: BI.i18nText("BI-Multi_Date_Quarter"),
width: o.height < 24 ? 24 : o.height width: 24
}, },
width: o.height}] width: 24}]
}] }]
}, { }, {
el: { el: {

Loading…
Cancel
Save