dailer 6 years ago
parent
commit
4244f14dac
  1. 535
      dist/2.0/fineui.ie.js
  2. 60
      dist/2.0/fineui.ie.min.js
  3. 535
      dist/2.0/fineui.js
  4. 60
      dist/2.0/fineui.min.js
  5. 515
      dist/base.js
  6. 535
      dist/bundle.ie.js
  7. 60
      dist/bundle.ie.min.js
  8. 535
      dist/bundle.js
  9. 60
      dist/bundle.min.js
  10. 601
      dist/demo.js
  11. 535
      dist/fineui.ie.js
  12. 60
      dist/fineui.ie.min.js
  13. 535
      dist/fineui.js
  14. 60
      dist/fineui.min.js
  15. 535
      dist/fineui_without_jquery_polyfill.js
  16. 2
      dist/utils.min.js
  17. 20
      dist/widget.js

535
dist/2.0/fineui.ie.js vendored

@ -36068,10 +36068,14 @@ BI.Text = BI.inherit(BI.Single, {
if (BI.isNumber(o.lineHeight)) {
this.element.css({lineHeight: o.lineHeight + "px"});
}
if (BI.isWidthOrHeight(o.maxWidth)) {
this.element.css({maxWidth: o.maxWidth});
}
this.element.css({
textAlign: o.textAlign,
whiteSpace: o.whiteSpace,
textOverflow: o.whiteSpace === "nowrap" ? "ellipsis" : ""
textOverflow: o.whiteSpace === "nowrap" ? "ellipsis" : "",
overflow: o.whiteSpace === "nowrap" ? "" : "auto"
});
if (o.handler) {
this.text = BI.createWidget({
@ -42995,7 +42999,6 @@ BI.Button = BI.inherit(BI.BasicButton, {
ghost: false, // 是否幽灵显示, 即正常状态无背景
textAlign: "center",
whiteSpace: "nowrap",
forceCenter: false,
textWidth: null,
textHeight: null,
hgap: props.clear ? 0 : 10,
@ -43049,7 +43052,6 @@ BI.Button = BI.inherit(BI.BasicButton, {
type: "bi.label",
textAlign: o.textAlign,
whiteSpace: o.whiteSpace,
forceCenter: o.forceCenter,
textWidth: o.textWidth,
textHeight: o.textHeight,
hgap: o.hgap,
@ -43132,7 +43134,6 @@ BI.TextButton = BI.inherit(BI.BasicButton, {
baseCls: (conf.baseCls || "") + " bi-text-button",
textAlign: "center",
whiteSpace: "nowrap",
forceCenter: false,
textWidth: null,
textHeight: null,
hgap: 0,
@ -43153,7 +43154,6 @@ BI.TextButton = BI.inherit(BI.BasicButton, {
whiteSpace: o.whiteSpace,
textWidth: o.textWidth,
textHeight: o.textHeight,
forceCenter: o.forceCenter,
width: o.width,
height: o.height,
hgap: o.hgap,
@ -44377,7 +44377,6 @@ BI.Editor = BI.inherit(BI.Single, {
type: "bi.label",
cls: "bi-water-mark",
text: this.options.watermark,
forceCenter: true,
height: o.height - 2 * (o.vgap + o.tgap),
whiteSpace: "nowrap",
textAlign: "left"
@ -46274,7 +46273,6 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
baseCls: (conf.baseCls || "") + " bi-label",
textAlign: "center",
whiteSpace: "nowrap", // normal or nowrap
forceCenter: false, // 是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效
textWidth: null,
textHeight: null,
hgap: 0,
@ -46314,28 +46312,22 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
var json = this._createJson();
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
if (BI.isNumber(o.height) && o.height > 0) {
var gap = (o.width - o.textWidth) / 2;
json.maxWidth = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) { // 1.1
BI.createWidget({
type: "bi.adaptive",
type: "bi.center_adapt",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [
{
el: (this.text = BI.createWidget(json)),
left: gap + o.hgap + o.lgap,
right: gap + o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
el: (this.text = BI.createWidget(json))
}
]
});
this.element.css({"line-height": o.height + "px"});
return;
}
json.width = o.textWidth;
BI.createWidget({
BI.createWidget({ // 1.2
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
@ -46348,16 +46340,18 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
bgap: o.bgap
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
items: [this.text]
});
@ -46367,33 +46361,37 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.absolute",
scrollable: o.whiteSpace === "normal",
this.text = BI.createWidget(BI.extend(json, {
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
}));
return;
}
json.width = o.width - 2 * o.hgap;
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
maxWidth: "100%"
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json))
}]
items: [this.text]
});
return;
}
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
json.maxWidth = o.textWidth;
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
@ -46407,60 +46405,36 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
scrollable: o.whiteSpace === "normal",
bgap: o.bgap
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: true,
element: this,
items: [this.text]
});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.textHeight) && o.textHeight > 0) {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.adaptive",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
return;
}
BI.extend(json, {
this.element.css({
"line-height": o.height + "px"
});
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
});
this.element.css({
"line-height": o.height + "px"
});
this.text = BI.createWidget(BI.extend(json, {
element: this
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
});
return;
}
BI.extend(json, {
@ -46471,22 +46445,14 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
tgap: o.tgap,
bgap: o.bgap
});
if (o.forceCenter) {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
element: this,
items: [this.text]
});
return;
}
this.text = BI.createWidget(BI.extend(json, {
element: this
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
type: "bi.center_adapt",
element: this,
items: [this.text]
});
},
@ -46498,21 +46464,16 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) {
BI.createWidget({
type: "bi.adaptive",
type: "bi.vertical_adapt",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [
{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
el: (this.text = BI.createWidget(json))
}
]
});
this.element.css({"line-height": o.height + "px"});
return;
}
BI.createWidget({
@ -46531,42 +46492,23 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
}
]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
if (BI.isNumber(o.height) && o.height > 0) {
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
element: this,
items: [this.text]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.absolute",
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
bgap: o.bgap
}));
if (o.whiteSpace !== "normal") {
this.element.css({
"line-height": o.height - (o.vgap * 2) + "px"
});
}
return;
}
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap;
@ -46584,7 +46526,6 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
el: (this.text = BI.createWidget(json))
}]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
@ -46605,66 +46546,23 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
}
]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
element: this,
items: [this.text]
});
// 父亲有line-height,而当前label是inline-block,那么他的行高一定是父亲的lineHeight,就算text上设置了line-height
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.textHeight) && o.textHeight > 0) {
if (o.whiteSpace !== "normal") {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.adaptive",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
"line-height": o.height - (o.vgap * 2) + "px"
});
return;
}
BI.extend(json, {
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
});
this.element.css({
"line-height": o.height + "px"
});
this.text = BI.createWidget(BI.extend(json, {
element: this
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
});
return;
}
BI.extend(json, {
@ -46675,23 +46573,14 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
tgap: o.tgap,
bgap: o.bgap
});
if (o.forceCenter) {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
element: this,
items: [this.text]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
this.text = BI.createWidget(BI.extend(json, {
element: this
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
type: "bi.vertical_adapt",
element: this,
items: [this.text]
});
},
@ -46789,7 +46678,6 @@ BI.Label = BI.inherit(BI.Single, {
baseCls: (conf.baseCls || "") + " bi-label",
textAlign: "center",
whiteSpace: "nowrap", // normal or nowrap
forceCenter: false, // 是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效
textWidth: null,
textHeight: null,
hgap: 0,
@ -46836,29 +46724,22 @@ BI.Label = BI.inherit(BI.Single, {
json.textAlign = "left";
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
if (BI.isNumber(o.height) && o.height > 0) {
var gap = (o.width - o.textWidth) / 2;
json.maxWidth = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) { // 1.1
BI.createWidget({
type: "bi.adaptive",
type: "bi.center_adapt",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [
{
el: (this.text = BI.createWidget(json)),
left: gap + o.hgap + o.lgap,
right: gap + o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
el: (this.text = BI.createWidget(json))
}
]
});
this.element.css({"line-height": o.height + "px"});
return;
}
json.width = o.textWidth;
json.textAlign = o.textAlign;
BI.createWidget({
BI.createWidget({ // 1.2
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
@ -46870,7 +46751,7 @@ BI.Label = BI.inherit(BI.Single, {
});
return;
}
if (o.whiteSpace == "normal") {
if (o.whiteSpace == "normal") { // 1.3
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
@ -46888,39 +46769,42 @@ BI.Label = BI.inherit(BI.Single, {
});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.height) && o.height > 0) { // 1.4
this.element.css({
"line-height": o.height + "px"
});
json.textAlign = o.textAlign;
BI.createWidget({
type: "bi.absolute",
scrollable: o.whiteSpace === "normal",
this.text = BI.createWidget(BI.extend(json, {
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
}));
return;
}
json.width = o.width - 2 * o.hgap;
json.textAlign = o.textAlign;
BI.extend(json, { // 1.5
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
maxWidth: "100%"
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json))
}]
items: [this.text]
});
return;
}
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.textWidth) && o.textWidth > 0) { // 1.6
json.maxWidth = o.textWidth;
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
@ -46933,7 +46817,7 @@ BI.Label = BI.inherit(BI.Single, {
});
return;
}
if (o.whiteSpace == "normal") {
if (o.whiteSpace == "normal") { // 1.7
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
@ -46945,54 +46829,26 @@ BI.Label = BI.inherit(BI.Single, {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
scrollable: true,
element: this,
items: [this.text]
});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.textHeight) && o.textHeight > 0) {
this.element.css({
"line-height": o.height + "px"
});
json.textAlign = o.textAlign;
BI.createWidget({
type: "bi.adaptive",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
return;
}
BI.extend(json, {
if (BI.isNumber(o.height) && o.height > 0) { // 1.8
this.element.css({
"line-height": o.height + "px"
});
json.textAlign = o.textAlign;
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
});
this.element.css({
"line-height": o.height + "px"
});
// 能走到这边,说明这个text不需要换行,并且不会做任何布局包装,那么这时候就该是什么align是什么align
json.textAlign = o.textAlign;
this.text = BI.createWidget(BI.extend(json, {
element: this
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
});
return;
}
BI.extend(json, {
@ -47003,24 +46859,14 @@ BI.Label = BI.inherit(BI.Single, {
tgap: o.tgap,
bgap: o.bgap
});
if (o.forceCenter) {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
element: this,
items: [this.text]
});
return;
}
// 能走到这边,说明这个text不需要换行,并且不会做任何布局包装,那么这时候就该是什么align是什么align
json.textAlign = o.textAlign;
this.text = BI.createWidget(BI.extend(json, {
element: this
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
type: "bi.center_adapt",
element: this,
items: [this.text]
});
},
@ -47030,26 +46876,21 @@ BI.Label = BI.inherit(BI.Single, {
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.height) && o.height > 0) { // 2.1
BI.createWidget({
type: "bi.adaptive",
type: "bi.vertical_adapt",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [
{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
el: (this.text = BI.createWidget(json))
}
]
});
this.element.css({"line-height": o.height + "px"});
return;
}
BI.createWidget({
BI.createWidget({ // 2.2
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
@ -47065,46 +46906,27 @@ BI.Label = BI.inherit(BI.Single, {
}
]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
if (BI.isNumber(o.height) && o.height > 0) { // 2.3
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
element: this,
items: [this.text]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.absolute",
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
bgap: o.bgap
}));
if (o.whiteSpace !== "normal") {
this.element.css({
"line-height": o.height - (o.vgap * 2) + "px"
});
}
return;
}
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap;
BI.createWidget({
BI.createWidget({ // 2.4
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
@ -47118,12 +46940,11 @@ BI.Label = BI.inherit(BI.Single, {
el: (this.text = BI.createWidget(json))
}]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
BI.createWidget({
BI.createWidget({ // 2.5
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
@ -47139,66 +46960,23 @@ BI.Label = BI.inherit(BI.Single, {
}
]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
element: this,
items: [this.text]
});
// 父亲有line-height,而当前label是inline-block,那么他的行高一定是父亲的lineHeight,就算text上设置了line-height
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.textHeight) && o.textHeight > 0) {
if (o.whiteSpace !== "normal") {
this.element.css({
"line-height": o.height + "px"
"line-height": o.height - (o.vgap * 2) + "px"
});
BI.createWidget({
type: "bi.adaptive",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
return;
}
BI.extend(json, {
this.text = BI.createWidget(BI.extend(json, { // 2.6
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
});
this.element.css({
"line-height": o.height + "px"
});
this.text = BI.createWidget(BI.extend(json, {
element: this
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
});
return;
}
BI.extend(json, {
@ -47209,23 +46987,14 @@ BI.Label = BI.inherit(BI.Single, {
tgap: o.tgap,
bgap: o.bgap
});
if (o.forceCenter) {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
element: this,
items: [this.text]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
this.text = BI.createWidget(BI.extend(json, {
element: this
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
type: "bi.vertical_adapt",
element: this,
items: [this.text]
});
},
@ -61192,7 +60961,6 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
var self = this, opts = this.options;
this.cancelButton = BI.createWidget({
type: "bi.text_button",
forceCenter: true,
cls: "multidate-popup-button bi-border-top bi-border-right",
shadow: true,
text: BI.i18nText("BI-Basic_Cancel")
@ -61203,7 +60971,6 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
this.okButton = BI.createWidget({
type: "bi.text_button",
forceCenter: true,
cls: "multidate-popup-button bi-border-top",
shadow: true,
text: BI.i18nText("BI-Basic_OK")
@ -63165,7 +62932,6 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
shadow: true,
text: BI.i18nText("BI-Basic_Clear"),
@ -63178,7 +62944,6 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
shadow: true,
textHeight: c.buttonHeight - 1,
@ -63194,7 +62959,6 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -64010,7 +63774,6 @@ BI.extend(BI.DynamicDateTimeCombo, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -64023,7 +63786,6 @@ BI.extend(BI.DynamicDateTimeCombo, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -64039,7 +63801,6 @@ BI.extend(BI.DynamicDateTimeCombo, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -80476,7 +80237,6 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
shadow: true,
text: BI.i18nText("BI-Basic_Clears"),
@ -80488,7 +80248,6 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
shadow: true,
text: BI.i18nText("BI-Basic_Now"),
@ -80500,7 +80259,6 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
shadow: true,
text: BI.i18nText("BI-Basic_OK"),
@ -81819,7 +81577,6 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -81832,7 +81589,6 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
textHeight: c.buttonHeight - 1,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
shadow: true,
@ -81848,7 +81604,6 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -82577,7 +82332,6 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -82590,7 +82344,6 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -82606,7 +82359,6 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -83580,7 +83332,6 @@ BI.extend(BI.DynamicYearQuarterCombo, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
shadow: true,
textHeight: c.buttonHeight - 1,
@ -83593,7 +83344,6 @@ BI.extend(BI.DynamicYearQuarterCombo, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -83609,7 +83359,6 @@ BI.extend(BI.DynamicYearQuarterCombo, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
shadow: true,
textHeight: c.buttonHeight - 1,

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

File diff suppressed because one or more lines are too long

535
dist/2.0/fineui.js vendored

@ -36472,10 +36472,14 @@ BI.Text = BI.inherit(BI.Single, {
if (BI.isNumber(o.lineHeight)) {
this.element.css({lineHeight: o.lineHeight + "px"});
}
if (BI.isWidthOrHeight(o.maxWidth)) {
this.element.css({maxWidth: o.maxWidth});
}
this.element.css({
textAlign: o.textAlign,
whiteSpace: o.whiteSpace,
textOverflow: o.whiteSpace === "nowrap" ? "ellipsis" : ""
textOverflow: o.whiteSpace === "nowrap" ? "ellipsis" : "",
overflow: o.whiteSpace === "nowrap" ? "" : "auto"
});
if (o.handler) {
this.text = BI.createWidget({
@ -43399,7 +43403,6 @@ BI.Button = BI.inherit(BI.BasicButton, {
ghost: false, // 是否幽灵显示, 即正常状态无背景
textAlign: "center",
whiteSpace: "nowrap",
forceCenter: false,
textWidth: null,
textHeight: null,
hgap: props.clear ? 0 : 10,
@ -43453,7 +43456,6 @@ BI.Button = BI.inherit(BI.BasicButton, {
type: "bi.label",
textAlign: o.textAlign,
whiteSpace: o.whiteSpace,
forceCenter: o.forceCenter,
textWidth: o.textWidth,
textHeight: o.textHeight,
hgap: o.hgap,
@ -43536,7 +43538,6 @@ BI.TextButton = BI.inherit(BI.BasicButton, {
baseCls: (conf.baseCls || "") + " bi-text-button",
textAlign: "center",
whiteSpace: "nowrap",
forceCenter: false,
textWidth: null,
textHeight: null,
hgap: 0,
@ -43557,7 +43558,6 @@ BI.TextButton = BI.inherit(BI.BasicButton, {
whiteSpace: o.whiteSpace,
textWidth: o.textWidth,
textHeight: o.textHeight,
forceCenter: o.forceCenter,
width: o.width,
height: o.height,
hgap: o.hgap,
@ -44781,7 +44781,6 @@ BI.Editor = BI.inherit(BI.Single, {
type: "bi.label",
cls: "bi-water-mark",
text: this.options.watermark,
forceCenter: true,
height: o.height - 2 * (o.vgap + o.tgap),
whiteSpace: "nowrap",
textAlign: "left"
@ -46678,7 +46677,6 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
baseCls: (conf.baseCls || "") + " bi-label",
textAlign: "center",
whiteSpace: "nowrap", // normal or nowrap
forceCenter: false, // 是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效
textWidth: null,
textHeight: null,
hgap: 0,
@ -46718,28 +46716,22 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
var json = this._createJson();
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
if (BI.isNumber(o.height) && o.height > 0) {
var gap = (o.width - o.textWidth) / 2;
json.maxWidth = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) { // 1.1
BI.createWidget({
type: "bi.adaptive",
type: "bi.center_adapt",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [
{
el: (this.text = BI.createWidget(json)),
left: gap + o.hgap + o.lgap,
right: gap + o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
el: (this.text = BI.createWidget(json))
}
]
});
this.element.css({"line-height": o.height + "px"});
return;
}
json.width = o.textWidth;
BI.createWidget({
BI.createWidget({ // 1.2
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
@ -46752,16 +46744,18 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
bgap: o.bgap
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
items: [this.text]
});
@ -46771,33 +46765,37 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.absolute",
scrollable: o.whiteSpace === "normal",
this.text = BI.createWidget(BI.extend(json, {
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
}));
return;
}
json.width = o.width - 2 * o.hgap;
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
maxWidth: "100%"
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json))
}]
items: [this.text]
});
return;
}
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
json.maxWidth = o.textWidth;
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
@ -46811,60 +46809,36 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
scrollable: o.whiteSpace === "normal",
bgap: o.bgap
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: true,
element: this,
items: [this.text]
});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.textHeight) && o.textHeight > 0) {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.adaptive",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
return;
}
BI.extend(json, {
this.element.css({
"line-height": o.height + "px"
});
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
});
this.element.css({
"line-height": o.height + "px"
});
this.text = BI.createWidget(BI.extend(json, {
element: this
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
});
return;
}
BI.extend(json, {
@ -46875,22 +46849,14 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
tgap: o.tgap,
bgap: o.bgap
});
if (o.forceCenter) {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
element: this,
items: [this.text]
});
return;
}
this.text = BI.createWidget(BI.extend(json, {
element: this
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
type: "bi.center_adapt",
element: this,
items: [this.text]
});
},
@ -46902,21 +46868,16 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) {
BI.createWidget({
type: "bi.adaptive",
type: "bi.vertical_adapt",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [
{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
el: (this.text = BI.createWidget(json))
}
]
});
this.element.css({"line-height": o.height + "px"});
return;
}
BI.createWidget({
@ -46935,42 +46896,23 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
}
]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
if (BI.isNumber(o.height) && o.height > 0) {
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
element: this,
items: [this.text]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.absolute",
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
bgap: o.bgap
}));
if (o.whiteSpace !== "normal") {
this.element.css({
"line-height": o.height - (o.vgap * 2) + "px"
});
}
return;
}
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap;
@ -46988,7 +46930,6 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
el: (this.text = BI.createWidget(json))
}]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
@ -47009,66 +46950,23 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
}
]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
element: this,
items: [this.text]
});
// 父亲有line-height,而当前label是inline-block,那么他的行高一定是父亲的lineHeight,就算text上设置了line-height
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.textHeight) && o.textHeight > 0) {
if (o.whiteSpace !== "normal") {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.adaptive",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
"line-height": o.height - (o.vgap * 2) + "px"
});
return;
}
BI.extend(json, {
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
});
this.element.css({
"line-height": o.height + "px"
});
this.text = BI.createWidget(BI.extend(json, {
element: this
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
});
return;
}
BI.extend(json, {
@ -47079,23 +46977,14 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
tgap: o.tgap,
bgap: o.bgap
});
if (o.forceCenter) {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
element: this,
items: [this.text]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
this.text = BI.createWidget(BI.extend(json, {
element: this
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
type: "bi.vertical_adapt",
element: this,
items: [this.text]
});
},
@ -47193,7 +47082,6 @@ BI.Label = BI.inherit(BI.Single, {
baseCls: (conf.baseCls || "") + " bi-label",
textAlign: "center",
whiteSpace: "nowrap", // normal or nowrap
forceCenter: false, // 是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效
textWidth: null,
textHeight: null,
hgap: 0,
@ -47240,29 +47128,22 @@ BI.Label = BI.inherit(BI.Single, {
json.textAlign = "left";
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
if (BI.isNumber(o.height) && o.height > 0) {
var gap = (o.width - o.textWidth) / 2;
json.maxWidth = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) { // 1.1
BI.createWidget({
type: "bi.adaptive",
type: "bi.center_adapt",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [
{
el: (this.text = BI.createWidget(json)),
left: gap + o.hgap + o.lgap,
right: gap + o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
el: (this.text = BI.createWidget(json))
}
]
});
this.element.css({"line-height": o.height + "px"});
return;
}
json.width = o.textWidth;
json.textAlign = o.textAlign;
BI.createWidget({
BI.createWidget({ // 1.2
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
@ -47274,7 +47155,7 @@ BI.Label = BI.inherit(BI.Single, {
});
return;
}
if (o.whiteSpace == "normal") {
if (o.whiteSpace == "normal") { // 1.3
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
@ -47292,39 +47173,42 @@ BI.Label = BI.inherit(BI.Single, {
});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.height) && o.height > 0) { // 1.4
this.element.css({
"line-height": o.height + "px"
});
json.textAlign = o.textAlign;
BI.createWidget({
type: "bi.absolute",
scrollable: o.whiteSpace === "normal",
this.text = BI.createWidget(BI.extend(json, {
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
}));
return;
}
json.width = o.width - 2 * o.hgap;
json.textAlign = o.textAlign;
BI.extend(json, { // 1.5
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
maxWidth: "100%"
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json))
}]
items: [this.text]
});
return;
}
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.textWidth) && o.textWidth > 0) { // 1.6
json.maxWidth = o.textWidth;
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
@ -47337,7 +47221,7 @@ BI.Label = BI.inherit(BI.Single, {
});
return;
}
if (o.whiteSpace == "normal") {
if (o.whiteSpace == "normal") { // 1.7
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
@ -47349,54 +47233,26 @@ BI.Label = BI.inherit(BI.Single, {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
scrollable: true,
element: this,
items: [this.text]
});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.textHeight) && o.textHeight > 0) {
this.element.css({
"line-height": o.height + "px"
});
json.textAlign = o.textAlign;
BI.createWidget({
type: "bi.adaptive",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
return;
}
BI.extend(json, {
if (BI.isNumber(o.height) && o.height > 0) { // 1.8
this.element.css({
"line-height": o.height + "px"
});
json.textAlign = o.textAlign;
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
});
this.element.css({
"line-height": o.height + "px"
});
// 能走到这边,说明这个text不需要换行,并且不会做任何布局包装,那么这时候就该是什么align是什么align
json.textAlign = o.textAlign;
this.text = BI.createWidget(BI.extend(json, {
element: this
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
});
return;
}
BI.extend(json, {
@ -47407,24 +47263,14 @@ BI.Label = BI.inherit(BI.Single, {
tgap: o.tgap,
bgap: o.bgap
});
if (o.forceCenter) {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
element: this,
items: [this.text]
});
return;
}
// 能走到这边,说明这个text不需要换行,并且不会做任何布局包装,那么这时候就该是什么align是什么align
json.textAlign = o.textAlign;
this.text = BI.createWidget(BI.extend(json, {
element: this
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
type: "bi.center_adapt",
element: this,
items: [this.text]
});
},
@ -47434,26 +47280,21 @@ BI.Label = BI.inherit(BI.Single, {
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.height) && o.height > 0) { // 2.1
BI.createWidget({
type: "bi.adaptive",
type: "bi.vertical_adapt",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [
{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
el: (this.text = BI.createWidget(json))
}
]
});
this.element.css({"line-height": o.height + "px"});
return;
}
BI.createWidget({
BI.createWidget({ // 2.2
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
@ -47469,46 +47310,27 @@ BI.Label = BI.inherit(BI.Single, {
}
]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
if (BI.isNumber(o.height) && o.height > 0) { // 2.3
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
element: this,
items: [this.text]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.absolute",
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
bgap: o.bgap
}));
if (o.whiteSpace !== "normal") {
this.element.css({
"line-height": o.height - (o.vgap * 2) + "px"
});
}
return;
}
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap;
BI.createWidget({
BI.createWidget({ // 2.4
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
@ -47522,12 +47344,11 @@ BI.Label = BI.inherit(BI.Single, {
el: (this.text = BI.createWidget(json))
}]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
BI.createWidget({
BI.createWidget({ // 2.5
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
@ -47543,66 +47364,23 @@ BI.Label = BI.inherit(BI.Single, {
}
]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
element: this,
items: [this.text]
});
// 父亲有line-height,而当前label是inline-block,那么他的行高一定是父亲的lineHeight,就算text上设置了line-height
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.textHeight) && o.textHeight > 0) {
if (o.whiteSpace !== "normal") {
this.element.css({
"line-height": o.height + "px"
"line-height": o.height - (o.vgap * 2) + "px"
});
BI.createWidget({
type: "bi.adaptive",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
return;
}
BI.extend(json, {
this.text = BI.createWidget(BI.extend(json, { // 2.6
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
});
this.element.css({
"line-height": o.height + "px"
});
this.text = BI.createWidget(BI.extend(json, {
element: this
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
});
return;
}
BI.extend(json, {
@ -47613,23 +47391,14 @@ BI.Label = BI.inherit(BI.Single, {
tgap: o.tgap,
bgap: o.bgap
});
if (o.forceCenter) {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
element: this,
items: [this.text]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
this.text = BI.createWidget(BI.extend(json, {
element: this
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
type: "bi.vertical_adapt",
element: this,
items: [this.text]
});
},
@ -61596,7 +61365,6 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
var self = this, opts = this.options;
this.cancelButton = BI.createWidget({
type: "bi.text_button",
forceCenter: true,
cls: "multidate-popup-button bi-border-top bi-border-right",
shadow: true,
text: BI.i18nText("BI-Basic_Cancel")
@ -61607,7 +61375,6 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
this.okButton = BI.createWidget({
type: "bi.text_button",
forceCenter: true,
cls: "multidate-popup-button bi-border-top",
shadow: true,
text: BI.i18nText("BI-Basic_OK")
@ -63569,7 +63336,6 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
shadow: true,
text: BI.i18nText("BI-Basic_Clear"),
@ -63582,7 +63348,6 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
shadow: true,
textHeight: c.buttonHeight - 1,
@ -63598,7 +63363,6 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -64414,7 +64178,6 @@ BI.extend(BI.DynamicDateTimeCombo, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -64427,7 +64190,6 @@ BI.extend(BI.DynamicDateTimeCombo, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -64443,7 +64205,6 @@ BI.extend(BI.DynamicDateTimeCombo, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -80880,7 +80641,6 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
shadow: true,
text: BI.i18nText("BI-Basic_Clears"),
@ -80892,7 +80652,6 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
shadow: true,
text: BI.i18nText("BI-Basic_Now"),
@ -80904,7 +80663,6 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
shadow: true,
text: BI.i18nText("BI-Basic_OK"),
@ -82223,7 +81981,6 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -82236,7 +81993,6 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
textHeight: c.buttonHeight - 1,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
shadow: true,
@ -82252,7 +82008,6 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -82981,7 +82736,6 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -82994,7 +82748,6 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -83010,7 +82763,6 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -83984,7 +83736,6 @@ BI.extend(BI.DynamicYearQuarterCombo, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
shadow: true,
textHeight: c.buttonHeight - 1,
@ -83997,7 +83748,6 @@ BI.extend(BI.DynamicYearQuarterCombo, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -84013,7 +83763,6 @@ BI.extend(BI.DynamicYearQuarterCombo, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
shadow: true,
textHeight: c.buttonHeight - 1,

60
dist/2.0/fineui.min.js vendored

File diff suppressed because one or more lines are too long

515
dist/base.js vendored

@ -579,10 +579,14 @@ BI.Text = BI.inherit(BI.Single, {
if (BI.isNumber(o.lineHeight)) {
this.element.css({lineHeight: o.lineHeight + "px"});
}
if (BI.isWidthOrHeight(o.maxWidth)) {
this.element.css({maxWidth: o.maxWidth});
}
this.element.css({
textAlign: o.textAlign,
whiteSpace: o.whiteSpace,
textOverflow: o.whiteSpace === "nowrap" ? "ellipsis" : ""
textOverflow: o.whiteSpace === "nowrap" ? "ellipsis" : "",
overflow: o.whiteSpace === "nowrap" ? "" : "auto"
});
if (o.handler) {
this.text = BI.createWidget({
@ -7506,7 +7510,6 @@ BI.Button = BI.inherit(BI.BasicButton, {
ghost: false, // 是否幽灵显示, 即正常状态无背景
textAlign: "center",
whiteSpace: "nowrap",
forceCenter: false,
textWidth: null,
textHeight: null,
hgap: props.clear ? 0 : 10,
@ -7560,7 +7563,6 @@ BI.Button = BI.inherit(BI.BasicButton, {
type: "bi.label",
textAlign: o.textAlign,
whiteSpace: o.whiteSpace,
forceCenter: o.forceCenter,
textWidth: o.textWidth,
textHeight: o.textHeight,
hgap: o.hgap,
@ -7643,7 +7645,6 @@ BI.TextButton = BI.inherit(BI.BasicButton, {
baseCls: (conf.baseCls || "") + " bi-text-button",
textAlign: "center",
whiteSpace: "nowrap",
forceCenter: false,
textWidth: null,
textHeight: null,
hgap: 0,
@ -7664,7 +7665,6 @@ BI.TextButton = BI.inherit(BI.BasicButton, {
whiteSpace: o.whiteSpace,
textWidth: o.textWidth,
textHeight: o.textHeight,
forceCenter: o.forceCenter,
width: o.width,
height: o.height,
hgap: o.hgap,
@ -8888,7 +8888,6 @@ BI.Editor = BI.inherit(BI.Single, {
type: "bi.label",
cls: "bi-water-mark",
text: this.options.watermark,
forceCenter: true,
height: o.height - 2 * (o.vgap + o.tgap),
whiteSpace: "nowrap",
textAlign: "left"
@ -10785,7 +10784,6 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
baseCls: (conf.baseCls || "") + " bi-label",
textAlign: "center",
whiteSpace: "nowrap", // normal or nowrap
forceCenter: false, // 是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效
textWidth: null,
textHeight: null,
hgap: 0,
@ -10825,28 +10823,22 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
var json = this._createJson();
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
if (BI.isNumber(o.height) && o.height > 0) {
var gap = (o.width - o.textWidth) / 2;
json.maxWidth = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) { // 1.1
BI.createWidget({
type: "bi.adaptive",
type: "bi.center_adapt",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [
{
el: (this.text = BI.createWidget(json)),
left: gap + o.hgap + o.lgap,
right: gap + o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
el: (this.text = BI.createWidget(json))
}
]
});
this.element.css({"line-height": o.height + "px"});
return;
}
json.width = o.textWidth;
BI.createWidget({
BI.createWidget({ // 1.2
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
@ -10859,16 +10851,18 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
bgap: o.bgap
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
items: [this.text]
});
@ -10878,33 +10872,37 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.absolute",
scrollable: o.whiteSpace === "normal",
this.text = BI.createWidget(BI.extend(json, {
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
}));
return;
}
json.width = o.width - 2 * o.hgap;
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
maxWidth: "100%"
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json))
}]
items: [this.text]
});
return;
}
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
json.maxWidth = o.textWidth;
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
@ -10918,60 +10916,36 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
scrollable: o.whiteSpace === "normal",
bgap: o.bgap
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: true,
element: this,
items: [this.text]
});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.textHeight) && o.textHeight > 0) {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.adaptive",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
return;
}
BI.extend(json, {
this.element.css({
"line-height": o.height + "px"
});
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
});
this.element.css({
"line-height": o.height + "px"
});
this.text = BI.createWidget(BI.extend(json, {
element: this
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
});
return;
}
BI.extend(json, {
@ -10982,22 +10956,14 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
tgap: o.tgap,
bgap: o.bgap
});
if (o.forceCenter) {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
element: this,
items: [this.text]
});
return;
}
this.text = BI.createWidget(BI.extend(json, {
element: this
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
type: "bi.center_adapt",
element: this,
items: [this.text]
});
},
@ -11009,21 +10975,16 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) {
BI.createWidget({
type: "bi.adaptive",
type: "bi.vertical_adapt",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [
{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
el: (this.text = BI.createWidget(json))
}
]
});
this.element.css({"line-height": o.height + "px"});
return;
}
BI.createWidget({
@ -11042,42 +11003,23 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
}
]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
if (BI.isNumber(o.height) && o.height > 0) {
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
element: this,
items: [this.text]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.absolute",
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
bgap: o.bgap
}));
if (o.whiteSpace !== "normal") {
this.element.css({
"line-height": o.height - (o.vgap * 2) + "px"
});
}
return;
}
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap;
@ -11095,7 +11037,6 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
el: (this.text = BI.createWidget(json))
}]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
@ -11116,66 +11057,23 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
}
]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
element: this,
items: [this.text]
});
// 父亲有line-height,而当前label是inline-block,那么他的行高一定是父亲的lineHeight,就算text上设置了line-height
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.textHeight) && o.textHeight > 0) {
if (o.whiteSpace !== "normal") {
this.element.css({
"line-height": o.height + "px"
"line-height": o.height - (o.vgap * 2) + "px"
});
BI.createWidget({
type: "bi.adaptive",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
return;
}
BI.extend(json, {
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
});
this.element.css({
"line-height": o.height + "px"
});
this.text = BI.createWidget(BI.extend(json, {
element: this
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
});
return;
}
BI.extend(json, {
@ -11186,23 +11084,14 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
tgap: o.tgap,
bgap: o.bgap
});
if (o.forceCenter) {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
element: this,
items: [this.text]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
this.text = BI.createWidget(BI.extend(json, {
element: this
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
type: "bi.vertical_adapt",
element: this,
items: [this.text]
});
},
@ -11300,7 +11189,6 @@ BI.Label = BI.inherit(BI.Single, {
baseCls: (conf.baseCls || "") + " bi-label",
textAlign: "center",
whiteSpace: "nowrap", // normal or nowrap
forceCenter: false, // 是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效
textWidth: null,
textHeight: null,
hgap: 0,
@ -11347,29 +11235,22 @@ BI.Label = BI.inherit(BI.Single, {
json.textAlign = "left";
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
if (BI.isNumber(o.height) && o.height > 0) {
var gap = (o.width - o.textWidth) / 2;
json.maxWidth = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) { // 1.1
BI.createWidget({
type: "bi.adaptive",
type: "bi.center_adapt",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [
{
el: (this.text = BI.createWidget(json)),
left: gap + o.hgap + o.lgap,
right: gap + o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
el: (this.text = BI.createWidget(json))
}
]
});
this.element.css({"line-height": o.height + "px"});
return;
}
json.width = o.textWidth;
json.textAlign = o.textAlign;
BI.createWidget({
BI.createWidget({ // 1.2
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
@ -11381,7 +11262,7 @@ BI.Label = BI.inherit(BI.Single, {
});
return;
}
if (o.whiteSpace == "normal") {
if (o.whiteSpace == "normal") { // 1.3
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
@ -11399,39 +11280,42 @@ BI.Label = BI.inherit(BI.Single, {
});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.height) && o.height > 0) { // 1.4
this.element.css({
"line-height": o.height + "px"
});
json.textAlign = o.textAlign;
BI.createWidget({
type: "bi.absolute",
scrollable: o.whiteSpace === "normal",
this.text = BI.createWidget(BI.extend(json, {
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
}));
return;
}
json.width = o.width - 2 * o.hgap;
json.textAlign = o.textAlign;
BI.extend(json, { // 1.5
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
maxWidth: "100%"
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json))
}]
items: [this.text]
});
return;
}
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.textWidth) && o.textWidth > 0) { // 1.6
json.maxWidth = o.textWidth;
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
@ -11444,7 +11328,7 @@ BI.Label = BI.inherit(BI.Single, {
});
return;
}
if (o.whiteSpace == "normal") {
if (o.whiteSpace == "normal") { // 1.7
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
@ -11456,54 +11340,26 @@ BI.Label = BI.inherit(BI.Single, {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
scrollable: true,
element: this,
items: [this.text]
});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.textHeight) && o.textHeight > 0) {
this.element.css({
"line-height": o.height + "px"
});
json.textAlign = o.textAlign;
BI.createWidget({
type: "bi.adaptive",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
return;
}
BI.extend(json, {
if (BI.isNumber(o.height) && o.height > 0) { // 1.8
this.element.css({
"line-height": o.height + "px"
});
json.textAlign = o.textAlign;
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
});
this.element.css({
"line-height": o.height + "px"
});
// 能走到这边,说明这个text不需要换行,并且不会做任何布局包装,那么这时候就该是什么align是什么align
json.textAlign = o.textAlign;
this.text = BI.createWidget(BI.extend(json, {
element: this
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
});
return;
}
BI.extend(json, {
@ -11514,24 +11370,14 @@ BI.Label = BI.inherit(BI.Single, {
tgap: o.tgap,
bgap: o.bgap
});
if (o.forceCenter) {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
element: this,
items: [this.text]
});
return;
}
// 能走到这边,说明这个text不需要换行,并且不会做任何布局包装,那么这时候就该是什么align是什么align
json.textAlign = o.textAlign;
this.text = BI.createWidget(BI.extend(json, {
element: this
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
type: "bi.center_adapt",
element: this,
items: [this.text]
});
},
@ -11541,26 +11387,21 @@ BI.Label = BI.inherit(BI.Single, {
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.height) && o.height > 0) { // 2.1
BI.createWidget({
type: "bi.adaptive",
type: "bi.vertical_adapt",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [
{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
el: (this.text = BI.createWidget(json))
}
]
});
this.element.css({"line-height": o.height + "px"});
return;
}
BI.createWidget({
BI.createWidget({ // 2.2
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
@ -11576,46 +11417,27 @@ BI.Label = BI.inherit(BI.Single, {
}
]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
if (BI.isNumber(o.height) && o.height > 0) { // 2.3
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
element: this,
items: [this.text]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.absolute",
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
bgap: o.bgap
}));
if (o.whiteSpace !== "normal") {
this.element.css({
"line-height": o.height - (o.vgap * 2) + "px"
});
}
return;
}
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap;
BI.createWidget({
BI.createWidget({ // 2.4
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
@ -11629,12 +11451,11 @@ BI.Label = BI.inherit(BI.Single, {
el: (this.text = BI.createWidget(json))
}]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
BI.createWidget({
BI.createWidget({ // 2.5
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
@ -11650,66 +11471,23 @@ BI.Label = BI.inherit(BI.Single, {
}
]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
element: this,
items: [this.text]
});
// 父亲有line-height,而当前label是inline-block,那么他的行高一定是父亲的lineHeight,就算text上设置了line-height
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.textHeight) && o.textHeight > 0) {
if (o.whiteSpace !== "normal") {
this.element.css({
"line-height": o.height + "px"
"line-height": o.height - (o.vgap * 2) + "px"
});
BI.createWidget({
type: "bi.adaptive",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
return;
}
BI.extend(json, {
this.text = BI.createWidget(BI.extend(json, { // 2.6
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
});
this.element.css({
"line-height": o.height + "px"
});
this.text = BI.createWidget(BI.extend(json, {
element: this
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
});
return;
}
BI.extend(json, {
@ -11720,23 +11498,14 @@ BI.Label = BI.inherit(BI.Single, {
tgap: o.tgap,
bgap: o.bgap
});
if (o.forceCenter) {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
element: this,
items: [this.text]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
this.text = BI.createWidget(BI.extend(json, {
element: this
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
type: "bi.vertical_adapt",
element: this,
items: [this.text]
});
},

535
dist/bundle.ie.js vendored

@ -36068,10 +36068,14 @@ BI.Text = BI.inherit(BI.Single, {
if (BI.isNumber(o.lineHeight)) {
this.element.css({lineHeight: o.lineHeight + "px"});
}
if (BI.isWidthOrHeight(o.maxWidth)) {
this.element.css({maxWidth: o.maxWidth});
}
this.element.css({
textAlign: o.textAlign,
whiteSpace: o.whiteSpace,
textOverflow: o.whiteSpace === "nowrap" ? "ellipsis" : ""
textOverflow: o.whiteSpace === "nowrap" ? "ellipsis" : "",
overflow: o.whiteSpace === "nowrap" ? "" : "auto"
});
if (o.handler) {
this.text = BI.createWidget({
@ -42995,7 +42999,6 @@ BI.Button = BI.inherit(BI.BasicButton, {
ghost: false, // 是否幽灵显示, 即正常状态无背景
textAlign: "center",
whiteSpace: "nowrap",
forceCenter: false,
textWidth: null,
textHeight: null,
hgap: props.clear ? 0 : 10,
@ -43049,7 +43052,6 @@ BI.Button = BI.inherit(BI.BasicButton, {
type: "bi.label",
textAlign: o.textAlign,
whiteSpace: o.whiteSpace,
forceCenter: o.forceCenter,
textWidth: o.textWidth,
textHeight: o.textHeight,
hgap: o.hgap,
@ -43132,7 +43134,6 @@ BI.TextButton = BI.inherit(BI.BasicButton, {
baseCls: (conf.baseCls || "") + " bi-text-button",
textAlign: "center",
whiteSpace: "nowrap",
forceCenter: false,
textWidth: null,
textHeight: null,
hgap: 0,
@ -43153,7 +43154,6 @@ BI.TextButton = BI.inherit(BI.BasicButton, {
whiteSpace: o.whiteSpace,
textWidth: o.textWidth,
textHeight: o.textHeight,
forceCenter: o.forceCenter,
width: o.width,
height: o.height,
hgap: o.hgap,
@ -44377,7 +44377,6 @@ BI.Editor = BI.inherit(BI.Single, {
type: "bi.label",
cls: "bi-water-mark",
text: this.options.watermark,
forceCenter: true,
height: o.height - 2 * (o.vgap + o.tgap),
whiteSpace: "nowrap",
textAlign: "left"
@ -46274,7 +46273,6 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
baseCls: (conf.baseCls || "") + " bi-label",
textAlign: "center",
whiteSpace: "nowrap", // normal or nowrap
forceCenter: false, // 是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效
textWidth: null,
textHeight: null,
hgap: 0,
@ -46314,28 +46312,22 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
var json = this._createJson();
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
if (BI.isNumber(o.height) && o.height > 0) {
var gap = (o.width - o.textWidth) / 2;
json.maxWidth = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) { // 1.1
BI.createWidget({
type: "bi.adaptive",
type: "bi.center_adapt",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [
{
el: (this.text = BI.createWidget(json)),
left: gap + o.hgap + o.lgap,
right: gap + o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
el: (this.text = BI.createWidget(json))
}
]
});
this.element.css({"line-height": o.height + "px"});
return;
}
json.width = o.textWidth;
BI.createWidget({
BI.createWidget({ // 1.2
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
@ -46348,16 +46340,18 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
bgap: o.bgap
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
items: [this.text]
});
@ -46367,33 +46361,37 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.absolute",
scrollable: o.whiteSpace === "normal",
this.text = BI.createWidget(BI.extend(json, {
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
}));
return;
}
json.width = o.width - 2 * o.hgap;
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
maxWidth: "100%"
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json))
}]
items: [this.text]
});
return;
}
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
json.maxWidth = o.textWidth;
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
@ -46407,60 +46405,36 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
scrollable: o.whiteSpace === "normal",
bgap: o.bgap
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: true,
element: this,
items: [this.text]
});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.textHeight) && o.textHeight > 0) {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.adaptive",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
return;
}
BI.extend(json, {
this.element.css({
"line-height": o.height + "px"
});
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
});
this.element.css({
"line-height": o.height + "px"
});
this.text = BI.createWidget(BI.extend(json, {
element: this
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
});
return;
}
BI.extend(json, {
@ -46471,22 +46445,14 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
tgap: o.tgap,
bgap: o.bgap
});
if (o.forceCenter) {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
element: this,
items: [this.text]
});
return;
}
this.text = BI.createWidget(BI.extend(json, {
element: this
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
type: "bi.center_adapt",
element: this,
items: [this.text]
});
},
@ -46498,21 +46464,16 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) {
BI.createWidget({
type: "bi.adaptive",
type: "bi.vertical_adapt",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [
{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
el: (this.text = BI.createWidget(json))
}
]
});
this.element.css({"line-height": o.height + "px"});
return;
}
BI.createWidget({
@ -46531,42 +46492,23 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
}
]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
if (BI.isNumber(o.height) && o.height > 0) {
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
element: this,
items: [this.text]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.absolute",
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
bgap: o.bgap
}));
if (o.whiteSpace !== "normal") {
this.element.css({
"line-height": o.height - (o.vgap * 2) + "px"
});
}
return;
}
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap;
@ -46584,7 +46526,6 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
el: (this.text = BI.createWidget(json))
}]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
@ -46605,66 +46546,23 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
}
]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
element: this,
items: [this.text]
});
// 父亲有line-height,而当前label是inline-block,那么他的行高一定是父亲的lineHeight,就算text上设置了line-height
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.textHeight) && o.textHeight > 0) {
if (o.whiteSpace !== "normal") {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.adaptive",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
"line-height": o.height - (o.vgap * 2) + "px"
});
return;
}
BI.extend(json, {
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
});
this.element.css({
"line-height": o.height + "px"
});
this.text = BI.createWidget(BI.extend(json, {
element: this
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
});
return;
}
BI.extend(json, {
@ -46675,23 +46573,14 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
tgap: o.tgap,
bgap: o.bgap
});
if (o.forceCenter) {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
element: this,
items: [this.text]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
this.text = BI.createWidget(BI.extend(json, {
element: this
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
type: "bi.vertical_adapt",
element: this,
items: [this.text]
});
},
@ -46789,7 +46678,6 @@ BI.Label = BI.inherit(BI.Single, {
baseCls: (conf.baseCls || "") + " bi-label",
textAlign: "center",
whiteSpace: "nowrap", // normal or nowrap
forceCenter: false, // 是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效
textWidth: null,
textHeight: null,
hgap: 0,
@ -46836,29 +46724,22 @@ BI.Label = BI.inherit(BI.Single, {
json.textAlign = "left";
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
if (BI.isNumber(o.height) && o.height > 0) {
var gap = (o.width - o.textWidth) / 2;
json.maxWidth = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) { // 1.1
BI.createWidget({
type: "bi.adaptive",
type: "bi.center_adapt",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [
{
el: (this.text = BI.createWidget(json)),
left: gap + o.hgap + o.lgap,
right: gap + o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
el: (this.text = BI.createWidget(json))
}
]
});
this.element.css({"line-height": o.height + "px"});
return;
}
json.width = o.textWidth;
json.textAlign = o.textAlign;
BI.createWidget({
BI.createWidget({ // 1.2
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
@ -46870,7 +46751,7 @@ BI.Label = BI.inherit(BI.Single, {
});
return;
}
if (o.whiteSpace == "normal") {
if (o.whiteSpace == "normal") { // 1.3
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
@ -46888,39 +46769,42 @@ BI.Label = BI.inherit(BI.Single, {
});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.height) && o.height > 0) { // 1.4
this.element.css({
"line-height": o.height + "px"
});
json.textAlign = o.textAlign;
BI.createWidget({
type: "bi.absolute",
scrollable: o.whiteSpace === "normal",
this.text = BI.createWidget(BI.extend(json, {
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
}));
return;
}
json.width = o.width - 2 * o.hgap;
json.textAlign = o.textAlign;
BI.extend(json, { // 1.5
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
maxWidth: "100%"
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json))
}]
items: [this.text]
});
return;
}
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.textWidth) && o.textWidth > 0) { // 1.6
json.maxWidth = o.textWidth;
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
@ -46933,7 +46817,7 @@ BI.Label = BI.inherit(BI.Single, {
});
return;
}
if (o.whiteSpace == "normal") {
if (o.whiteSpace == "normal") { // 1.7
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
@ -46945,54 +46829,26 @@ BI.Label = BI.inherit(BI.Single, {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
scrollable: true,
element: this,
items: [this.text]
});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.textHeight) && o.textHeight > 0) {
this.element.css({
"line-height": o.height + "px"
});
json.textAlign = o.textAlign;
BI.createWidget({
type: "bi.adaptive",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
return;
}
BI.extend(json, {
if (BI.isNumber(o.height) && o.height > 0) { // 1.8
this.element.css({
"line-height": o.height + "px"
});
json.textAlign = o.textAlign;
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
});
this.element.css({
"line-height": o.height + "px"
});
// 能走到这边,说明这个text不需要换行,并且不会做任何布局包装,那么这时候就该是什么align是什么align
json.textAlign = o.textAlign;
this.text = BI.createWidget(BI.extend(json, {
element: this
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
});
return;
}
BI.extend(json, {
@ -47003,24 +46859,14 @@ BI.Label = BI.inherit(BI.Single, {
tgap: o.tgap,
bgap: o.bgap
});
if (o.forceCenter) {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
element: this,
items: [this.text]
});
return;
}
// 能走到这边,说明这个text不需要换行,并且不会做任何布局包装,那么这时候就该是什么align是什么align
json.textAlign = o.textAlign;
this.text = BI.createWidget(BI.extend(json, {
element: this
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
type: "bi.center_adapt",
element: this,
items: [this.text]
});
},
@ -47030,26 +46876,21 @@ BI.Label = BI.inherit(BI.Single, {
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.height) && o.height > 0) { // 2.1
BI.createWidget({
type: "bi.adaptive",
type: "bi.vertical_adapt",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [
{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
el: (this.text = BI.createWidget(json))
}
]
});
this.element.css({"line-height": o.height + "px"});
return;
}
BI.createWidget({
BI.createWidget({ // 2.2
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
@ -47065,46 +46906,27 @@ BI.Label = BI.inherit(BI.Single, {
}
]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
if (BI.isNumber(o.height) && o.height > 0) { // 2.3
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
element: this,
items: [this.text]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.absolute",
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
bgap: o.bgap
}));
if (o.whiteSpace !== "normal") {
this.element.css({
"line-height": o.height - (o.vgap * 2) + "px"
});
}
return;
}
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap;
BI.createWidget({
BI.createWidget({ // 2.4
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
@ -47118,12 +46940,11 @@ BI.Label = BI.inherit(BI.Single, {
el: (this.text = BI.createWidget(json))
}]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
BI.createWidget({
BI.createWidget({ // 2.5
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
@ -47139,66 +46960,23 @@ BI.Label = BI.inherit(BI.Single, {
}
]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
element: this,
items: [this.text]
});
// 父亲有line-height,而当前label是inline-block,那么他的行高一定是父亲的lineHeight,就算text上设置了line-height
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.textHeight) && o.textHeight > 0) {
if (o.whiteSpace !== "normal") {
this.element.css({
"line-height": o.height + "px"
"line-height": o.height - (o.vgap * 2) + "px"
});
BI.createWidget({
type: "bi.adaptive",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
return;
}
BI.extend(json, {
this.text = BI.createWidget(BI.extend(json, { // 2.6
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
});
this.element.css({
"line-height": o.height + "px"
});
this.text = BI.createWidget(BI.extend(json, {
element: this
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
});
return;
}
BI.extend(json, {
@ -47209,23 +46987,14 @@ BI.Label = BI.inherit(BI.Single, {
tgap: o.tgap,
bgap: o.bgap
});
if (o.forceCenter) {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
element: this,
items: [this.text]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
this.text = BI.createWidget(BI.extend(json, {
element: this
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
type: "bi.vertical_adapt",
element: this,
items: [this.text]
});
},
@ -61192,7 +60961,6 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
var self = this, opts = this.options;
this.cancelButton = BI.createWidget({
type: "bi.text_button",
forceCenter: true,
cls: "multidate-popup-button bi-border-top bi-border-right",
shadow: true,
text: BI.i18nText("BI-Basic_Cancel")
@ -61203,7 +60971,6 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
this.okButton = BI.createWidget({
type: "bi.text_button",
forceCenter: true,
cls: "multidate-popup-button bi-border-top",
shadow: true,
text: BI.i18nText("BI-Basic_OK")
@ -63165,7 +62932,6 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
shadow: true,
text: BI.i18nText("BI-Basic_Clear"),
@ -63178,7 +62944,6 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
shadow: true,
textHeight: c.buttonHeight - 1,
@ -63194,7 +62959,6 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -64010,7 +63774,6 @@ BI.extend(BI.DynamicDateTimeCombo, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -64023,7 +63786,6 @@ BI.extend(BI.DynamicDateTimeCombo, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -64039,7 +63801,6 @@ BI.extend(BI.DynamicDateTimeCombo, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -80476,7 +80237,6 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
shadow: true,
text: BI.i18nText("BI-Basic_Clears"),
@ -80488,7 +80248,6 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
shadow: true,
text: BI.i18nText("BI-Basic_Now"),
@ -80500,7 +80259,6 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
shadow: true,
text: BI.i18nText("BI-Basic_OK"),
@ -81819,7 +81577,6 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -81832,7 +81589,6 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
textHeight: c.buttonHeight - 1,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
shadow: true,
@ -81848,7 +81604,6 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -82577,7 +82332,6 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -82590,7 +82344,6 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -82606,7 +82359,6 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -83580,7 +83332,6 @@ BI.extend(BI.DynamicYearQuarterCombo, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
shadow: true,
textHeight: c.buttonHeight - 1,
@ -83593,7 +83344,6 @@ BI.extend(BI.DynamicYearQuarterCombo, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -83609,7 +83359,6 @@ BI.extend(BI.DynamicYearQuarterCombo, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
shadow: true,
textHeight: c.buttonHeight - 1,

60
dist/bundle.ie.min.js vendored

File diff suppressed because one or more lines are too long

535
dist/bundle.js vendored

@ -36472,10 +36472,14 @@ BI.Text = BI.inherit(BI.Single, {
if (BI.isNumber(o.lineHeight)) {
this.element.css({lineHeight: o.lineHeight + "px"});
}
if (BI.isWidthOrHeight(o.maxWidth)) {
this.element.css({maxWidth: o.maxWidth});
}
this.element.css({
textAlign: o.textAlign,
whiteSpace: o.whiteSpace,
textOverflow: o.whiteSpace === "nowrap" ? "ellipsis" : ""
textOverflow: o.whiteSpace === "nowrap" ? "ellipsis" : "",
overflow: o.whiteSpace === "nowrap" ? "" : "auto"
});
if (o.handler) {
this.text = BI.createWidget({
@ -43399,7 +43403,6 @@ BI.Button = BI.inherit(BI.BasicButton, {
ghost: false, // 是否幽灵显示, 即正常状态无背景
textAlign: "center",
whiteSpace: "nowrap",
forceCenter: false,
textWidth: null,
textHeight: null,
hgap: props.clear ? 0 : 10,
@ -43453,7 +43456,6 @@ BI.Button = BI.inherit(BI.BasicButton, {
type: "bi.label",
textAlign: o.textAlign,
whiteSpace: o.whiteSpace,
forceCenter: o.forceCenter,
textWidth: o.textWidth,
textHeight: o.textHeight,
hgap: o.hgap,
@ -43536,7 +43538,6 @@ BI.TextButton = BI.inherit(BI.BasicButton, {
baseCls: (conf.baseCls || "") + " bi-text-button",
textAlign: "center",
whiteSpace: "nowrap",
forceCenter: false,
textWidth: null,
textHeight: null,
hgap: 0,
@ -43557,7 +43558,6 @@ BI.TextButton = BI.inherit(BI.BasicButton, {
whiteSpace: o.whiteSpace,
textWidth: o.textWidth,
textHeight: o.textHeight,
forceCenter: o.forceCenter,
width: o.width,
height: o.height,
hgap: o.hgap,
@ -44781,7 +44781,6 @@ BI.Editor = BI.inherit(BI.Single, {
type: "bi.label",
cls: "bi-water-mark",
text: this.options.watermark,
forceCenter: true,
height: o.height - 2 * (o.vgap + o.tgap),
whiteSpace: "nowrap",
textAlign: "left"
@ -46678,7 +46677,6 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
baseCls: (conf.baseCls || "") + " bi-label",
textAlign: "center",
whiteSpace: "nowrap", // normal or nowrap
forceCenter: false, // 是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效
textWidth: null,
textHeight: null,
hgap: 0,
@ -46718,28 +46716,22 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
var json = this._createJson();
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
if (BI.isNumber(o.height) && o.height > 0) {
var gap = (o.width - o.textWidth) / 2;
json.maxWidth = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) { // 1.1
BI.createWidget({
type: "bi.adaptive",
type: "bi.center_adapt",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [
{
el: (this.text = BI.createWidget(json)),
left: gap + o.hgap + o.lgap,
right: gap + o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
el: (this.text = BI.createWidget(json))
}
]
});
this.element.css({"line-height": o.height + "px"});
return;
}
json.width = o.textWidth;
BI.createWidget({
BI.createWidget({ // 1.2
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
@ -46752,16 +46744,18 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
bgap: o.bgap
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
items: [this.text]
});
@ -46771,33 +46765,37 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.absolute",
scrollable: o.whiteSpace === "normal",
this.text = BI.createWidget(BI.extend(json, {
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
}));
return;
}
json.width = o.width - 2 * o.hgap;
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
maxWidth: "100%"
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json))
}]
items: [this.text]
});
return;
}
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
json.maxWidth = o.textWidth;
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
@ -46811,60 +46809,36 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
scrollable: o.whiteSpace === "normal",
bgap: o.bgap
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: true,
element: this,
items: [this.text]
});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.textHeight) && o.textHeight > 0) {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.adaptive",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
return;
}
BI.extend(json, {
this.element.css({
"line-height": o.height + "px"
});
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
});
this.element.css({
"line-height": o.height + "px"
});
this.text = BI.createWidget(BI.extend(json, {
element: this
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
});
return;
}
BI.extend(json, {
@ -46875,22 +46849,14 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
tgap: o.tgap,
bgap: o.bgap
});
if (o.forceCenter) {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
element: this,
items: [this.text]
});
return;
}
this.text = BI.createWidget(BI.extend(json, {
element: this
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
type: "bi.center_adapt",
element: this,
items: [this.text]
});
},
@ -46902,21 +46868,16 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) {
BI.createWidget({
type: "bi.adaptive",
type: "bi.vertical_adapt",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [
{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
el: (this.text = BI.createWidget(json))
}
]
});
this.element.css({"line-height": o.height + "px"});
return;
}
BI.createWidget({
@ -46935,42 +46896,23 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
}
]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
if (BI.isNumber(o.height) && o.height > 0) {
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
element: this,
items: [this.text]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.absolute",
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
bgap: o.bgap
}));
if (o.whiteSpace !== "normal") {
this.element.css({
"line-height": o.height - (o.vgap * 2) + "px"
});
}
return;
}
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap;
@ -46988,7 +46930,6 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
el: (this.text = BI.createWidget(json))
}]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
@ -47009,66 +46950,23 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
}
]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
element: this,
items: [this.text]
});
// 父亲有line-height,而当前label是inline-block,那么他的行高一定是父亲的lineHeight,就算text上设置了line-height
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.textHeight) && o.textHeight > 0) {
if (o.whiteSpace !== "normal") {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.adaptive",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
"line-height": o.height - (o.vgap * 2) + "px"
});
return;
}
BI.extend(json, {
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
});
this.element.css({
"line-height": o.height + "px"
});
this.text = BI.createWidget(BI.extend(json, {
element: this
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
});
return;
}
BI.extend(json, {
@ -47079,23 +46977,14 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
tgap: o.tgap,
bgap: o.bgap
});
if (o.forceCenter) {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
element: this,
items: [this.text]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
this.text = BI.createWidget(BI.extend(json, {
element: this
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
type: "bi.vertical_adapt",
element: this,
items: [this.text]
});
},
@ -47193,7 +47082,6 @@ BI.Label = BI.inherit(BI.Single, {
baseCls: (conf.baseCls || "") + " bi-label",
textAlign: "center",
whiteSpace: "nowrap", // normal or nowrap
forceCenter: false, // 是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效
textWidth: null,
textHeight: null,
hgap: 0,
@ -47240,29 +47128,22 @@ BI.Label = BI.inherit(BI.Single, {
json.textAlign = "left";
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
if (BI.isNumber(o.height) && o.height > 0) {
var gap = (o.width - o.textWidth) / 2;
json.maxWidth = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) { // 1.1
BI.createWidget({
type: "bi.adaptive",
type: "bi.center_adapt",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [
{
el: (this.text = BI.createWidget(json)),
left: gap + o.hgap + o.lgap,
right: gap + o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
el: (this.text = BI.createWidget(json))
}
]
});
this.element.css({"line-height": o.height + "px"});
return;
}
json.width = o.textWidth;
json.textAlign = o.textAlign;
BI.createWidget({
BI.createWidget({ // 1.2
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
@ -47274,7 +47155,7 @@ BI.Label = BI.inherit(BI.Single, {
});
return;
}
if (o.whiteSpace == "normal") {
if (o.whiteSpace == "normal") { // 1.3
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
@ -47292,39 +47173,42 @@ BI.Label = BI.inherit(BI.Single, {
});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.height) && o.height > 0) { // 1.4
this.element.css({
"line-height": o.height + "px"
});
json.textAlign = o.textAlign;
BI.createWidget({
type: "bi.absolute",
scrollable: o.whiteSpace === "normal",
this.text = BI.createWidget(BI.extend(json, {
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
}));
return;
}
json.width = o.width - 2 * o.hgap;
json.textAlign = o.textAlign;
BI.extend(json, { // 1.5
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
maxWidth: "100%"
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json))
}]
items: [this.text]
});
return;
}
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.textWidth) && o.textWidth > 0) { // 1.6
json.maxWidth = o.textWidth;
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
@ -47337,7 +47221,7 @@ BI.Label = BI.inherit(BI.Single, {
});
return;
}
if (o.whiteSpace == "normal") {
if (o.whiteSpace == "normal") { // 1.7
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
@ -47349,54 +47233,26 @@ BI.Label = BI.inherit(BI.Single, {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
scrollable: true,
element: this,
items: [this.text]
});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.textHeight) && o.textHeight > 0) {
this.element.css({
"line-height": o.height + "px"
});
json.textAlign = o.textAlign;
BI.createWidget({
type: "bi.adaptive",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
return;
}
BI.extend(json, {
if (BI.isNumber(o.height) && o.height > 0) { // 1.8
this.element.css({
"line-height": o.height + "px"
});
json.textAlign = o.textAlign;
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
});
this.element.css({
"line-height": o.height + "px"
});
// 能走到这边,说明这个text不需要换行,并且不会做任何布局包装,那么这时候就该是什么align是什么align
json.textAlign = o.textAlign;
this.text = BI.createWidget(BI.extend(json, {
element: this
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
});
return;
}
BI.extend(json, {
@ -47407,24 +47263,14 @@ BI.Label = BI.inherit(BI.Single, {
tgap: o.tgap,
bgap: o.bgap
});
if (o.forceCenter) {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
element: this,
items: [this.text]
});
return;
}
// 能走到这边,说明这个text不需要换行,并且不会做任何布局包装,那么这时候就该是什么align是什么align
json.textAlign = o.textAlign;
this.text = BI.createWidget(BI.extend(json, {
element: this
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
type: "bi.center_adapt",
element: this,
items: [this.text]
});
},
@ -47434,26 +47280,21 @@ BI.Label = BI.inherit(BI.Single, {
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.height) && o.height > 0) { // 2.1
BI.createWidget({
type: "bi.adaptive",
type: "bi.vertical_adapt",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [
{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
el: (this.text = BI.createWidget(json))
}
]
});
this.element.css({"line-height": o.height + "px"});
return;
}
BI.createWidget({
BI.createWidget({ // 2.2
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
@ -47469,46 +47310,27 @@ BI.Label = BI.inherit(BI.Single, {
}
]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
if (BI.isNumber(o.height) && o.height > 0) { // 2.3
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
element: this,
items: [this.text]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.absolute",
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
bgap: o.bgap
}));
if (o.whiteSpace !== "normal") {
this.element.css({
"line-height": o.height - (o.vgap * 2) + "px"
});
}
return;
}
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap;
BI.createWidget({
BI.createWidget({ // 2.4
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
@ -47522,12 +47344,11 @@ BI.Label = BI.inherit(BI.Single, {
el: (this.text = BI.createWidget(json))
}]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
BI.createWidget({
BI.createWidget({ // 2.5
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
@ -47543,66 +47364,23 @@ BI.Label = BI.inherit(BI.Single, {
}
]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
element: this,
items: [this.text]
});
// 父亲有line-height,而当前label是inline-block,那么他的行高一定是父亲的lineHeight,就算text上设置了line-height
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.textHeight) && o.textHeight > 0) {
if (o.whiteSpace !== "normal") {
this.element.css({
"line-height": o.height + "px"
"line-height": o.height - (o.vgap * 2) + "px"
});
BI.createWidget({
type: "bi.adaptive",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
return;
}
BI.extend(json, {
this.text = BI.createWidget(BI.extend(json, { // 2.6
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
});
this.element.css({
"line-height": o.height + "px"
});
this.text = BI.createWidget(BI.extend(json, {
element: this
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
});
return;
}
BI.extend(json, {
@ -47613,23 +47391,14 @@ BI.Label = BI.inherit(BI.Single, {
tgap: o.tgap,
bgap: o.bgap
});
if (o.forceCenter) {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
element: this,
items: [this.text]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
this.text = BI.createWidget(BI.extend(json, {
element: this
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
type: "bi.vertical_adapt",
element: this,
items: [this.text]
});
},
@ -61596,7 +61365,6 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
var self = this, opts = this.options;
this.cancelButton = BI.createWidget({
type: "bi.text_button",
forceCenter: true,
cls: "multidate-popup-button bi-border-top bi-border-right",
shadow: true,
text: BI.i18nText("BI-Basic_Cancel")
@ -61607,7 +61375,6 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
this.okButton = BI.createWidget({
type: "bi.text_button",
forceCenter: true,
cls: "multidate-popup-button bi-border-top",
shadow: true,
text: BI.i18nText("BI-Basic_OK")
@ -63569,7 +63336,6 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
shadow: true,
text: BI.i18nText("BI-Basic_Clear"),
@ -63582,7 +63348,6 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
shadow: true,
textHeight: c.buttonHeight - 1,
@ -63598,7 +63363,6 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -64414,7 +64178,6 @@ BI.extend(BI.DynamicDateTimeCombo, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -64427,7 +64190,6 @@ BI.extend(BI.DynamicDateTimeCombo, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -64443,7 +64205,6 @@ BI.extend(BI.DynamicDateTimeCombo, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -80880,7 +80641,6 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
shadow: true,
text: BI.i18nText("BI-Basic_Clears"),
@ -80892,7 +80652,6 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
shadow: true,
text: BI.i18nText("BI-Basic_Now"),
@ -80904,7 +80663,6 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
shadow: true,
text: BI.i18nText("BI-Basic_OK"),
@ -82223,7 +81981,6 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -82236,7 +81993,6 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
textHeight: c.buttonHeight - 1,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
shadow: true,
@ -82252,7 +82008,6 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -82981,7 +82736,6 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -82994,7 +82748,6 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -83010,7 +82763,6 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -83984,7 +83736,6 @@ BI.extend(BI.DynamicYearQuarterCombo, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
shadow: true,
textHeight: c.buttonHeight - 1,
@ -83997,7 +83748,6 @@ BI.extend(BI.DynamicYearQuarterCombo, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -84013,7 +83763,6 @@ BI.extend(BI.DynamicYearQuarterCombo, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
shadow: true,
textHeight: c.buttonHeight - 1,

60
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

601
dist/demo.js vendored

@ -495,7 +495,596 @@ BI.shortcut("demo.icon_label", Demo.IconLabel);Demo.Label = BI.inherit(BI.Widget
};
}
});
BI.shortcut("demo.label", Demo.Label);Demo.Message = BI.inherit(BI.Widget, {
BI.shortcut("demo.label", Demo.Label);/**
* 整理所有label场景
*/
Demo.LabelScene = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-label"
},
render: function () {
var items = [];
items.push(this.createExpander("1.1.1 文字居中,有宽度和高度,有文字宽度,whiteSpace为normal", {
type: "bi.label",
cls: "layout-bg6",
text: "设置了textWidth,则一定是嵌套结构,因此需要用center_adapt布局容纳一下.为了实现不足一行时文字水平居中,超出一行时左对齐,需要设置maxWidth.",
whiteSpace: "normal",
height: 50,
width: 500,
textWidth: 200,
textAlign: "center"
}));
items.push(this.createExpander("1.1.2 居中,有宽度和高度,有文字宽度,whiteSpace为nowrap", {
type: "bi.label",
cls: "layout-bg6",
text: "居中,有宽度高度,有文字宽度,whiteSpace为nowrap,maxWidth会限制文字",
whiteSpace: "nowrap",
height: 50,
width: 500,
textWidth: 350,
textAlign: "center"
}));
items.push((this.createExpander("1.2.1 居中,有宽度无高度,有文字宽度,whiteSpace为normal", {
type: "bi.label",
cls: "layout-bg6",
text: "居中,有宽度无高度,有文字宽度,whiteSpace为normal,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数",
whiteSpace: "normal",
width: 500,
textWidth: 200,
textAlign: "center"
})));
items.push((this.createExpander("1.2.1 居中,有宽度无高度,有文字宽度,whiteSpace为normal,高度被父容器拉满", {
type: "bi.absolute",
height: 100,
items: [
{
el: {
type: "bi.label",
cls: "layout-bg6",
text: "此时虽然没有对label设置高度,但由于使用了center_adapt布局,依然会垂直方向居中",
whiteSpace: "normal",
width: 500,
textWidth: 200,
textAlign: "center"
},
top: 0,
left: 0,
bottom: 0
}
]
})));
items.push((this.createExpander("1.2.2 居中,有宽度无高度,有文字宽度,whiteSpace为nowrap", {
type: "bi.label",
cls: "layout-bg6",
text: "居中,有宽度无高度,有文字宽度,whiteSpace为nowrap,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数",
whiteSpace: "nowrap",
width: 500,
textWidth: 350,
textAlign: "center"
})));
items.push((this.createExpander("1.3.1 居中,有宽度和高度,无文字宽度,whiteSpace为normal", {
type: "bi.label",
cls: "layout-bg3",
text: "居中,有宽度高度,无文字宽度,whiteSpace为normal,只需用center_adapt布局包一下即可.度,下即可.居中,有宽度,无文字宽度,whiteSpace为normal居中,有宽度,无文字宽度,下即可.居中,有宽度,无文字宽度,whiteSpace为normal居中,有宽度,无文字宽度,下即可.居中,有宽度,无文字宽度,whiteSpace为normal居中,有宽度,无文字宽度,度,无文字宽度,whiteSpace为normal居中,有宽度,无文字宽度,whiteSpace为normal",
width: 500,
whiteSpace: "normal",
textAlign: "center",
height: 50
})));
items.push((this.createExpander("1.3.2 居中,有宽度无高度,无文字宽度,whiteSpace为normal", {
type: "bi.absolute",
height: 100,
items: [
{
el: {
type: "bi.label",
cls: "layout-bg3",
text: "居中,有宽度无高度,无文字宽度,whiteSpace为normal,只需用center_adapt布局包一下即可.度,下即可.居中,有宽度,无文字宽度,whiteSpace为normal居中,有宽度,无文字宽度,下即可.居中,有宽度,无文字宽度,whiteSpace为normal居中,有宽度,无文字宽度,下即可.居中,有宽度,无文字宽度,whiteSpace为normal居中,有宽度,无文字宽度,度,无文字宽度,whiteSpace为normal居中,有宽度,无文字宽度,whiteSpace为normal",
width: 500,
whiteSpace: "normal",
textAlign: "center"
},
top: 0,
left: 0,
bottom: 0
}
]
})));
items.push((this.createExpander("1.4 居中,有宽度和高度,无文字宽度,whiteSpace为nowrap", {
type: "bi.label",
cls: "layout-bg3",
text: "居中,有宽度500有高度50,无文字宽度,whiteSpace为nowrap,此处无需两层div,设置text即可,然后设置line-height为传入高度即可实现垂直方向居中",
width: 500,
whiteSpace: "nowrap",
textAlign: "center",
height: 50
})));
items.push((this.createExpander("1.5.1 居中,有宽度无高度,无文字宽度,whiteSpace为nowrap", {
type: "bi.label",
cls: "layout-bg3",
text: "居中,有宽度500无高度,无文字宽度,whiteSpace为nowrap,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数",
width: 500,
whiteSpace: "nowrap",
textAlign: "center"
})));
items.push((this.createExpander("1.5.2 居中,有宽度无高度,无文字宽度,whiteSpace为nowrap,高度被父级拉满", {
type: "bi.absolute",
height: 50,
items: [
{
el: {
type: "bi.label",
cls: "layout-bg3",
text: "居中,有宽度500无高度,无文字宽度,whiteSpace为nowrap,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数",
width: 500,
whiteSpace: "nowrap",
textAlign: "center"
},
top: 0,
left: 0,
bottom: 0
}
]
})));
items.push((this.createExpander("1.6.1 居中,无宽度无高度,有文字宽度,whiteSpace为nowrap", {
type: "bi.label",
cls: "layout-bg3",
text: "居中,无宽度,有文字宽度,whiteSpace为nowrap,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数",
textWidth: 500,
whiteSpace: "nowrap",
textAlign: "center"
})));
items.push((this.createExpander("1.6.2 居中,无宽度无高度,有文字宽度,whiteSpace为normal", {
type: "bi.label",
cls: "layout-bg3",
text: "居中,无宽度,有文字宽度,whiteSpace为normal,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数",
textWidth: 500,
whiteSpace: "normal",
textAlign: "center"
})));
items.push((this.createExpander("1.6.3 居中,无宽度无,有文字宽度,whiteSpace为normal,被父级拉满", {
type: "bi.absolute",
height: 100,
items: [
{
el: {
type: "bi.label",
cls: "layout-bg3",
text: "居中,无宽度,有文字宽度,whiteSpace为normal,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数",
textWidth: 500,
whiteSpace: "normal",
textAlign: "center"
},
left: 0,
right: 0,
top: 0,
bottom: 0
}
]
})));
items.push((this.createExpander("1.7.1 居中,无宽度无高度,无文字宽度,whiteSpace为normal", {
type: "bi.label",
cls: "layout-bg3",
text: "居中,无宽度无高度,无文字宽度,whiteSpace为normal,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数",
whiteSpace: "normal",
textAlign: "center"
})));
items.push((this.createExpander("1.7.2 居中,无宽度无高度,无文字宽度,whiteSpace为normal,被父级拉满", {
type: "bi.absolute",
height: 100,
items: [
{
el: {
type: "bi.label",
cls: "layout-bg3",
text: "居中,无宽度无高度,无文字宽度,whiteSpace为normal,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数",
whiteSpace: "normal",
textAlign: "center"
},
left: 0,
right: 0,
top: 0,
bottom: 0
}
]
})));
items.push((this.createExpander("1.7.3 居中,无宽度有高度,无文字宽度,whiteSpace为normal", {
type: "bi.label",
cls: "layout-bg3",
text: "居中,无宽度有高度,无文字宽度,whiteSpace为normal,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数",
whiteSpace: "normal",
height: 50,
textAlign: "center"
})));
items.push((this.createExpander("1.8 居中,无宽度有高度,无文字宽度,whiteSpace为nowrap", {
type: "bi.label",
cls: "layout-bg3",
text: "居中,无宽度有高度,无文字宽度,whiteSpace为nowrap,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数",
whiteSpace: "nowrap",
height: 50,
textAlign: "center"
})));
items.push((this.createExpander("1.9 居中,无宽度无高度,无文字宽度,whiteSpace为nowrap", {
type: "bi.label",
cls: "layout-bg3",
text: "居中,无宽度无高度,无文字宽度,whiteSpace为nowrap,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数",
whiteSpace: "nowrap",
textAlign: "center"
})));
items.push((this.createExpander("1.9.1 居中,无宽度无高度,无文字宽度,whiteSpace为nowrap,高度被父级拉满", {
type: "bi.absolute",
height: 50,
items: [
{
el: {
type: "bi.label",
cls: "layout-bg3",
text: "居中,无宽度无高度,无文字宽度,whiteSpace为nowrap,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数",
whiteSpace: "nowrap",
textAlign: "center"
},
top: 0,
left: 0,
right: 0,
bottom: 0
}
]
})));
items.push((this.createExpander("2.1.1 居左,有宽度有高度,有文字宽度,whiteSpace为normal", {
type: "bi.label",
cls: "layout-bg2",
text: "居左,有宽度有高度,有文字宽度,whiteSpace为normal,为了演示这个是真的是normal的我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数",
whiteSpace: "normal",
textAlign: "left",
textWidth: 300,
height: 50,
width: 500
})));
items.push((this.createExpander("2.1.2 居左,有宽度有高度,有文字宽度,whiteSpace为nowrap", {
type: "bi.label",
cls: "layout-bg2",
text: "居左,有宽度有高度,有文字宽度,whiteSpace为normal,为了演示这个是真的是normal的我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数",
whiteSpace: "nowrap",
textAlign: "left",
textWidth: 300,
height: 50,
width: 500
})));
items.push((this.createExpander("2.2.1 居左,有宽度无高度,有文字宽度,whiteSpace为normal", {
type: "bi.label",
cls: "layout-bg2",
text: "居左,有宽度无高度,有文字宽度,whiteSpace为normal,不设置高度,为了演示这个是真的是normal的我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数",
whiteSpace: "normal",
textAlign: "left",
textWidth: 300,
width: 500
})));
items.push((this.createExpander("2.2.2 居左,有宽度无高度,有文字宽度,whiteSpace为normal,高度被父级拉满", {
type: "bi.absolute",
height: 100,
items: [
{
el: {
type: "bi.label",
cls: "layout-bg2",
text: "居左,有宽度无高度,有文字宽度,whiteSpace为normal,不设置高度,为了演示这个是真的是normal的我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数",
whiteSpace: "normal",
textAlign: "left",
textWidth: 300,
width: 500
},
top: 0,
bottom: 0,
left: 0
}
]
})));
items.push((this.createExpander("2.2.3 居左,有宽度无高度,有文字宽度,whiteSpace为nowrap", {
type: "bi.label",
cls: "layout-bg2",
text: "居左,有宽度无高度,有文字宽度,whiteSpace为nowrap,不设置高度,为了演示这个是真的是normal的我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数",
whiteSpace: "nowrap",
textAlign: "left",
textWidth: 300,
width: 500
})));
items.push((this.createExpander("2.2.4 居左,有宽度无高度,有文字宽度,whiteSpace为nowrap,高度被父级拉满", {
type: "bi.absolute",
height: 100,
items: [
{
el: {
type: "bi.label",
cls: "layout-bg2",
text: "居左,有宽度无高度,有文字宽度,whiteSpace为nowrap,不设置高度,为了演示这个是真的是normal的我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数",
whiteSpace: "nowrap",
textAlign: "left",
textWidth: 300,
width: 500
},
top: 0,
bottom: 0,
left: 0
}
]
})));
items.push((this.createExpander("2.3.1 居左,有宽度有高度,无文字宽度,whiteSpace为nowrap", {
type: "bi.label",
cls: "layout-bg2",
text: "居左,有宽度有高度,无文字宽度,whiteSpace为nowrap,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数",
whiteSpace: "nowrap",
textAlign: "left",
height: 50,
vgap: 5,
width: 500
})));
items.push((this.createExpander("2.3.2 居左,有宽度有高度,无文字宽度,whiteSpace为normal", {
type: "bi.label",
cls: "layout-bg2",
text: "居左,有宽度有高度,无文字宽度,whiteSpace为normal,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数",
whiteSpace: "normal",
textAlign: "left",
height: 50,
width: 500
})));
items.push((this.createExpander("2.4.1 居左,有宽度无高度,无文字宽度,whiteSpace为normal", {
type: "bi.label",
cls: "layout-bg2",
text: "居左,有宽度无高度,无文字宽度,whiteSpace为normal,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数",
whiteSpace: "normal",
textAlign: "left",
width: 500
})));
items.push((this.createExpander("2.4.2 居左,有宽度无高度,无文字宽度,whiteSpace为normal,高度被父级拉满", {
type: "bi.absolute",
height: 100,
items: [
{
el: {
type: "bi.label",
cls: "layout-bg1",
text: "居左,有宽度无高度,无文字宽度,whiteSpace为normal,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数",
whiteSpace: "normal",
textAlign: "left",
width: 500
},
top: 0,
left: 0,
bottom: 0
}
]
})));
items.push((this.createExpander("2.5.1 居左,无宽度无高度,有文字宽度,whiteSpace为normal", {
type: "bi.label",
cls: "layout-bg2",
text: "居左,无宽度无高度,有文字宽度,whiteSpace为normal,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数",
whiteSpace: "normal",
textAlign: "left",
textWidth: 300
})));
items.push((this.createExpander("2.5.2 居左,无宽度无高度,有文字宽度,whiteSpace为normal,高度被父级拉满", {
type: "bi.absolute",
height: 100,
items: [
{
el: {
type: "bi.label",
cls: "layout-bg2",
text: "居左,无宽度无高度,有文字宽度,whiteSpace为normal,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数",
whiteSpace: "normal",
textAlign: "left",
textWidth: 300
},
top: 0,
left: 0,
bottom: 0,
right: 0
}
]
})));
items.push((this.createExpander("2.5.3 居左,无宽度无高度,有文字宽度,whiteSpace为nowrap", {
type: "bi.label",
cls: "layout-bg2",
text: "居左,无宽度无高度,有文字宽度,whiteSpace为normal,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数",
whiteSpace: "nowrap",
textAlign: "left",
textWidth: 300
})));
items.push((this.createExpander("2.5.4 居左,无宽度无高度,有文字宽度,whiteSpace为nowrap,高度被父级拉满", {
type: "bi.absolute",
height: 100,
items: [
{
el: {
type: "bi.label",
cls: "layout-bg2",
text: "居左,无宽度无高度,有文字宽度,whiteSpace为normal,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数",
whiteSpace: "nowrap",
textAlign: "left",
textWidth: 300
},
top: 0,
left: 0,
bottom: 0,
right: 0
}
]
})));
items.push((this.createExpander("2.6.1 居左,无宽度有高度,无文字宽度,whiteSpace为nowrap", {
type: "bi.label",
cls: "layout-bg2",
text: "居左,无宽度有高度,无文字宽度,whiteSpace为nowrap,注意这个是设置了vgap的,为了实现居中,lineHeight要做计算,才能准确的垂直居中",
whiteSpace: "nowrap",
textAlign: "left",
vgap: 10,
height: 50
})));
items.push((this.createExpander("2.6.2 居左,无宽度有高度,无文字宽度,whiteSpace为normal", {
type: "bi.label",
cls: "layout-bg2",
text: "居左,无宽度有高度,无文字宽度,whiteSpace为normal,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数",
whiteSpace: "normal",
textAlign: "left",
height: 50
})));
items.push((this.createExpander("2.7.1 居左,无宽度无高度,无文字宽度,whiteSpace为normal", {
type: "bi.label",
cls: "layout-bg2",
text: "居左,无宽度无高度,无文字宽度,whiteSpace为normal,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,我凑点字数,凑点字数,凑点字数,字数,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数",
whiteSpace: "normal",
textAlign: "left"
})));
items.push((this.createExpander("2.7.2 居左,无宽度无高度,无文字宽度,whiteSpace为normal,高度被父级拉满", {
type: "bi.absolute",
height: 100,
items: [
{
el: {
type: "bi.label",
cls: "layout-bg2",
text: "居左,无宽度无高度,无文字宽度,whiteSpace为normal,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,我凑点字数,凑点字数,凑点字数,字数,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数",
whiteSpace: "normal",
textAlign: "left"
},
top: 0,
left: 0,
bottom: 0,
right: 0
}
]
})));
items.push((this.createExpander("2.7.3 居左,无宽度无高度,无文字宽度,whiteSpace为nowrap", {
type: "bi.label",
cls: "layout-bg2",
text: "居左,无宽度无高度,无文字宽度,whiteSpace为nowrap,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,我凑点字数,凑点字数,凑点字数,字数,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数",
whiteSpace: "nowrap",
textAlign: "left"
})));
items.push((this.createExpander("2.7.4 居左,无宽度无高度,无文字宽度,whiteSpace为nowrap,高度被父级拉满", {
type: "bi.absolute",
height: 100,
items: [
{
el: {
type: "bi.label",
cls: "layout-bg2",
text: "居左,无宽度无高度,无文字宽度,whiteSpace为nowrap,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,我凑点字数,凑点字数,凑点字数,字数,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数",
whiteSpace: "nowrap",
textAlign: "left"
},
top: 0,
left: 0,
bottom: 0,
right: 0
}
]
})));
items.push((this.createExpander("2.8 居左,无宽度无高度,无文字宽度,whiteSpace为nowrap,高度被父级拉满", {
type: "bi.absolute",
height: 100,
items: [
{
el: {
type: "bi.label",
cls: "layout-bg2",
text: "居左,无宽度无高度,无文字宽度,whiteSpace为nowrap,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,我凑点字数,凑点字数,凑点字数,字数,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数",
whiteSpace: "nowrap",
textAlign: "left"
},
top: 0,
left: 0,
bottom: 0,
right: 0
}
]
})));
items.push((this.createExpander("2.8.2 居左,无宽度无高度,无文字宽度,whiteSpace为normal,高度被父级拉满", {
type: "bi.absolute",
height: 100,
items: [
{
el: {
type: "bi.label",
cls: "layout-bg2",
text: "居左,无宽度无高度,无文字宽度,whiteSpace为normal,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,我凑点字数,凑点字数,凑点字数,字数,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数",
whiteSpace: "normal",
textAlign: "left"
},
top: 0,
left: 0,
bottom: 0,
right: 0
}
]
})));
return {
type: "bi.vertical",
items: items,
hgap: 300,
vgap: 20
};
},
createExpander: function (text, popup) {
return {
type: "bi.vertical",
items: [
{
type: "bi.label",
cls: "demo-font-weight-bold",
textAlign: "left",
text: text,
height: 30
}, {
el: popup
}
]
};
}
});
BI.shortcut("demo.label_scene", Demo.LabelScene);Demo.Message = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-bubble"
},
@ -2773,6 +3362,10 @@ BI.shortcut("demo.value_chooser_pane", Demo.ValueChooserPane);Demo.BASE_CONFIG =
pId: 2,
text: "bi.label",
value: "demo.label"
},{
pId: 2,
text: "bi.label_scene",
value: "demo.label_scene"
}, {
pId: 2,
text: "bi.icon_label",
@ -6611,7 +7204,6 @@ BI.shortcut("demo.searcher_view", Demo.Func);Demo.Face = BI.inherit(BI.Widget, {
type: "bi.text_button",
cls: "bi-list-item-active",
text: "测试激活状态",
forceCenter: true
}
}]
};
@ -6633,7 +7225,6 @@ BI.shortcut("demo.searcher_view", Demo.Func);Demo.Face = BI.inherit(BI.Widget, {
type: "bi.text_button",
cls: "bi-list-item-active",
text: "测试选中状态",
forceCenter: true
}
}]
};
@ -6676,7 +7267,6 @@ BI.shortcut("demo.searcher_view", Demo.Func);Demo.Face = BI.inherit(BI.Widget, {
el: {
type: "bi.text_button",
text: "这个按钮是灰化的",
forceCenter: true,
disabled: true
}
}]
@ -6713,7 +7303,6 @@ BI.shortcut("demo.searcher_view", Demo.Func);Demo.Face = BI.inherit(BI.Widget, {
type: "bi.text_button",
cls: "bi-list-item-active",
text: "测试悬浮状态",
forceCenter: true
}
}]
};
@ -6735,7 +7324,6 @@ BI.shortcut("demo.searcher_view", Demo.Func);Demo.Face = BI.inherit(BI.Widget, {
type: "bi.text_button",
cls: "bi-list-item-active",
text: "测试激活状态",
forceCenter: true
}
}]
};
@ -6757,7 +7345,6 @@ BI.shortcut("demo.searcher_view", Demo.Func);Demo.Face = BI.inherit(BI.Widget, {
type: "bi.text_button",
cls: "bi-list-item-active",
text: "测试选中状态",
forceCenter: true
}
}]
};

535
dist/fineui.ie.js vendored

@ -36313,10 +36313,14 @@ BI.Text = BI.inherit(BI.Single, {
if (BI.isNumber(o.lineHeight)) {
this.element.css({lineHeight: o.lineHeight + "px"});
}
if (BI.isWidthOrHeight(o.maxWidth)) {
this.element.css({maxWidth: o.maxWidth});
}
this.element.css({
textAlign: o.textAlign,
whiteSpace: o.whiteSpace,
textOverflow: o.whiteSpace === "nowrap" ? "ellipsis" : ""
textOverflow: o.whiteSpace === "nowrap" ? "ellipsis" : "",
overflow: o.whiteSpace === "nowrap" ? "" : "auto"
});
if (o.handler) {
this.text = BI.createWidget({
@ -43240,7 +43244,6 @@ BI.Button = BI.inherit(BI.BasicButton, {
ghost: false, // 是否幽灵显示, 即正常状态无背景
textAlign: "center",
whiteSpace: "nowrap",
forceCenter: false,
textWidth: null,
textHeight: null,
hgap: props.clear ? 0 : 10,
@ -43294,7 +43297,6 @@ BI.Button = BI.inherit(BI.BasicButton, {
type: "bi.label",
textAlign: o.textAlign,
whiteSpace: o.whiteSpace,
forceCenter: o.forceCenter,
textWidth: o.textWidth,
textHeight: o.textHeight,
hgap: o.hgap,
@ -43377,7 +43379,6 @@ BI.TextButton = BI.inherit(BI.BasicButton, {
baseCls: (conf.baseCls || "") + " bi-text-button",
textAlign: "center",
whiteSpace: "nowrap",
forceCenter: false,
textWidth: null,
textHeight: null,
hgap: 0,
@ -43398,7 +43399,6 @@ BI.TextButton = BI.inherit(BI.BasicButton, {
whiteSpace: o.whiteSpace,
textWidth: o.textWidth,
textHeight: o.textHeight,
forceCenter: o.forceCenter,
width: o.width,
height: o.height,
hgap: o.hgap,
@ -44622,7 +44622,6 @@ BI.Editor = BI.inherit(BI.Single, {
type: "bi.label",
cls: "bi-water-mark",
text: this.options.watermark,
forceCenter: true,
height: o.height - 2 * (o.vgap + o.tgap),
whiteSpace: "nowrap",
textAlign: "left"
@ -46519,7 +46518,6 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
baseCls: (conf.baseCls || "") + " bi-label",
textAlign: "center",
whiteSpace: "nowrap", // normal or nowrap
forceCenter: false, // 是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效
textWidth: null,
textHeight: null,
hgap: 0,
@ -46559,28 +46557,22 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
var json = this._createJson();
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
if (BI.isNumber(o.height) && o.height > 0) {
var gap = (o.width - o.textWidth) / 2;
json.maxWidth = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) { // 1.1
BI.createWidget({
type: "bi.adaptive",
type: "bi.center_adapt",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [
{
el: (this.text = BI.createWidget(json)),
left: gap + o.hgap + o.lgap,
right: gap + o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
el: (this.text = BI.createWidget(json))
}
]
});
this.element.css({"line-height": o.height + "px"});
return;
}
json.width = o.textWidth;
BI.createWidget({
BI.createWidget({ // 1.2
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
@ -46593,16 +46585,18 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
bgap: o.bgap
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
items: [this.text]
});
@ -46612,33 +46606,37 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.absolute",
scrollable: o.whiteSpace === "normal",
this.text = BI.createWidget(BI.extend(json, {
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
}));
return;
}
json.width = o.width - 2 * o.hgap;
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
maxWidth: "100%"
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json))
}]
items: [this.text]
});
return;
}
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
json.maxWidth = o.textWidth;
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
@ -46652,60 +46650,36 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
scrollable: o.whiteSpace === "normal",
bgap: o.bgap
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: true,
element: this,
items: [this.text]
});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.textHeight) && o.textHeight > 0) {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.adaptive",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
return;
}
BI.extend(json, {
this.element.css({
"line-height": o.height + "px"
});
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
});
this.element.css({
"line-height": o.height + "px"
});
this.text = BI.createWidget(BI.extend(json, {
element: this
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
});
return;
}
BI.extend(json, {
@ -46716,22 +46690,14 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
tgap: o.tgap,
bgap: o.bgap
});
if (o.forceCenter) {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
element: this,
items: [this.text]
});
return;
}
this.text = BI.createWidget(BI.extend(json, {
element: this
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
type: "bi.center_adapt",
element: this,
items: [this.text]
});
},
@ -46743,21 +46709,16 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) {
BI.createWidget({
type: "bi.adaptive",
type: "bi.vertical_adapt",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [
{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
el: (this.text = BI.createWidget(json))
}
]
});
this.element.css({"line-height": o.height + "px"});
return;
}
BI.createWidget({
@ -46776,42 +46737,23 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
}
]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
if (BI.isNumber(o.height) && o.height > 0) {
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
element: this,
items: [this.text]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.absolute",
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
bgap: o.bgap
}));
if (o.whiteSpace !== "normal") {
this.element.css({
"line-height": o.height - (o.vgap * 2) + "px"
});
}
return;
}
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap;
@ -46829,7 +46771,6 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
el: (this.text = BI.createWidget(json))
}]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
@ -46850,66 +46791,23 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
}
]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
element: this,
items: [this.text]
});
// 父亲有line-height,而当前label是inline-block,那么他的行高一定是父亲的lineHeight,就算text上设置了line-height
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.textHeight) && o.textHeight > 0) {
if (o.whiteSpace !== "normal") {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.adaptive",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
"line-height": o.height - (o.vgap * 2) + "px"
});
return;
}
BI.extend(json, {
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
});
this.element.css({
"line-height": o.height + "px"
});
this.text = BI.createWidget(BI.extend(json, {
element: this
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
});
return;
}
BI.extend(json, {
@ -46920,23 +46818,14 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
tgap: o.tgap,
bgap: o.bgap
});
if (o.forceCenter) {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
element: this,
items: [this.text]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
this.text = BI.createWidget(BI.extend(json, {
element: this
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
type: "bi.vertical_adapt",
element: this,
items: [this.text]
});
},
@ -47034,7 +46923,6 @@ BI.Label = BI.inherit(BI.Single, {
baseCls: (conf.baseCls || "") + " bi-label",
textAlign: "center",
whiteSpace: "nowrap", // normal or nowrap
forceCenter: false, // 是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效
textWidth: null,
textHeight: null,
hgap: 0,
@ -47081,29 +46969,22 @@ BI.Label = BI.inherit(BI.Single, {
json.textAlign = "left";
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
if (BI.isNumber(o.height) && o.height > 0) {
var gap = (o.width - o.textWidth) / 2;
json.maxWidth = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) { // 1.1
BI.createWidget({
type: "bi.adaptive",
type: "bi.center_adapt",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [
{
el: (this.text = BI.createWidget(json)),
left: gap + o.hgap + o.lgap,
right: gap + o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
el: (this.text = BI.createWidget(json))
}
]
});
this.element.css({"line-height": o.height + "px"});
return;
}
json.width = o.textWidth;
json.textAlign = o.textAlign;
BI.createWidget({
BI.createWidget({ // 1.2
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
@ -47115,7 +46996,7 @@ BI.Label = BI.inherit(BI.Single, {
});
return;
}
if (o.whiteSpace == "normal") {
if (o.whiteSpace == "normal") { // 1.3
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
@ -47133,39 +47014,42 @@ BI.Label = BI.inherit(BI.Single, {
});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.height) && o.height > 0) { // 1.4
this.element.css({
"line-height": o.height + "px"
});
json.textAlign = o.textAlign;
BI.createWidget({
type: "bi.absolute",
scrollable: o.whiteSpace === "normal",
this.text = BI.createWidget(BI.extend(json, {
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
}));
return;
}
json.width = o.width - 2 * o.hgap;
json.textAlign = o.textAlign;
BI.extend(json, { // 1.5
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
maxWidth: "100%"
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json))
}]
items: [this.text]
});
return;
}
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.textWidth) && o.textWidth > 0) { // 1.6
json.maxWidth = o.textWidth;
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
@ -47178,7 +47062,7 @@ BI.Label = BI.inherit(BI.Single, {
});
return;
}
if (o.whiteSpace == "normal") {
if (o.whiteSpace == "normal") { // 1.7
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
@ -47190,54 +47074,26 @@ BI.Label = BI.inherit(BI.Single, {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
scrollable: true,
element: this,
items: [this.text]
});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.textHeight) && o.textHeight > 0) {
this.element.css({
"line-height": o.height + "px"
});
json.textAlign = o.textAlign;
BI.createWidget({
type: "bi.adaptive",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
return;
}
BI.extend(json, {
if (BI.isNumber(o.height) && o.height > 0) { // 1.8
this.element.css({
"line-height": o.height + "px"
});
json.textAlign = o.textAlign;
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
});
this.element.css({
"line-height": o.height + "px"
});
// 能走到这边,说明这个text不需要换行,并且不会做任何布局包装,那么这时候就该是什么align是什么align
json.textAlign = o.textAlign;
this.text = BI.createWidget(BI.extend(json, {
element: this
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
});
return;
}
BI.extend(json, {
@ -47248,24 +47104,14 @@ BI.Label = BI.inherit(BI.Single, {
tgap: o.tgap,
bgap: o.bgap
});
if (o.forceCenter) {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
element: this,
items: [this.text]
});
return;
}
// 能走到这边,说明这个text不需要换行,并且不会做任何布局包装,那么这时候就该是什么align是什么align
json.textAlign = o.textAlign;
this.text = BI.createWidget(BI.extend(json, {
element: this
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
type: "bi.center_adapt",
element: this,
items: [this.text]
});
},
@ -47275,26 +47121,21 @@ BI.Label = BI.inherit(BI.Single, {
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.height) && o.height > 0) { // 2.1
BI.createWidget({
type: "bi.adaptive",
type: "bi.vertical_adapt",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [
{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
el: (this.text = BI.createWidget(json))
}
]
});
this.element.css({"line-height": o.height + "px"});
return;
}
BI.createWidget({
BI.createWidget({ // 2.2
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
@ -47310,46 +47151,27 @@ BI.Label = BI.inherit(BI.Single, {
}
]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
if (BI.isNumber(o.height) && o.height > 0) { // 2.3
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
element: this,
items: [this.text]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.absolute",
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
bgap: o.bgap
}));
if (o.whiteSpace !== "normal") {
this.element.css({
"line-height": o.height - (o.vgap * 2) + "px"
});
}
return;
}
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap;
BI.createWidget({
BI.createWidget({ // 2.4
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
@ -47363,12 +47185,11 @@ BI.Label = BI.inherit(BI.Single, {
el: (this.text = BI.createWidget(json))
}]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
BI.createWidget({
BI.createWidget({ // 2.5
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
@ -47384,66 +47205,23 @@ BI.Label = BI.inherit(BI.Single, {
}
]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
element: this,
items: [this.text]
});
// 父亲有line-height,而当前label是inline-block,那么他的行高一定是父亲的lineHeight,就算text上设置了line-height
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.textHeight) && o.textHeight > 0) {
if (o.whiteSpace !== "normal") {
this.element.css({
"line-height": o.height + "px"
"line-height": o.height - (o.vgap * 2) + "px"
});
BI.createWidget({
type: "bi.adaptive",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
return;
}
BI.extend(json, {
this.text = BI.createWidget(BI.extend(json, { // 2.6
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
});
this.element.css({
"line-height": o.height + "px"
});
this.text = BI.createWidget(BI.extend(json, {
element: this
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
});
return;
}
BI.extend(json, {
@ -47454,23 +47232,14 @@ BI.Label = BI.inherit(BI.Single, {
tgap: o.tgap,
bgap: o.bgap
});
if (o.forceCenter) {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
element: this,
items: [this.text]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
this.text = BI.createWidget(BI.extend(json, {
element: this
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
type: "bi.vertical_adapt",
element: this,
items: [this.text]
});
},
@ -61437,7 +61206,6 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
var self = this, opts = this.options;
this.cancelButton = BI.createWidget({
type: "bi.text_button",
forceCenter: true,
cls: "multidate-popup-button bi-border-top bi-border-right",
shadow: true,
text: BI.i18nText("BI-Basic_Cancel")
@ -61448,7 +61216,6 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
this.okButton = BI.createWidget({
type: "bi.text_button",
forceCenter: true,
cls: "multidate-popup-button bi-border-top",
shadow: true,
text: BI.i18nText("BI-Basic_OK")
@ -63410,7 +63177,6 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
shadow: true,
text: BI.i18nText("BI-Basic_Clear"),
@ -63423,7 +63189,6 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
shadow: true,
textHeight: c.buttonHeight - 1,
@ -63439,7 +63204,6 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -64255,7 +64019,6 @@ BI.extend(BI.DynamicDateTimeCombo, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -64268,7 +64031,6 @@ BI.extend(BI.DynamicDateTimeCombo, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -64284,7 +64046,6 @@ BI.extend(BI.DynamicDateTimeCombo, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -80721,7 +80482,6 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
shadow: true,
text: BI.i18nText("BI-Basic_Clears"),
@ -80733,7 +80493,6 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
shadow: true,
text: BI.i18nText("BI-Basic_Now"),
@ -80745,7 +80504,6 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
shadow: true,
text: BI.i18nText("BI-Basic_OK"),
@ -82064,7 +81822,6 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -82077,7 +81834,6 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
textHeight: c.buttonHeight - 1,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
shadow: true,
@ -82093,7 +81849,6 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -82822,7 +82577,6 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -82835,7 +82589,6 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -82851,7 +82604,6 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -83825,7 +83577,6 @@ BI.extend(BI.DynamicYearQuarterCombo, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
shadow: true,
textHeight: c.buttonHeight - 1,
@ -83838,7 +83589,6 @@ BI.extend(BI.DynamicYearQuarterCombo, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -83854,7 +83604,6 @@ BI.extend(BI.DynamicYearQuarterCombo, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
shadow: true,
textHeight: c.buttonHeight - 1,

60
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

535
dist/fineui.js vendored

@ -36717,10 +36717,14 @@ BI.Text = BI.inherit(BI.Single, {
if (BI.isNumber(o.lineHeight)) {
this.element.css({lineHeight: o.lineHeight + "px"});
}
if (BI.isWidthOrHeight(o.maxWidth)) {
this.element.css({maxWidth: o.maxWidth});
}
this.element.css({
textAlign: o.textAlign,
whiteSpace: o.whiteSpace,
textOverflow: o.whiteSpace === "nowrap" ? "ellipsis" : ""
textOverflow: o.whiteSpace === "nowrap" ? "ellipsis" : "",
overflow: o.whiteSpace === "nowrap" ? "" : "auto"
});
if (o.handler) {
this.text = BI.createWidget({
@ -43644,7 +43648,6 @@ BI.Button = BI.inherit(BI.BasicButton, {
ghost: false, // 是否幽灵显示, 即正常状态无背景
textAlign: "center",
whiteSpace: "nowrap",
forceCenter: false,
textWidth: null,
textHeight: null,
hgap: props.clear ? 0 : 10,
@ -43698,7 +43701,6 @@ BI.Button = BI.inherit(BI.BasicButton, {
type: "bi.label",
textAlign: o.textAlign,
whiteSpace: o.whiteSpace,
forceCenter: o.forceCenter,
textWidth: o.textWidth,
textHeight: o.textHeight,
hgap: o.hgap,
@ -43781,7 +43783,6 @@ BI.TextButton = BI.inherit(BI.BasicButton, {
baseCls: (conf.baseCls || "") + " bi-text-button",
textAlign: "center",
whiteSpace: "nowrap",
forceCenter: false,
textWidth: null,
textHeight: null,
hgap: 0,
@ -43802,7 +43803,6 @@ BI.TextButton = BI.inherit(BI.BasicButton, {
whiteSpace: o.whiteSpace,
textWidth: o.textWidth,
textHeight: o.textHeight,
forceCenter: o.forceCenter,
width: o.width,
height: o.height,
hgap: o.hgap,
@ -45026,7 +45026,6 @@ BI.Editor = BI.inherit(BI.Single, {
type: "bi.label",
cls: "bi-water-mark",
text: this.options.watermark,
forceCenter: true,
height: o.height - 2 * (o.vgap + o.tgap),
whiteSpace: "nowrap",
textAlign: "left"
@ -46923,7 +46922,6 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
baseCls: (conf.baseCls || "") + " bi-label",
textAlign: "center",
whiteSpace: "nowrap", // normal or nowrap
forceCenter: false, // 是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效
textWidth: null,
textHeight: null,
hgap: 0,
@ -46963,28 +46961,22 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
var json = this._createJson();
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
if (BI.isNumber(o.height) && o.height > 0) {
var gap = (o.width - o.textWidth) / 2;
json.maxWidth = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) { // 1.1
BI.createWidget({
type: "bi.adaptive",
type: "bi.center_adapt",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [
{
el: (this.text = BI.createWidget(json)),
left: gap + o.hgap + o.lgap,
right: gap + o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
el: (this.text = BI.createWidget(json))
}
]
});
this.element.css({"line-height": o.height + "px"});
return;
}
json.width = o.textWidth;
BI.createWidget({
BI.createWidget({ // 1.2
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
@ -46997,16 +46989,18 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
bgap: o.bgap
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
items: [this.text]
});
@ -47016,33 +47010,37 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.absolute",
scrollable: o.whiteSpace === "normal",
this.text = BI.createWidget(BI.extend(json, {
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
}));
return;
}
json.width = o.width - 2 * o.hgap;
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
maxWidth: "100%"
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json))
}]
items: [this.text]
});
return;
}
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
json.maxWidth = o.textWidth;
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
@ -47056,60 +47054,36 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
scrollable: o.whiteSpace === "normal",
bgap: o.bgap
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: true,
element: this,
items: [this.text]
});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.textHeight) && o.textHeight > 0) {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.adaptive",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
return;
}
BI.extend(json, {
this.element.css({
"line-height": o.height + "px"
});
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
});
this.element.css({
"line-height": o.height + "px"
});
this.text = BI.createWidget(BI.extend(json, {
element: this
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
});
return;
}
BI.extend(json, {
@ -47120,22 +47094,14 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
tgap: o.tgap,
bgap: o.bgap
});
if (o.forceCenter) {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
element: this,
items: [this.text]
});
return;
}
this.text = BI.createWidget(BI.extend(json, {
element: this
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
type: "bi.center_adapt",
element: this,
items: [this.text]
});
},
@ -47147,21 +47113,16 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) {
BI.createWidget({
type: "bi.adaptive",
type: "bi.vertical_adapt",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [
{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
el: (this.text = BI.createWidget(json))
}
]
});
this.element.css({"line-height": o.height + "px"});
return;
}
BI.createWidget({
@ -47180,42 +47141,23 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
}
]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
if (BI.isNumber(o.height) && o.height > 0) {
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
element: this,
items: [this.text]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.absolute",
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
bgap: o.bgap
}));
if (o.whiteSpace !== "normal") {
this.element.css({
"line-height": o.height - (o.vgap * 2) + "px"
});
}
return;
}
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap;
@ -47233,7 +47175,6 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
el: (this.text = BI.createWidget(json))
}]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
@ -47254,66 +47195,23 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
}
]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
element: this,
items: [this.text]
});
// 父亲有line-height,而当前label是inline-block,那么他的行高一定是父亲的lineHeight,就算text上设置了line-height
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.textHeight) && o.textHeight > 0) {
if (o.whiteSpace !== "normal") {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.adaptive",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
"line-height": o.height - (o.vgap * 2) + "px"
});
return;
}
BI.extend(json, {
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
});
this.element.css({
"line-height": o.height + "px"
});
this.text = BI.createWidget(BI.extend(json, {
element: this
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
});
return;
}
BI.extend(json, {
@ -47324,23 +47222,14 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
tgap: o.tgap,
bgap: o.bgap
});
if (o.forceCenter) {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
element: this,
items: [this.text]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
this.text = BI.createWidget(BI.extend(json, {
element: this
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
type: "bi.vertical_adapt",
element: this,
items: [this.text]
});
},
@ -47438,7 +47327,6 @@ BI.Label = BI.inherit(BI.Single, {
baseCls: (conf.baseCls || "") + " bi-label",
textAlign: "center",
whiteSpace: "nowrap", // normal or nowrap
forceCenter: false, // 是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效
textWidth: null,
textHeight: null,
hgap: 0,
@ -47485,29 +47373,22 @@ BI.Label = BI.inherit(BI.Single, {
json.textAlign = "left";
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
if (BI.isNumber(o.height) && o.height > 0) {
var gap = (o.width - o.textWidth) / 2;
json.maxWidth = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) { // 1.1
BI.createWidget({
type: "bi.adaptive",
type: "bi.center_adapt",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [
{
el: (this.text = BI.createWidget(json)),
left: gap + o.hgap + o.lgap,
right: gap + o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
el: (this.text = BI.createWidget(json))
}
]
});
this.element.css({"line-height": o.height + "px"});
return;
}
json.width = o.textWidth;
json.textAlign = o.textAlign;
BI.createWidget({
BI.createWidget({ // 1.2
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
@ -47519,7 +47400,7 @@ BI.Label = BI.inherit(BI.Single, {
});
return;
}
if (o.whiteSpace == "normal") {
if (o.whiteSpace == "normal") { // 1.3
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
@ -47537,39 +47418,42 @@ BI.Label = BI.inherit(BI.Single, {
});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.height) && o.height > 0) { // 1.4
this.element.css({
"line-height": o.height + "px"
});
json.textAlign = o.textAlign;
BI.createWidget({
type: "bi.absolute",
scrollable: o.whiteSpace === "normal",
this.text = BI.createWidget(BI.extend(json, {
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
}));
return;
}
json.width = o.width - 2 * o.hgap;
json.textAlign = o.textAlign;
BI.extend(json, { // 1.5
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
maxWidth: "100%"
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json))
}]
items: [this.text]
});
return;
}
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.textWidth) && o.textWidth > 0) { // 1.6
json.maxWidth = o.textWidth;
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
@ -47582,7 +47466,7 @@ BI.Label = BI.inherit(BI.Single, {
});
return;
}
if (o.whiteSpace == "normal") {
if (o.whiteSpace == "normal") { // 1.7
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
@ -47594,54 +47478,26 @@ BI.Label = BI.inherit(BI.Single, {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
scrollable: true,
element: this,
items: [this.text]
});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.textHeight) && o.textHeight > 0) {
this.element.css({
"line-height": o.height + "px"
});
json.textAlign = o.textAlign;
BI.createWidget({
type: "bi.adaptive",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
return;
}
BI.extend(json, {
if (BI.isNumber(o.height) && o.height > 0) { // 1.8
this.element.css({
"line-height": o.height + "px"
});
json.textAlign = o.textAlign;
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
});
this.element.css({
"line-height": o.height + "px"
});
// 能走到这边,说明这个text不需要换行,并且不会做任何布局包装,那么这时候就该是什么align是什么align
json.textAlign = o.textAlign;
this.text = BI.createWidget(BI.extend(json, {
element: this
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
});
return;
}
BI.extend(json, {
@ -47652,24 +47508,14 @@ BI.Label = BI.inherit(BI.Single, {
tgap: o.tgap,
bgap: o.bgap
});
if (o.forceCenter) {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
element: this,
items: [this.text]
});
return;
}
// 能走到这边,说明这个text不需要换行,并且不会做任何布局包装,那么这时候就该是什么align是什么align
json.textAlign = o.textAlign;
this.text = BI.createWidget(BI.extend(json, {
element: this
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
type: "bi.center_adapt",
element: this,
items: [this.text]
});
},
@ -47679,26 +47525,21 @@ BI.Label = BI.inherit(BI.Single, {
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.height) && o.height > 0) { // 2.1
BI.createWidget({
type: "bi.adaptive",
type: "bi.vertical_adapt",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [
{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
el: (this.text = BI.createWidget(json))
}
]
});
this.element.css({"line-height": o.height + "px"});
return;
}
BI.createWidget({
BI.createWidget({ // 2.2
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
@ -47714,46 +47555,27 @@ BI.Label = BI.inherit(BI.Single, {
}
]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
if (BI.isNumber(o.height) && o.height > 0) { // 2.3
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
element: this,
items: [this.text]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.absolute",
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
bgap: o.bgap
}));
if (o.whiteSpace !== "normal") {
this.element.css({
"line-height": o.height - (o.vgap * 2) + "px"
});
}
return;
}
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap;
BI.createWidget({
BI.createWidget({ // 2.4
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
@ -47767,12 +47589,11 @@ BI.Label = BI.inherit(BI.Single, {
el: (this.text = BI.createWidget(json))
}]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
BI.createWidget({
BI.createWidget({ // 2.5
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
@ -47788,66 +47609,23 @@ BI.Label = BI.inherit(BI.Single, {
}
]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
element: this,
items: [this.text]
});
// 父亲有line-height,而当前label是inline-block,那么他的行高一定是父亲的lineHeight,就算text上设置了line-height
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.textHeight) && o.textHeight > 0) {
if (o.whiteSpace !== "normal") {
this.element.css({
"line-height": o.height + "px"
"line-height": o.height - (o.vgap * 2) + "px"
});
BI.createWidget({
type: "bi.adaptive",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
return;
}
BI.extend(json, {
this.text = BI.createWidget(BI.extend(json, { // 2.6
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
});
this.element.css({
"line-height": o.height + "px"
});
this.text = BI.createWidget(BI.extend(json, {
element: this
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
});
return;
}
BI.extend(json, {
@ -47858,23 +47636,14 @@ BI.Label = BI.inherit(BI.Single, {
tgap: o.tgap,
bgap: o.bgap
});
if (o.forceCenter) {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
element: this,
items: [this.text]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
this.text = BI.createWidget(BI.extend(json, {
element: this
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
type: "bi.vertical_adapt",
element: this,
items: [this.text]
});
},
@ -61841,7 +61610,6 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
var self = this, opts = this.options;
this.cancelButton = BI.createWidget({
type: "bi.text_button",
forceCenter: true,
cls: "multidate-popup-button bi-border-top bi-border-right",
shadow: true,
text: BI.i18nText("BI-Basic_Cancel")
@ -61852,7 +61620,6 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
this.okButton = BI.createWidget({
type: "bi.text_button",
forceCenter: true,
cls: "multidate-popup-button bi-border-top",
shadow: true,
text: BI.i18nText("BI-Basic_OK")
@ -63814,7 +63581,6 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
shadow: true,
text: BI.i18nText("BI-Basic_Clear"),
@ -63827,7 +63593,6 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
shadow: true,
textHeight: c.buttonHeight - 1,
@ -63843,7 +63608,6 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -64659,7 +64423,6 @@ BI.extend(BI.DynamicDateTimeCombo, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -64672,7 +64435,6 @@ BI.extend(BI.DynamicDateTimeCombo, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -64688,7 +64450,6 @@ BI.extend(BI.DynamicDateTimeCombo, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -81125,7 +80886,6 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
shadow: true,
text: BI.i18nText("BI-Basic_Clears"),
@ -81137,7 +80897,6 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
shadow: true,
text: BI.i18nText("BI-Basic_Now"),
@ -81149,7 +80908,6 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
shadow: true,
text: BI.i18nText("BI-Basic_OK"),
@ -82468,7 +82226,6 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -82481,7 +82238,6 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
textHeight: c.buttonHeight - 1,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
shadow: true,
@ -82497,7 +82253,6 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -83226,7 +82981,6 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -83239,7 +82993,6 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -83255,7 +83008,6 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -84229,7 +83981,6 @@ BI.extend(BI.DynamicYearQuarterCombo, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
shadow: true,
textHeight: c.buttonHeight - 1,
@ -84242,7 +83993,6 @@ BI.extend(BI.DynamicYearQuarterCombo, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -84258,7 +84008,6 @@ BI.extend(BI.DynamicYearQuarterCombo, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
shadow: true,
textHeight: c.buttonHeight - 1,

60
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

535
dist/fineui_without_jquery_polyfill.js vendored

@ -25148,10 +25148,14 @@ BI.Text = BI.inherit(BI.Single, {
if (BI.isNumber(o.lineHeight)) {
this.element.css({lineHeight: o.lineHeight + "px"});
}
if (BI.isWidthOrHeight(o.maxWidth)) {
this.element.css({maxWidth: o.maxWidth});
}
this.element.css({
textAlign: o.textAlign,
whiteSpace: o.whiteSpace,
textOverflow: o.whiteSpace === "nowrap" ? "ellipsis" : ""
textOverflow: o.whiteSpace === "nowrap" ? "ellipsis" : "",
overflow: o.whiteSpace === "nowrap" ? "" : "auto"
});
if (o.handler) {
this.text = BI.createWidget({
@ -30823,7 +30827,6 @@ BI.Button = BI.inherit(BI.BasicButton, {
ghost: false, // 是否幽灵显示, 即正常状态无背景
textAlign: "center",
whiteSpace: "nowrap",
forceCenter: false,
textWidth: null,
textHeight: null,
hgap: props.clear ? 0 : 10,
@ -30877,7 +30880,6 @@ BI.Button = BI.inherit(BI.BasicButton, {
type: "bi.label",
textAlign: o.textAlign,
whiteSpace: o.whiteSpace,
forceCenter: o.forceCenter,
textWidth: o.textWidth,
textHeight: o.textHeight,
hgap: o.hgap,
@ -30960,7 +30962,6 @@ BI.TextButton = BI.inherit(BI.BasicButton, {
baseCls: (conf.baseCls || "") + " bi-text-button",
textAlign: "center",
whiteSpace: "nowrap",
forceCenter: false,
textWidth: null,
textHeight: null,
hgap: 0,
@ -30981,7 +30982,6 @@ BI.TextButton = BI.inherit(BI.BasicButton, {
whiteSpace: o.whiteSpace,
textWidth: o.textWidth,
textHeight: o.textHeight,
forceCenter: o.forceCenter,
width: o.width,
height: o.height,
hgap: o.hgap,
@ -32205,7 +32205,6 @@ BI.Editor = BI.inherit(BI.Single, {
type: "bi.label",
cls: "bi-water-mark",
text: this.options.watermark,
forceCenter: true,
height: o.height - 2 * (o.vgap + o.tgap),
whiteSpace: "nowrap",
textAlign: "left"
@ -33477,7 +33476,6 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
baseCls: (conf.baseCls || "") + " bi-label",
textAlign: "center",
whiteSpace: "nowrap", // normal or nowrap
forceCenter: false, // 是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效
textWidth: null,
textHeight: null,
hgap: 0,
@ -33517,28 +33515,22 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
var json = this._createJson();
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
if (BI.isNumber(o.height) && o.height > 0) {
var gap = (o.width - o.textWidth) / 2;
json.maxWidth = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) { // 1.1
BI.createWidget({
type: "bi.adaptive",
type: "bi.center_adapt",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [
{
el: (this.text = BI.createWidget(json)),
left: gap + o.hgap + o.lgap,
right: gap + o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
el: (this.text = BI.createWidget(json))
}
]
});
this.element.css({"line-height": o.height + "px"});
return;
}
json.width = o.textWidth;
BI.createWidget({
BI.createWidget({ // 1.2
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
@ -33551,16 +33543,18 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
bgap: o.bgap
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
items: [this.text]
});
@ -33570,33 +33564,37 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.absolute",
scrollable: o.whiteSpace === "normal",
this.text = BI.createWidget(BI.extend(json, {
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
}));
return;
}
json.width = o.width - 2 * o.hgap;
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
maxWidth: "100%"
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json))
}]
items: [this.text]
});
return;
}
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
json.maxWidth = o.textWidth;
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
@ -33610,60 +33608,36 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
scrollable: o.whiteSpace === "normal",
bgap: o.bgap
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: true,
element: this,
items: [this.text]
});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.textHeight) && o.textHeight > 0) {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.adaptive",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
return;
}
BI.extend(json, {
this.element.css({
"line-height": o.height + "px"
});
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
});
this.element.css({
"line-height": o.height + "px"
});
this.text = BI.createWidget(BI.extend(json, {
element: this
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
});
return;
}
BI.extend(json, {
@ -33674,22 +33648,14 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
tgap: o.tgap,
bgap: o.bgap
});
if (o.forceCenter) {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
element: this,
items: [this.text]
});
return;
}
this.text = BI.createWidget(BI.extend(json, {
element: this
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
type: "bi.center_adapt",
element: this,
items: [this.text]
});
},
@ -33701,21 +33667,16 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) {
BI.createWidget({
type: "bi.adaptive",
type: "bi.vertical_adapt",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [
{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
el: (this.text = BI.createWidget(json))
}
]
});
this.element.css({"line-height": o.height + "px"});
return;
}
BI.createWidget({
@ -33734,42 +33695,23 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
}
]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
if (BI.isNumber(o.height) && o.height > 0) {
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
element: this,
items: [this.text]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.absolute",
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
bgap: o.bgap
}));
if (o.whiteSpace !== "normal") {
this.element.css({
"line-height": o.height - (o.vgap * 2) + "px"
});
}
return;
}
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap;
@ -33787,7 +33729,6 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
el: (this.text = BI.createWidget(json))
}]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
@ -33808,66 +33749,23 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
}
]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
element: this,
items: [this.text]
});
// 父亲有line-height,而当前label是inline-block,那么他的行高一定是父亲的lineHeight,就算text上设置了line-height
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.textHeight) && o.textHeight > 0) {
if (o.whiteSpace !== "normal") {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.adaptive",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
"line-height": o.height - (o.vgap * 2) + "px"
});
return;
}
BI.extend(json, {
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
});
this.element.css({
"line-height": o.height + "px"
});
this.text = BI.createWidget(BI.extend(json, {
element: this
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
});
return;
}
BI.extend(json, {
@ -33878,23 +33776,14 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
tgap: o.tgap,
bgap: o.bgap
});
if (o.forceCenter) {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
element: this,
items: [this.text]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
this.text = BI.createWidget(BI.extend(json, {
element: this
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
type: "bi.vertical_adapt",
element: this,
items: [this.text]
});
},
@ -33992,7 +33881,6 @@ BI.Label = BI.inherit(BI.Single, {
baseCls: (conf.baseCls || "") + " bi-label",
textAlign: "center",
whiteSpace: "nowrap", // normal or nowrap
forceCenter: false, // 是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效
textWidth: null,
textHeight: null,
hgap: 0,
@ -34039,29 +33927,22 @@ BI.Label = BI.inherit(BI.Single, {
json.textAlign = "left";
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
if (BI.isNumber(o.height) && o.height > 0) {
var gap = (o.width - o.textWidth) / 2;
json.maxWidth = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) { // 1.1
BI.createWidget({
type: "bi.adaptive",
type: "bi.center_adapt",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [
{
el: (this.text = BI.createWidget(json)),
left: gap + o.hgap + o.lgap,
right: gap + o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
el: (this.text = BI.createWidget(json))
}
]
});
this.element.css({"line-height": o.height + "px"});
return;
}
json.width = o.textWidth;
json.textAlign = o.textAlign;
BI.createWidget({
BI.createWidget({ // 1.2
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
@ -34073,7 +33954,7 @@ BI.Label = BI.inherit(BI.Single, {
});
return;
}
if (o.whiteSpace == "normal") {
if (o.whiteSpace == "normal") { // 1.3
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
@ -34091,39 +33972,42 @@ BI.Label = BI.inherit(BI.Single, {
});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.height) && o.height > 0) { // 1.4
this.element.css({
"line-height": o.height + "px"
});
json.textAlign = o.textAlign;
BI.createWidget({
type: "bi.absolute",
scrollable: o.whiteSpace === "normal",
this.text = BI.createWidget(BI.extend(json, {
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
}));
return;
}
json.width = o.width - 2 * o.hgap;
json.textAlign = o.textAlign;
BI.extend(json, { // 1.5
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
maxWidth: "100%"
});
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json))
}]
items: [this.text]
});
return;
}
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.textWidth) && o.textWidth > 0) { // 1.6
json.maxWidth = o.textWidth;
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
@ -34136,7 +34020,7 @@ BI.Label = BI.inherit(BI.Single, {
});
return;
}
if (o.whiteSpace == "normal") {
if (o.whiteSpace == "normal") { // 1.7
BI.extend(json, {
hgap: o.hgap,
vgap: o.vgap,
@ -34148,54 +34032,26 @@ BI.Label = BI.inherit(BI.Single, {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
scrollable: o.whiteSpace === "normal",
scrollable: true,
element: this,
items: [this.text]
});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.textHeight) && o.textHeight > 0) {
this.element.css({
"line-height": o.height + "px"
});
json.textAlign = o.textAlign;
BI.createWidget({
type: "bi.adaptive",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
return;
}
BI.extend(json, {
if (BI.isNumber(o.height) && o.height > 0) { // 1.8
this.element.css({
"line-height": o.height + "px"
});
json.textAlign = o.textAlign;
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
});
this.element.css({
"line-height": o.height + "px"
});
// 能走到这边,说明这个text不需要换行,并且不会做任何布局包装,那么这时候就该是什么align是什么align
json.textAlign = o.textAlign;
this.text = BI.createWidget(BI.extend(json, {
element: this
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
});
return;
}
BI.extend(json, {
@ -34206,24 +34062,14 @@ BI.Label = BI.inherit(BI.Single, {
tgap: o.tgap,
bgap: o.bgap
});
if (o.forceCenter) {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.center_adapt",
element: this,
items: [this.text]
});
return;
}
// 能走到这边,说明这个text不需要换行,并且不会做任何布局包装,那么这时候就该是什么align是什么align
json.textAlign = o.textAlign;
this.text = BI.createWidget(BI.extend(json, {
element: this
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
type: "bi.center_adapt",
element: this,
items: [this.text]
});
},
@ -34233,26 +34079,21 @@ BI.Label = BI.inherit(BI.Single, {
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.height) && o.height > 0) { // 2.1
BI.createWidget({
type: "bi.adaptive",
type: "bi.vertical_adapt",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [
{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
el: (this.text = BI.createWidget(json))
}
]
});
this.element.css({"line-height": o.height + "px"});
return;
}
BI.createWidget({
BI.createWidget({ // 2.2
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
@ -34268,46 +34109,27 @@ BI.Label = BI.inherit(BI.Single, {
}
]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
if (BI.isNumber(o.height) && o.height > 0) { // 2.3
this.text = BI.createWidget(BI.extend(json, {
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
element: this,
items: [this.text]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
this.element.css({
"line-height": o.height + "px"
});
BI.createWidget({
type: "bi.absolute",
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
bgap: o.bgap
}));
if (o.whiteSpace !== "normal") {
this.element.css({
"line-height": o.height - (o.vgap * 2) + "px"
});
}
return;
}
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap;
BI.createWidget({
BI.createWidget({ // 2.4
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
@ -34321,12 +34143,11 @@ BI.Label = BI.inherit(BI.Single, {
el: (this.text = BI.createWidget(json))
}]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
BI.createWidget({
BI.createWidget({ // 2.5
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
@ -34342,66 +34163,23 @@ BI.Label = BI.inherit(BI.Single, {
}
]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
element: this,
items: [this.text]
});
// 父亲有line-height,而当前label是inline-block,那么他的行高一定是父亲的lineHeight,就算text上设置了line-height
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
if (BI.isNumber(o.textHeight) && o.textHeight > 0) {
if (o.whiteSpace !== "normal") {
this.element.css({
"line-height": o.height + "px"
"line-height": o.height - (o.vgap * 2) + "px"
});
BI.createWidget({
type: "bi.adaptive",
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
items: [{
el: (this.text = BI.createWidget(json)),
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
top: o.vgap + o.tgap,
bottom: o.vgap + o.bgap
}]
});
return;
}
BI.extend(json, {
this.text = BI.createWidget(BI.extend(json, { // 2.6
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
});
this.element.css({
"line-height": o.height + "px"
});
this.text = BI.createWidget(BI.extend(json, {
element: this
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
});
return;
}
BI.extend(json, {
@ -34412,23 +34190,14 @@ BI.Label = BI.inherit(BI.Single, {
tgap: o.tgap,
bgap: o.bgap
});
if (o.forceCenter) {
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
element: this,
items: [this.text]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
this.text = BI.createWidget(BI.extend(json, {
element: this
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
type: "bi.vertical_adapt",
element: this,
items: [this.text]
});
},
@ -44233,7 +44002,6 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
var self = this, opts = this.options;
this.cancelButton = BI.createWidget({
type: "bi.text_button",
forceCenter: true,
cls: "multidate-popup-button bi-border-top bi-border-right",
shadow: true,
text: BI.i18nText("BI-Basic_Cancel")
@ -44244,7 +44012,6 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
this.okButton = BI.createWidget({
type: "bi.text_button",
forceCenter: true,
cls: "multidate-popup-button bi-border-top",
shadow: true,
text: BI.i18nText("BI-Basic_OK")
@ -46206,7 +45973,6 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
shadow: true,
text: BI.i18nText("BI-Basic_Clear"),
@ -46219,7 +45985,6 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
shadow: true,
textHeight: c.buttonHeight - 1,
@ -46235,7 +46000,6 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -47051,7 +46815,6 @@ BI.extend(BI.DynamicDateTimeCombo, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -47064,7 +46827,6 @@ BI.extend(BI.DynamicDateTimeCombo, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -47080,7 +46842,6 @@ BI.extend(BI.DynamicDateTimeCombo, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -63517,7 +63278,6 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
shadow: true,
text: BI.i18nText("BI-Basic_Clears"),
@ -63529,7 +63289,6 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
shadow: true,
text: BI.i18nText("BI-Basic_Now"),
@ -63541,7 +63300,6 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
shadow: true,
text: BI.i18nText("BI-Basic_OK"),
@ -64860,7 +64618,6 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -64873,7 +64630,6 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
textHeight: c.buttonHeight - 1,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
shadow: true,
@ -64889,7 +64645,6 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -65618,7 +65373,6 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -65631,7 +65385,6 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -65647,7 +65400,6 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -66621,7 +66373,6 @@ BI.extend(BI.DynamicYearQuarterCombo, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
shadow: true,
textHeight: c.buttonHeight - 1,
@ -66634,7 +66385,6 @@ BI.extend(BI.DynamicYearQuarterCombo, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -66650,7 +66400,6 @@ BI.extend(BI.DynamicYearQuarterCombo, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
shadow: true,
textHeight: c.buttonHeight - 1,

2
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

20
dist/widget.js vendored

@ -1164,7 +1164,6 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
var self = this, opts = this.options;
this.cancelButton = BI.createWidget({
type: "bi.text_button",
forceCenter: true,
cls: "multidate-popup-button bi-border-top bi-border-right",
shadow: true,
text: BI.i18nText("BI-Basic_Cancel")
@ -1175,7 +1174,6 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
this.okButton = BI.createWidget({
type: "bi.text_button",
forceCenter: true,
cls: "multidate-popup-button bi-border-top",
shadow: true,
text: BI.i18nText("BI-Basic_OK")
@ -3137,7 +3135,6 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
shadow: true,
text: BI.i18nText("BI-Basic_Clear"),
@ -3150,7 +3147,6 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
shadow: true,
textHeight: c.buttonHeight - 1,
@ -3166,7 +3162,6 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -3982,7 +3977,6 @@ BI.extend(BI.DynamicDateTimeCombo, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -3995,7 +3989,6 @@ BI.extend(BI.DynamicDateTimeCombo, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -4011,7 +4004,6 @@ BI.extend(BI.DynamicDateTimeCombo, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -20448,7 +20440,6 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
shadow: true,
text: BI.i18nText("BI-Basic_Clears"),
@ -20460,7 +20451,6 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
shadow: true,
text: BI.i18nText("BI-Basic_Now"),
@ -20472,7 +20462,6 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-high-light bi-split-top",
shadow: true,
text: BI.i18nText("BI-Basic_OK"),
@ -21791,7 +21780,6 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -21804,7 +21792,6 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
textHeight: c.buttonHeight - 1,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
shadow: true,
@ -21820,7 +21807,6 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -22549,7 +22535,6 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -22562,7 +22547,6 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -22578,7 +22562,6 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -23552,7 +23535,6 @@ BI.extend(BI.DynamicYearQuarterCombo, {
type: "bi.grid",
items: [[{
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
shadow: true,
textHeight: c.buttonHeight - 1,
@ -23565,7 +23547,6 @@ BI.extend(BI.DynamicYearQuarterCombo, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1,
shadow: true,
@ -23581,7 +23562,6 @@ BI.extend(BI.DynamicYearQuarterCombo, {
}]
}, {
type: "bi.text_button",
forceCenter: true,
cls: "bi-split-top bi-high-light",
shadow: true,
textHeight: c.buttonHeight - 1,

Loading…
Cancel
Save