Browse Source

添加函数

es6
imp 6 years ago
parent
commit
ba339f86f2
  1. 16
      dist/bundle.ie.js
  2. 62
      dist/bundle.ie.min.js
  3. 16
      dist/bundle.js
  4. 68
      dist/bundle.min.js
  5. 16
      dist/core.js
  6. 25
      dist/demo.js
  7. 16
      dist/fineui.ie.js
  8. 16
      dist/fineui.js
  9. 2
      dist/utils.min.js
  10. 16
      src/core/platform/web/dom.js

16
dist/bundle.ie.js vendored

@ -19550,6 +19550,22 @@ BI.prepares.push(function () {
return width; return width;
}, },
getTextSizeHeight: function (text, fontSize) {
var span = BI.Widget._renderEngine.createElement("<span></span>").addClass("text-width-span").appendTo("body");
if (fontSize == null) {
fontSize = 12;
}
fontSize = fontSize + "px";
span.css("font-size", fontSize).text(text);
var height = span.height();
span.remove();
return height;
},
// 获取滚动条的宽度 // 获取滚动条的宽度
getScrollWidth: function () { getScrollWidth: function () {
if (this._scrollWidth == null) { if (this._scrollWidth == null) {

62
dist/bundle.ie.min.js vendored

File diff suppressed because one or more lines are too long

16
dist/bundle.js vendored

@ -19550,6 +19550,22 @@ BI.prepares.push(function () {
return width; return width;
}, },
getTextSizeHeight: function (text, fontSize) {
var span = BI.Widget._renderEngine.createElement("<span></span>").addClass("text-width-span").appendTo("body");
if (fontSize == null) {
fontSize = 12;
}
fontSize = fontSize + "px";
span.css("font-size", fontSize).text(text);
var height = span.height();
span.remove();
return height;
},
// 获取滚动条的宽度 // 获取滚动条的宽度
getScrollWidth: function () { getScrollWidth: function () {
if (this._scrollWidth == null) { if (this._scrollWidth == null) {

68
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

16
dist/core.js vendored

@ -19550,6 +19550,22 @@ BI.prepares.push(function () {
return width; return width;
}, },
getTextSizeHeight: function (text, fontSize) {
var span = BI.Widget._renderEngine.createElement("<span></span>").addClass("text-width-span").appendTo("body");
if (fontSize == null) {
fontSize = 12;
}
fontSize = fontSize + "px";
span.css("font-size", fontSize).text(text);
var height = span.height();
span.remove();
return height;
},
// 获取滚动条的宽度 // 获取滚动条的宽度
getScrollWidth: function () { getScrollWidth: function () {
if (this._scrollWidth == null) { if (this._scrollWidth == null) {

25
dist/demo.js vendored

@ -6126,30 +6126,7 @@ Demo.HtapeLayout = BI.inherit(BI.Widget, {
}; };
} }
}); });
BI.shortcut("demo.htape", Demo.HtapeLayout);Demo.InlineVerticalLayout = BI.inherit(BI.Widget, { BI.shortcut("demo.htape", Demo.HtapeLayout);/**
props: {
baseCls: "demo-absolute"
},
render: function () {
return {
type: "bi.inline_vertical_adapt",
items: [{
type: "bi.label",
text: "绝对布局",
cls: "layout-bg1",
width: 300,
height: 200
}, {
type: "bi.label",
text: "绝对布局",
cls: "layout-bg1",
width: 300,
height: 100
}]
};
}
});
BI.shortcut("demo.inline_vertical", Demo.InlineVerticalLayout);/**
* Created by User on 2017/3/22. * Created by User on 2017/3/22.
*/ */
Demo.LeftRightVerticalAdaptLayout = BI.inherit(BI.Widget, { Demo.LeftRightVerticalAdaptLayout = BI.inherit(BI.Widget, {

16
dist/fineui.ie.js vendored

@ -19792,6 +19792,22 @@ BI.prepares.push(function () {
return width; return width;
}, },
getTextSizeHeight: function (text, fontSize) {
var span = BI.Widget._renderEngine.createElement("<span></span>").addClass("text-width-span").appendTo("body");
if (fontSize == null) {
fontSize = 12;
}
fontSize = fontSize + "px";
span.css("font-size", fontSize).text(text);
var height = span.height();
span.remove();
return height;
},
// 获取滚动条的宽度 // 获取滚动条的宽度
getScrollWidth: function () { getScrollWidth: function () {
if (this._scrollWidth == null) { if (this._scrollWidth == null) {

16
dist/fineui.js vendored

@ -19792,6 +19792,22 @@ BI.prepares.push(function () {
return width; return width;
}, },
getTextSizeHeight: function (text, fontSize) {
var span = BI.Widget._renderEngine.createElement("<span></span>").addClass("text-width-span").appendTo("body");
if (fontSize == null) {
fontSize = 12;
}
fontSize = fontSize + "px";
span.css("font-size", fontSize).text(text);
var height = span.height();
span.remove();
return height;
},
// 获取滚动条的宽度 // 获取滚动条的宽度
getScrollWidth: function () { getScrollWidth: function () {
if (this._scrollWidth == null) { if (this._scrollWidth == null) {

2
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

16
src/core/platform/web/dom.js

@ -233,6 +233,22 @@
return width; return width;
}, },
getTextSizeHeight: function (text, fontSize) {
var span = BI.Widget._renderEngine.createElement("<span></span>").addClass("text-width-span").appendTo("body");
if (fontSize == null) {
fontSize = 12;
}
fontSize = fontSize + "px";
span.css("font-size", fontSize).text(text);
var height = span.height();
span.remove();
return height;
},
// 获取滚动条的宽度 // 获取滚动条的宽度
getScrollWidth: function () { getScrollWidth: function () {
if (this._scrollWidth == null) { if (this._scrollWidth == null) {

Loading…
Cancel
Save