|
|
@ -33,22 +33,29 @@ BI.prepares.push(function () { |
|
|
|
}); |
|
|
|
}); |
|
|
|
// }
|
|
|
|
// }
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// // IE9以上可以使用calc计算布局
|
|
|
|
|
|
|
|
// if (!isIE || BI.getIEVersion() > 8) {
|
|
|
|
|
|
|
|
// return BI.extend({}, ob, {
|
|
|
|
|
|
|
|
// type: "bi.inline",
|
|
|
|
|
|
|
|
// horizontalAlign: !justOneItem && ob.horizontalAlign === BI.HorizontalAlign.Center
|
|
|
|
|
|
|
|
// ? BI.HorizontalAlign.Left : ob.horizontalAlign
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
// }
|
|
|
|
return BI.extend({}, ob, {type: "bi.table_adapt"}); |
|
|
|
return BI.extend({}, ob, {type: "bi.table_adapt"}); |
|
|
|
} |
|
|
|
} |
|
|
|
if (supportFlex) { |
|
|
|
if (supportFlex) { |
|
|
|
// IE下其实也是可以使用flex布局的,只要排除掉出现滚动条的情况
|
|
|
|
// IE下其实也是可以使用flex布局的,只要排除掉出现滚动条的情况
|
|
|
|
if (!isIE || (ob.scrollable !== true && ob.scrolly !== true)) { |
|
|
|
// if (!isIE || (ob.scrollable !== true && ob.scrolly !== true)) {
|
|
|
|
return BI.extend({}, ob, {type: "bi.flex_horizontal"}); |
|
|
|
return BI.extend({}, ob, {type: "bi.flex_horizontal"}); |
|
|
|
|
|
|
|
// }
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// // IE9以上采用inline
|
|
|
|
// // 解决使用inline_vertical_adapt的顺序问题
|
|
|
|
// if (!isIE || BI.getIEVersion() > 8) {
|
|
|
|
// // 从右往左放置时,为了兼容,我们统一采用从右到左的放置方式
|
|
|
|
// return BI.extend({}, ob, {
|
|
|
|
// if (ob.horizontalAlign === BI.HorizontalAlign.Right) {
|
|
|
|
// type: "bi.inline"
|
|
|
|
// return BI.extend({verticalAlign: BI.VerticalAlign.Top}, ob, {
|
|
|
|
|
|
|
|
// type: "bi.inline_vertical_adapt",
|
|
|
|
|
|
|
|
// items: ob.items && ob.items.reverse()
|
|
|
|
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
// 否则采用table,不过horizontalAlign的right就不支持了。
|
|
|
|
return BI.extend({}, ob, {type: "bi.table_adapt"}); |
|
|
|
return BI.extend({}, ob, {type: "bi.table_adapt"}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
BI.Plugin.configWidget("bi.center_adapt", function (ob) { |
|
|
|
BI.Plugin.configWidget("bi.center_adapt", function (ob) { |
|
|
@ -61,8 +68,10 @@ BI.prepares.push(function () { |
|
|
|
return BI.extend({}, ob, {type: "bi.flex_center_adapt"}); |
|
|
|
return BI.extend({}, ob, {type: "bi.flex_center_adapt"}); |
|
|
|
// }
|
|
|
|
// }
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (!BI.isIE() || BI.getIEVersion() > 8) { |
|
|
|
return BI.extend({}, ob, {type: "bi.inline_center_adapt"}); |
|
|
|
return BI.extend({}, ob, {type: "bi.inline_center_adapt"}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
return ob; |
|
|
|
return ob; |
|
|
|
}); |
|
|
|
}); |
|
|
|
BI.Plugin.configWidget("bi.vertical_adapt", function (ob) { |
|
|
|
BI.Plugin.configWidget("bi.vertical_adapt", function (ob) { |
|
|
@ -75,8 +84,10 @@ BI.prepares.push(function () { |
|
|
|
return BI.extend({}, ob, {type: "bi.flex_vertical_adapt"}); |
|
|
|
return BI.extend({}, ob, {type: "bi.flex_vertical_adapt"}); |
|
|
|
// }
|
|
|
|
// }
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (!BI.isIE() || BI.getIEVersion() > 8) { |
|
|
|
return BI.extend({}, ob, {type: "bi.inline_vertical_adapt"}); |
|
|
|
return BI.extend({}, ob, {type: "bi.inline_vertical_adapt"}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
return ob; |
|
|
|
return ob; |
|
|
|
}); |
|
|
|
}); |
|
|
|
BI.Plugin.configWidget("bi.horizontal_adapt", function (ob) { |
|
|
|
BI.Plugin.configWidget("bi.horizontal_adapt", function (ob) { |
|
|
|