Browse Source

Pull request #2026: 无JIRA任务 bugfix

Merge in VISUAL/fineui from ~GUY/fineui:master to master

* commit '8856745406299fca4bee60d9645e94659792203a':
  update
  update
es6
guy 3 years ago
parent
commit
d84500c5f8
  1. 6
      src/core/wrapper/layout/adapt/adapt.table.js
  2. 11
      src/core/wrapper/layout/layout.td.js

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

@ -61,7 +61,11 @@ BI.TableAdaptLayout = BI.inherit(BI.Layout, {
// 2、不能给多个td设置最大宽度,这样只会平分宽度
// 3、多百分比宽度就算了
if (columnSize > 0) {
td.element.css({"max-width": columnSize < 1 ? width : width / BI.pixRatio + BI.pixUnit});
columnSize = columnSize < 1 ? width : width / BI.pixRatio + BI.pixUnit;
td.element.css({
"max-width": columnSize,
"min-width": columnSize
});
}
if (i === 0) {
td.element.addClass("first-element");

11
src/core/wrapper/layout/layout.td.js

@ -76,13 +76,14 @@ BI.TdLayout = BI.inherit(BI.Layout, {
}
var height = o.rowSize[idx] === "" ? "" : (o.rowSize[idx] < 1 ? ((o.rowSize[idx] * 100).toFixed(1) + "%") : o.rowSize[idx]);
var rowHeight = BI.isNumber(o.rowSize[idx]) ? (o.rowSize[idx] <= 1 ? height : height / BI.pixRatio + BI.pixUnit) : height;
var tr = BI._lazyCreateWidget({
type: "bi.default",
tagName: "tr",
height: height,
css: {
"max-height": BI.isNumber(o.rowSize[idx]) ? (o.rowSize[idx] <= 1 ? height : height / BI.pixRatio + BI.pixUnit) : height
"max-height": rowHeight,
"min-height": rowHeight
}
});
@ -132,7 +133,11 @@ BI.TdLayout = BI.inherit(BI.Layout, {
// 2、不能给多个td设置最大宽度,这样只会平分宽度
// 3、多百分比宽度就算了
if (columnSize > 0) {
td.element.css({"max-width": columnSize < 1 ? width : width / BI.pixRatio + BI.pixUnit});
columnSize = columnSize < 1 ? width : width / BI.pixRatio + BI.pixUnit;
td.element.css({
"max-width": columnSize,
"min-width": columnSize
});
}
td.element.css({
position: "relative",

Loading…
Cancel
Save