Browse Source

Merge pull request #767 in VISUAL/fineui from ~IMP/fineui_fui:master to master

* commit 'ba339f86f2e73ec01e37b9db5ef1d1ffeb18afbc':
  添加函数
es6
guy 6 years ago
parent
commit
ff149dd3f5
  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;
},
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 () {
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;
},
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 () {
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;
},
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 () {
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, {
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);/**
BI.shortcut("demo.htape", Demo.HtapeLayout);/**
* Created by User on 2017/3/22.
*/
Demo.LeftRightVerticalAdaptLayout = BI.inherit(BI.Widget, {

16
dist/fineui.ie.js vendored

@ -19792,6 +19792,22 @@ BI.prepares.push(function () {
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 () {
if (this._scrollWidth == null) {

16
dist/fineui.js vendored

@ -19792,6 +19792,22 @@ BI.prepares.push(function () {
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 () {
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;
},
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 () {
if (this._scrollWidth == null) {

Loading…
Cancel
Save