Browse Source

Pull request #2059: 无JIRA任务 新增布局

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

* commit 'f3037b950750ba7421b7cf10fe3a23ea6fe978f2':
  新增布局
es6
guy 3 years ago
parent
commit
511d8192bc
  1. 1
      changelog.md
  2. 21
      src/core/platform/web/config.js
  3. 6
      src/core/wrapper/layout/fill/fill.horizontal.js
  4. 6
      src/core/wrapper/layout/fill/vertical.fill.js

1
changelog.md

@ -1,5 +1,6 @@
# 更新日志
2.0(2021-07)
- 新增bi.horizontal_fill、bi.vertical_fill布局
- 增加module定义插件版本号
- bubble使用popper.js实现
- 优化了日期类型控件标红时的报错提示

21
src/core/platform/web/config.js

@ -90,6 +90,27 @@ BI.prepares.push(function () {
return BI.extend({}, ob, {type: "bi.inline_horizontal_adapt"});
});
BI.Plugin.configWidget("bi.horizontal_fill", function (ob) {
if (isSupportFlex()) {
return BI.extend({
horizontalAlign: BI.HorizontalAlign.Stretch,
verticalAlign: BI.VerticalAlign.Stretch,
scrollx: false
}, ob, {type: "bi.flex_horizontal"});
}
return BI.extend({}, ob, {type: "bi.htape"});
});
BI.Plugin.configWidget("bi.vertical_fill", function (ob) {
if (isSupportFlex()) {
return BI.extend({
horizontalAlign: BI.HorizontalAlign.Stretch,
verticalAlign: BI.VerticalAlign.Stretch,
scrolly: false
}, ob, {type: "bi.flex_vertical"});
}
return BI.extend({}, ob, {type: "bi.vtape"});
});
BI.Plugin.configWidget("bi.left_right_vertical_adapt", function (ob) {
if (isSupportFlex()) {
// IE下其实也是可以使用flex布局的,只要排除掉出现滚动条的情况

6
src/core/wrapper/layout/fill/fill.horizontal.js

@ -0,0 +1,6 @@
/**
* 横向填满布局
*/
BI.HorizontalFillLayout = function () {
};
BI.shortcut("bi.horizontal_fill", BI.HorizontalFillLayout);

6
src/core/wrapper/layout/fill/vertical.fill.js

@ -0,0 +1,6 @@
/**
* 纵向填满布局
*/
BI.VerticalFillLayout = function () {
};
BI.shortcut("bi.vertical_fill", BI.VerticalFillLayout);
Loading…
Cancel
Save