Browse Source

Merging in latest from upstream (VISUAL/fineui:refs/heads/master)

* commit '222a3c4467990071fa4e16d231f7de63b54d3783': (34 commits)
  auto upgrade version to 2.0.20210226150350
  auto upgrade version to 2.0.20210226130240
  无JIRA任务 高度调整
  auto upgrade version to 2.0.20210226113241
  BI-81362 style:图标更改
  无jira任务 **.a.**场景
  无jira任务 **.a.**的场景
  auto upgrade version to 2.0.20210224144226
  BI-75437 feat:多层下拉支持自定义type&多行编辑框提示位置自定义
  auto upgrade version to 2.0.20210224093232
  update
  update
  auto upgrade version to 2.0.20210223163238
  漏了两个
  CHART-18319 修改less,兼容FR的富文本
  auto upgrade version to 2.0.20210223143245
  DEC-17252 fix: 所有小数*100的地方做一下处理,width传入百分数的时候支持一位小数
  BI-81812 fix: 布局删除问题
  auto upgrade version to 2.0.20210222140233
  DEC-17269 fix: bi.card卡片布局组件baseCls不能叫bi-card,bi-card是带样式的
  ...
es6
Kobi 4 years ago
parent
commit
ce8988db13
  1. 4
      dist/2.0/fineui.css
  2. 4
      dist/2.0/fineui.ie.min.js
  3. 2
      dist/2.0/fineui.ie.min.js.map
  4. 2368
      dist/2.0/fineui.js
  5. 2
      dist/2.0/fineui.js.map
  6. 4
      dist/2.0/fineui.min.css
  7. 4
      dist/2.0/fineui.min.js
  8. 2
      dist/2.0/fineui.min.js.map
  9. 4
      dist/2.0/fineui_without_normalize.css
  10. 4
      dist/2.0/fineui_without_normalize.min.css
  11. 4
      dist/core.css
  12. 2338
      dist/core.js
  13. 2
      dist/core.js.map
  14. 4
      dist/demo.css
  15. 2706
      dist/demo.js
  16. 2
      dist/demo.js.map
  17. 4
      dist/fineui.css
  18. 4
      dist/fineui.ie.min.js
  19. 2
      dist/fineui.ie.min.js.map
  20. 2370
      dist/fineui.js
  21. 2
      dist/fineui.js.map
  22. 4
      dist/fineui.min.css
  23. 4
      dist/fineui.min.js
  24. 2
      dist/fineui.min.js.map
  25. 1693
      dist/fineui_without_jquery_polyfill.js
  26. 2
      dist/fineui_without_jquery_polyfill.js.map
  27. 95
      dist/fix/fix.js
  28. 2
      dist/font.css
  29. BIN
      dist/font/iconfont.eot
  30. 15
      dist/font/iconfont.svg
  31. BIN
      dist/font/iconfont.ttf
  32. BIN
      dist/font/iconfont.woff
  33. BIN
      dist/font/iconfont.woff2
  34. 14
      dist/lib/base/single/button/buttons/button.image.d.ts
  35. 2
      dist/lib/core/utils/tree.d.ts
  36. 4
      dist/lib/index.d.ts
  37. 2
      dist/resource.css
  38. 16
      dist/utils.js
  39. 2
      dist/utils.js.map
  40. 4
      dist/utils.min.js
  41. 2
      dist/utils.min.js.map
  42. 2
      package.json
  43. 7
      src/base/single/editor/editor.textarea.js
  44. 3
      src/case/colorchooser/colorchooser.js
  45. 3
      src/case/combo/icontextvaluecombo/combo.icontextvalue.js
  46. 3
      src/case/combo/textvaluecheckcombo/combo.textvaluecheck.js
  47. 3
      src/case/combo/textvaluecombo/combo.textvalue.js
  48. 2
      src/core/base.js
  49. 22
      src/core/platform/web/config.js
  50. 2
      src/core/wrapper/layout/adapt/absolute.center.js
  51. 2
      src/core/wrapper/layout/adapt/absolute.horizontal.js
  52. 2
      src/core/wrapper/layout/adapt/absolute.vertical.js
  53. 2
      src/core/wrapper/layout/adapt/adapt.center.js
  54. 2
      src/core/wrapper/layout/adapt/adapt.horizontal.js
  55. 85
      src/core/wrapper/layout/adapt/adapt.leftrightvertical.js
  56. 6
      src/core/wrapper/layout/adapt/adapt.table.js
  57. 2
      src/core/wrapper/layout/adapt/adapt.vertical.js
  58. 2
      src/core/wrapper/layout/adapt/auto.horizontal.js
  59. 5
      src/core/wrapper/layout/adapt/float.horizontal.js
  60. 6
      src/core/wrapper/layout/adapt/inline.center.js
  61. 6
      src/core/wrapper/layout/adapt/inline.horizontal.js
  62. 6
      src/core/wrapper/layout/adapt/inline.vertical.js
  63. 2
      src/core/wrapper/layout/flex/flex.center.js
  64. 2
      src/core/wrapper/layout/flex/flex.horizontal.center.js
  65. 4
      src/core/wrapper/layout/flex/flex.horizontal.js
  66. 2
      src/core/wrapper/layout/flex/flex.vertical.center.js
  67. 4
      src/core/wrapper/layout/flex/flex.vertical.js
  68. 2
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.center.js
  69. 2
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.center.js
  70. 6
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js
  71. 2
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.center.js
  72. 6
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js
  73. 2
      src/core/wrapper/layout/layout.absolute.js
  74. 2
      src/core/wrapper/layout/layout.adaptive.js
  75. 2
      src/core/wrapper/layout/layout.border.js
  76. 2
      src/core/wrapper/layout/layout.division.js
  77. 4
      src/core/wrapper/layout/layout.flow.js
  78. 2
      src/core/wrapper/layout/layout.grid.js
  79. 6
      src/core/wrapper/layout/layout.horizontal.js
  80. 2
      src/core/wrapper/layout/layout.inline.js
  81. 2
      src/core/wrapper/layout/layout.lattice.js
  82. 14
      src/core/wrapper/layout/layout.table.js
  83. 10
      src/core/wrapper/layout/layout.tape.js
  84. 4
      src/core/wrapper/layout/layout.td.js
  85. 2
      src/core/wrapper/layout/layout.vertical.js
  86. 18
      src/core/wrapper/layout/layout.window.js
  87. 2
      src/core/wrapper/layout/middle/middle.center.js
  88. 2
      src/core/wrapper/layout/middle/middle.float.center.js
  89. 2
      src/core/wrapper/layout/middle/middle.horizontal.js
  90. 2
      src/core/wrapper/layout/middle/middle.vertical.js
  91. 17
      src/less/core/wrapper/flex.horizontal.less
  92. 17
      src/less/core/wrapper/flex.vertical.less
  93. 17
      src/less/core/wrapper/flex.wrapper.horizontal.less
  94. 17
      src/less/core/wrapper/flex.wrapper.vertical.less
  95. 4
      src/less/core/wrapper/inline.center.less
  96. 4
      src/less/core/wrapper/inline.horizontal.less
  97. 4
      src/less/core/wrapper/inline.vertical.less
  98. 8
      src/widget/dynamicdate/dynamicdate.combo.js
  99. 8
      src/widget/dynamicdatetime/dynamicdatetime.combo.js
  100. 4
      src/widget/multilayerdownlist/popup.downlist.js
  101. Some files were not shown because too many files have changed in this diff Show More

4
dist/2.0/fineui.css vendored

File diff suppressed because one or more lines are too long

4
dist/2.0/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui.ie.min.js.map vendored

File diff suppressed because one or more lines are too long

2368
dist/2.0/fineui.js vendored

File diff suppressed because it is too large Load Diff

2
dist/2.0/fineui.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/2.0/fineui.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/2.0/fineui.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui.min.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/2.0/fineui_without_normalize.css vendored

File diff suppressed because one or more lines are too long

4
dist/2.0/fineui_without_normalize.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/core.css vendored

File diff suppressed because one or more lines are too long

2338
dist/core.js vendored

File diff suppressed because it is too large Load Diff

2
dist/core.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/demo.css vendored

File diff suppressed because one or more lines are too long

2706
dist/demo.js vendored

File diff suppressed because it is too large Load Diff

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.css vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.ie.min.js.map vendored

File diff suppressed because one or more lines are too long

2370
dist/fineui.js vendored

File diff suppressed because it is too large Load Diff

2
dist/fineui.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.min.js.map vendored

File diff suppressed because one or more lines are too long

1693
dist/fineui_without_jquery_polyfill.js vendored

File diff suppressed because it is too large Load Diff

2
dist/fineui_without_jquery_polyfill.js.map vendored

File diff suppressed because one or more lines are too long

95
dist/fix/fix.js vendored

@ -630,8 +630,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
_.each(['push', 'pop', 'shift', 'unshift', 'splice', 'sort', 'reverse'], function (method) { _.each(['push', 'pop', 'shift', 'unshift', 'splice', 'sort', 'reverse'], function (method) {
var original = arrayProto[method]; var original = arrayProto[method];
arrayMethods[method] = function mutator() { arrayMethods[method] = function mutator() {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { for (var _len = arguments.length, args = Array(_len), _key2 = 0; _key2 < _len; _key2++) {
args[_key] = arguments[_key]; args[_key2] = arguments[_key2];
} }
var ob = this.__ob__; var ob = this.__ob__;
@ -773,10 +773,12 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
root = parent; root = parent;
parent = parent.parent; parent = parent.parent;
} }
for (var _key2 in root._globalDeps) { for (var _key in root._globalDeps) {
var reg = new RegExp(_key2); var reg = new RegExp(_key);
if (reg.test(route)) { if (reg.test(route)) {
root._globalDeps[_key2].notify({ observer: observer, key: _key2 }); for (var i = 0; i < root._globalDeps[_key].length; i++) {
root._globalDeps[_key][i].notify({ observer: observer, key: _key });
}
} }
} }
} }
@ -958,7 +960,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
} }
function routeToRegExp(route) { function routeToRegExp(route) {
route = route.replace(/\*./g, '[a-zA-Z0-9_]+.'); route = route.replace(/\*\*/g, '[a-zA-Z0-9_]+').replace(/\*./g, '[a-zA-Z0-9_]+.');
return '^' + route + '$'; return '^' + route + '$';
} }
@ -1047,21 +1049,12 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
}); });
return; return;
} }
if (/\*\*$|\*$/.test(exp)) { // **.a.**的情况,场景:a.b.c, 如果用b.**监听, a被重新赋值b上的_scopeDes就不存在了
throw new Error('not support'); if (/^(\*\*\.)+[1-9a-zA-Z]+(\.\*\*$)/.test(exp)) {
}
//其他含有*的情况,如*.a,*.*.a,a.*.a
if (/\*/.test(exp)) {
var currentModel = model;
//先获取到能获取到的对象 //先获取到能获取到的对象
var paths = exp.split("."); var paths = exp.split(".");
for (var _i = 0, len = paths.length; _i < len; _i++) { var currentModel = model[paths[1]];
if (paths[_i] === "*") { exp = paths[1] + ".**";
break;
}
currentModel = model[paths[_i]];
}
exp = exp.substr(exp.indexOf("*"));
//补全路径 //补全路径
var parent = currentModel.__ob__.parent, var parent = currentModel.__ob__.parent,
root = currentModel.__ob__; root = currentModel.__ob__;
@ -1073,7 +1066,11 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var regStr = routeToRegExp(exp); var regStr = routeToRegExp(exp);
var _dep = new Dep(); var _dep = new Dep();
root._globalDeps || (root._globalDeps = {}); root._globalDeps || (root._globalDeps = {});
root._globalDeps[regStr] = _dep; if (_.isArray(root._globalDeps[regStr])) {
root._globalDeps[regStr].push(_dep);
} else {
root._globalDeps[regStr] = [_dep];
}
var _w = new Watcher(currentModel, function () { var _w = new Watcher(currentModel, function () {
_dep.depend(); _dep.depend();
@ -1082,8 +1079,64 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
callback(i, newValue, oldValue, _.extend({ index: i }, attrs)); callback(i, newValue, oldValue, _.extend({ index: i }, attrs));
}, options); }, options);
watchers.push(function unwatchFn() { watchers.push(function unwatchFn() {
if (root._globalDeps) {
remove(root._globalDeps[regStr], _dep);
if (root._globalDeps[regStr].length === 0) {
delete root._globalDeps[regStr];
_w.teardown(); _w.teardown();
root._globalDeps && delete root._globalDeps[regStr]; }
}
});
return;
}
if (/\*\*$|\*$/.test(exp)) {
throw new Error('not support');
}
//其他含有*的情况,如*.a,*.*.a,a.*.a
if (/\*/.test(exp)) {
var _currentModel = model;
//先获取到能获取到的对象
var _paths = exp.split(".");
for (var _i = 0, len = _paths.length; _i < len; _i++) {
if (_paths[_i] === "*") {
break;
}
_currentModel = model[_paths[_i]];
}
exp = exp.substr(exp.indexOf("*"));
//补全路径
var _parent = _currentModel.__ob__.parent,
_root = _currentModel.__ob__;
while (_parent) {
exp = '*.' + exp;
_root = _parent;
_parent = _parent.parent;
}
var _regStr = routeToRegExp(exp);
var _dep2 = new Dep();
_root._globalDeps || (_root._globalDeps = {});
if (_.isArray(_root._globalDeps[_regStr])) {
_root._globalDeps[_regStr].push(_dep2);
} else {
_root._globalDeps[_regStr] = [_dep2];
}
var _w2 = new Watcher(_currentModel, function () {
_dep2.depend();
return NaN;
}, function (newValue, oldValue, attrs) {
callback(i, newValue, oldValue, _.extend({ index: i }, attrs));
}, options);
watchers.push(function unwatchFn() {
if (_root._globalDeps) {
remove(_root._globalDeps[_regStr], _dep2);
if (_root._globalDeps[_regStr].length === 0) {
delete _root._globalDeps[_regStr];
_w2.teardown();
}
}
}); });
return; return;
} }

2
dist/font.css vendored

File diff suppressed because one or more lines are too long

BIN
dist/font/iconfont.eot vendored

Binary file not shown.

15
dist/font/iconfont.svg vendored

@ -20,6 +20,18 @@ Created by iconfont
/> />
<missing-glyph /> <missing-glyph />
<glyph glyph-name="shujuzonglan" unicode="&#59464;" d="M553.088 778.496l403.456-337.92a32 32 0 0 0-20.544-56.576H864v-339.072a64 64 0 0 0-64-64h-576a64 64 0 0 0-64 64V384H88a32 32 0 0 0-20.48 56.512l403.392 337.92a64 64 0 0 0 82.176 0zM704 192.128H320v-76.8h384v76.8zM704 384H320v-76.8h384V384z" horiz-adv-x="1024" />
<glyph glyph-name="beizhu" unicode="&#59199;" d="M809.152 800H214.848A119.232 119.232 0 0 1 96 681.152v-475.456c0-65.344 53.504-118.848 118.848-118.848h54.848l124.8-112.896c5.952-5.952 11.904-5.952 17.856-5.952 17.792 0 35.648 11.904 35.648 35.648v83.2h361.152a119.232 119.232 0 0 1 118.848 118.848V681.152A119.232 119.232 0 0 1 809.152 800z m59.392-594.304c0-35.648-23.744-59.392-59.392-59.392H448a53.952 53.952 0 0 1-41.6-17.856 53.952 53.952 0 0 1-17.856-41.6v-29.696l-77.248 71.296a64.192 64.192 0 0 1-41.6 17.856h-54.848c-35.648 0-59.392 23.744-59.392 59.392V681.152c0 35.648 23.744 59.392 59.392 59.392h594.304c35.648 0 59.392-23.744 59.392-59.392v-475.456zM720 562.304h-416c-17.856 0-29.696-11.904-29.696-29.76 0-17.792 11.84-29.696 29.696-29.696h416c17.856 0 29.696 11.904 29.696 29.696 0 17.856-11.84 29.76-29.696 29.76z m0-178.304h-416c-17.856 0-29.696-11.904-29.696-29.696 0-17.856 11.84-29.76 29.696-29.76h416c17.856 0 29.696 11.904 29.696 29.76 0 17.792-11.84 29.696-29.696 29.696z" horiz-adv-x="1024" />
<glyph glyph-name="normal123" unicode="&#59463;" d="M99.456 305.216c0-11.52 5.696-22.144 14.976-27.904 9.216-5.76 20.608-5.76 29.824 0a32.832 32.832 0 0 1 14.976 27.904 32.64 32.64 0 0 1-14.976 27.84 27.968 27.968 0 0 1-29.824 0 32.64 32.64 0 0 1-14.976-27.84z m0 138.624c0-11.52 5.696-22.08 14.976-27.84 9.216-5.76 20.608-5.76 29.824 0a32.832 32.832 0 0 1 14.976 27.84 32.64 32.64 0 0 1-14.976 27.904 27.968 27.968 0 0 1-29.824 0 32.64 32.64 0 0 1-14.976-27.904z m55.488-266.88v-80.896c0-35.392 26.688-64.192 59.52-64.192h593.6c32.768 0 59.52 28.8 59.52 64.192V673.152c0 35.392-26.752 64.192-59.52 64.192l-593.536-1.728c-32.768 0-59.52-28.8-59.52-64.192v-80.192c0-17.728-13.312-32.128-29.824-32.128s-29.824 14.4-29.824 32.128l0.064 2.432V671.296c0 70.912 53.184 128.32 118.848 128.32l594.24 1.664c65.536 0 118.72-57.536 118.72-128.32v-575.36c0-70.912-53.12-128.32-118.848-128.32H214.208c-65.664 0-118.848 57.408-118.848 128.32v77.056c-0.128 0.832-0.128 1.6-0.128 2.432 0 17.664 13.376 32 29.888 32s29.824-14.336 29.824-32.064z m416.192 22.912a28.352 28.352 0 0 1 42.176 0l125.76 135.68 0.832 0.832 0.768 0.704a33.472 33.472 0 0 1 0 44.8L614.4 518.208a27.84 27.84 0 0 1-41.6 0l-0.64-0.704a33.472 33.472 0 0 1 0-44.8l76.16-82.176H302.848c-16.128 0-29.312-14.208-29.312-31.616 0-17.344 13.184-31.552 29.312-31.552h344.32l-75.84-82.048a33.92 33.92 0 0 1-0.192-45.44z" horiz-adv-x="1024" />
<glyph glyph-name="normal122" unicode="&#59462;" d="M446.976 801.28l118.336-131.392H825.6c74.24 0 134.4-58.816 134.4-131.328v-175.168h-64v62.592H128v-330.048c0-32 26.688-57.856 59.584-57.856L576 38.144v-68.864H198.4c-74.24 0-134.4 58.816-134.4 131.392V801.28h382.976z m334.976-497.408l4.992-3.968 136-132.992 0.512-0.512a30.912 30.912 0 0 0-0.32-44.032L787.2-10.496a32 32 0 0 0-44.8 0l-0.192 0.256a30.912 30.912 0 0 0-0.512 43.776l0.512 0.512 81.024 79.232H607.296a31.296 31.296 0 1 0 0 62.528h216.128l-81.472 79.68-0.256 0.192a31.04 31.04 0 0 0-3.392 39.744l3.648 4.288 0.256 0.256a32 32 0 0 0 39.744 3.968z m-373.12 434.88H128v-250.24h768V545.92c0 31.936-26.688 57.792-59.584 57.792H531.2l-122.368 135.04z" horiz-adv-x="1024" />
<glyph glyph-name="bupaixu" unicode="&#59461;" d="M750.4 63.04a32 32 0 0 0 32-32v-10.624a32 32 0 0 0-32-32H533.568a32 32 0 0 0-32 32v10.624a32 32 0 0 0 32 32h216.832z m-493.44 654.08a25.6 25.6 0 0 0 0.512-0.576l137.472-141.632a25.6 25.6 0 0 0-18.432-43.392H277.568v-318.4h98.944a25.6 25.6 0 0 0 14.016-4.224l3.84-3.072a25.6 25.6 0 0 0 0.576-36.16l-137.472-141.696a25.6 25.6 0 0 0-36.736 0L83.2 169.664a25.6 25.6 0 0 0 18.368 43.392h101.312V531.584H101.632a25.6 25.6 0 0 0-18.368 43.392L220.8 716.544a25.6 25.6 0 0 0 36.16 0.576z m655.36-430.144a32 32 0 0 0 32-32v-10.624a32 32 0 0 0-32-32H533.632a32 32 0 0 0-32 32v10.624a32 32 0 0 0 32 32h378.816z m-161.152 223.872a32 32 0 0 0 32-32v-10.624a32 32 0 0 0-32-32h-217.6a32 32 0 0 0-32 32v10.624a32 32 0 0 0 32 32h217.6z m166.208 223.936a32 32 0 0 0 32-32v-10.624a32 32 0 0 0-32-32H533.568a32 32 0 0 0-32 32V702.72a32 32 0 0 0 32 32h383.808z" horiz-adv-x="1024" /> <glyph glyph-name="bupaixu" unicode="&#59461;" d="M750.4 63.04a32 32 0 0 0 32-32v-10.624a32 32 0 0 0-32-32H533.568a32 32 0 0 0-32 32v10.624a32 32 0 0 0 32 32h216.832z m-493.44 654.08a25.6 25.6 0 0 0 0.512-0.576l137.472-141.632a25.6 25.6 0 0 0-18.432-43.392H277.568v-318.4h98.944a25.6 25.6 0 0 0 14.016-4.224l3.84-3.072a25.6 25.6 0 0 0 0.576-36.16l-137.472-141.696a25.6 25.6 0 0 0-36.736 0L83.2 169.664a25.6 25.6 0 0 0 18.368 43.392h101.312V531.584H101.632a25.6 25.6 0 0 0-18.368 43.392L220.8 716.544a25.6 25.6 0 0 0 36.16 0.576z m655.36-430.144a32 32 0 0 0 32-32v-10.624a32 32 0 0 0-32-32H533.632a32 32 0 0 0-32 32v10.624a32 32 0 0 0 32 32h378.816z m-161.152 223.872a32 32 0 0 0 32-32v-10.624a32 32 0 0 0-32-32h-217.6a32 32 0 0 0-32 32v10.624a32 32 0 0 0 32 32h217.6z m166.208 223.936a32 32 0 0 0 32-32v-10.624a32 32 0 0 0-32-32H533.568a32 32 0 0 0-32 32V702.72a32 32 0 0 0 32 32h383.808z" horiz-adv-x="1024" />
@ -1292,9 +1304,6 @@ Created by iconfont
<glyph glyph-name="yewubao" unicode="&#59198;" d="M106.666667 469.333333h810.666666v-384a106.666667 106.666667 0 0 0-106.666666-106.666666H213.333333a106.666667 106.666667 0 0 0-106.666666 106.666666V469.333333z m0 42.666667v170.666667a106.666667 106.666667 0 0 0 106.666666 106.666666h193.109334a85.333333 85.333333 0 0 0 58.666666-23.36l63.317334-59.946666A85.333333 85.333333 0 0 1 587.093333 682.666667H810.666667a106.666667 106.666667 0 0 0 106.666666-106.666667v-64H106.666667z m106.666666-128a21.333333 21.333333 0 0 1 0-42.666667h256a21.333333 21.333333 0 0 1 0 42.666667H213.333333z m0-128a21.333333 21.333333 0 0 1 0-42.666667h128a21.333333 21.333333 0 0 1 0 42.666667h-128z" horiz-adv-x="1024" /> <glyph glyph-name="yewubao" unicode="&#59198;" d="M106.666667 469.333333h810.666666v-384a106.666667 106.666667 0 0 0-106.666666-106.666666H213.333333a106.666667 106.666667 0 0 0-106.666666 106.666666V469.333333z m0 42.666667v170.666667a106.666667 106.666667 0 0 0 106.666666 106.666666h193.109334a85.333333 85.333333 0 0 0 58.666666-23.36l63.317334-59.946666A85.333333 85.333333 0 0 1 587.093333 682.666667H810.666667a106.666667 106.666667 0 0 0 106.666666-106.666667v-64H106.666667z m106.666666-128a21.333333 21.333333 0 0 1 0-42.666667h256a21.333333 21.333333 0 0 1 0 42.666667H213.333333z m0-128a21.333333 21.333333 0 0 1 0-42.666667h128a21.333333 21.333333 0 0 1 0 42.666667h-128z" horiz-adv-x="1024" />
<glyph glyph-name="normal95" unicode="&#59199;" d="M631.488 382.784L549.952 464.32a32 32 0 0 0 45.248 45.248l135.744-135.744a32 32 0 0 0 0.192-45.504l-135.744-135.808a32 32 0 1 0-45.248 45.248l81.024 81.024H312.256a32 32 0 1 0 0 64h319.232zM128 800h320l128-128h320a64 64 0 0 0 64-64v-576a64 64 0 0 0-64-64H128a64 64 0 0 0-64 64v704a64 64 0 0 0 64 64z m293.504-64H128v-704h768v576H549.504l-128 128z" horiz-adv-x="1024" />
<glyph glyph-name="zhujian" unicode="&#59200;" d="M246.528 75.904c1.024-0.768 1.92-1.664 2.816-2.56l49.152-49.088a32 32 0 0 0-45.248-45.248l-49.152 49.088a32.32 32.32 0 0 0-2.496 2.816l-44.544-44.544a32 32 0 1 0-45.312 45.248L405.952 325.76a32.512 32.512 0 0 0 1.408 1.344 288 288 0 1 0 46.08-44.096 32.384 32.384 0 0 0-2.24-2.496L355.648 184.96000000000004l86.272-86.272a32 32 0 0 0-45.248-45.248L310.4 139.712l-63.872-63.808zM628.224 288a224 224 0 1 1 0 448 224 224 0 0 1 0-448z" horiz-adv-x="1024" /> <glyph glyph-name="zhujian" unicode="&#59200;" d="M246.528 75.904c1.024-0.768 1.92-1.664 2.816-2.56l49.152-49.088a32 32 0 0 0-45.248-45.248l-49.152 49.088a32.32 32.32 0 0 0-2.496 2.816l-44.544-44.544a32 32 0 1 0-45.312 45.248L405.952 325.76a32.512 32.512 0 0 0 1.408 1.344 288 288 0 1 0 46.08-44.096 32.384 32.384 0 0 0-2.24-2.496L355.648 184.96000000000004l86.272-86.272a32 32 0 0 0-45.248-45.248L310.4 139.712l-63.872-63.808zM628.224 288a224 224 0 1 1 0 448 224 224 0 0 1 0-448z" horiz-adv-x="1024" />

Before

Width:  |  Height:  |  Size: 376 KiB

After

Width:  |  Height:  |  Size: 379 KiB

BIN
dist/font/iconfont.ttf vendored

Binary file not shown.

BIN
dist/font/iconfont.woff vendored

Binary file not shown.

BIN
dist/font/iconfont.woff2 vendored

Binary file not shown.

14
dist/lib/base/single/button/buttons/button.image.d.ts vendored

@ -0,0 +1,14 @@
import { BasicButton } from "../button.basic";
export declare class ImageButton extends BasicButton {
static xtype: string;
static EVENT_CHANGE: string;
setWidth(w: number): void;
setHeight(h: number): void;
setImageWidth(w: number): void;
setImageHeight(h: number): void;
getImageWidth(): number;
getImageHeight(): number;
setSrc(src: string): void;
getSrc(): string;
doClick(): void;
}

2
dist/lib/core/utils/tree.d.ts vendored

@ -30,7 +30,7 @@ export declare class Tree {
clear(): void; clear(): void;
initTree(nodes: any[]): void; initTree(nodes: any[]): void;
toJSON<T>(node?: Node): T[]; toJSON<T>(node?: Node): T[];
toJSONWithNode<T>(node: Node): T[]; toJSONWithNode<T>(node?: Node): T[];
search(root: Node, target?: any, param?: any): Node; search(root: Node, target?: any, param?: any): Node;
traverse(callback: Function): void; traverse(callback: Function): void;
recursion(callback: Function): void; recursion(callback: Function): void;

4
dist/lib/index.d.ts vendored

@ -151,6 +151,7 @@ import { DateCalendarPopup } from "./widget/date/calendar/popup.calendar.date";
import { Tree, Node } from "./core/utils/tree"; import { Tree, Node } from "./core/utils/tree";
import { TextNode } from "./base/single/button/node/textnode"; import { TextNode } from "./base/single/button/node/textnode";
import { TextValueCheckComboPopup } from "./case/combo/textvaluecheckcombo/popup.textvaluecheck"; import { TextValueCheckComboPopup } from "./case/combo/textvaluecheckcombo/popup.textvaluecheck";
import { ImageButton } from './base/single/button/buttons/button.image';
export interface BI extends _func, _i18n, _base, _inject, _var, _web, _utils { export interface BI extends _func, _i18n, _base, _inject, _var, _web, _utils {
OB: typeof OB; OB: typeof OB;
Plugin: _Plugin; Plugin: _Plugin;
@ -305,9 +306,10 @@ export interface BI extends _func, _i18n, _base, _inject, _var, _web, _utils {
DateCalendarPopup: typeof DateCalendarPopup; DateCalendarPopup: typeof DateCalendarPopup;
TextNode: typeof TextNode; TextNode: typeof TextNode;
TextValueCheckComboPopup: typeof TextValueCheckComboPopup; TextValueCheckComboPopup: typeof TextValueCheckComboPopup;
ImageButton: typeof ImageButton;
} }
declare const _default: { declare const _default: {
Decorators: typeof decorator; Decorators: typeof decorator;
}; };
export default _default; export default _default;
export { OB, Widget, Single, BasicButton, Checkbox, Icon, LeftVerticalAdaptLayout, LeftRightVerticalAdaptLayout, SearchTextValueCombo, Input, IconTextItem, AllValueMultiTextValueCombo, IconTextIconItem, Layout, HorizontalAutoLayout, InlineVerticalAdaptLayout, RightVerticalAdaptLayout, TableAdaptLayout, AbsoluteCenterLayout, HorizontalAdaptLayout, FloatLeftLayout, FloatRightLayout, VerticalLayout, AbsoluteLayout, DefaultLayout, HTapeLayout, CenterAdaptLayout, VTapeLayout, VerticalAdaptLayout, IconButton, Trigger, TriggerIconButton, Action, ActionFactory, ShowAction, Controller, LayerController, Behavior, BehaviorFactory, RedMarkBehavior, HighlightBehavior, LoadingPane, Searcher, AbstractLabel, Label, TextButton, DownListCombo, IconChangeButton, Button, TextEditor, A, Html, Switcher, BubbleCombo, Loader, ListPane, MultiSelectBar, SelectList, TextValueCombo, Editor, IconLabel, Popover, BarPopover, Tab, AbstractTreeValueChooser, AbstractListTreeValueChooser, ListTreeValueChooserInsertCombo, TreeValueChooserCombo, TreeValueChooserInsertCombo, MultiLayerSelectTreePopup, MultiLayerSingleTreePopup, TreeView, ListTreeView, ListAsyncTree, AsyncTree, MultiLayerSingleTreeCombo, MultiLayerSelectTreeCombo, MultiTreeListCombo, MultiTreeInsertCombo, Combo, IconCombo, DynamicDateCombo, Radio, MultiSelectItem, CustomTree, ButtonGroup, ButtonTree, NodeButton, IconArrowNode, MidTreeLeafItem, FirstTreeLeafItem, LastTreeLeafItem, SmallTextEditor, MultifileEditor, SignEditor, MultiSelectInsertCombo, MultiSelectCombo, SearchEditor, Text, Pane, MultiLayerSingleLevelTree, SimpleColorChooser, AbstractAllValueChooser, AllValueChooserCombo, TextAreaEditor, SingleSelectItem, DynamicDateTimeCombo, MultiTreeCombo, CenterLayout, VirtualGroup, GridLayout, MultiTreePopup, SingleSelectRadioItem, SingleSelectInsertCombo, SingleSelectCombo, CardLayout, DynamicYearMonthCombo, TimeCombo, Iframe, TextValueDownListCombo, Switch, HorizontalLayout, ShelterEditor, SelectTextTrigger, DateInterval, DynamicDatePane, AllCountPager, PopupView, BubblePopupView, BubblePopupBarView, TextBubblePopupBarView, ArrowTreeGroupNodeCheckbox, NumberInterval, DynamicYearQuarterCombo, DynamicYearCombo, IntervalSlider, MultiSelectInsertList, YearMonthInterval, TextValueCheckCombo, NumberEditor, LinearSegment, Img, EditorIconCheckCombo, IconTextValueCombo, ListView, FloatCenterLayout, DynamicYearMonthPopup, DateCalendarPopup, Tree, Node, TextNode, TextValueCheckComboPopup, }; export { OB, Widget, Single, BasicButton, Checkbox, Icon, LeftVerticalAdaptLayout, LeftRightVerticalAdaptLayout, SearchTextValueCombo, Input, IconTextItem, AllValueMultiTextValueCombo, IconTextIconItem, Layout, HorizontalAutoLayout, InlineVerticalAdaptLayout, RightVerticalAdaptLayout, TableAdaptLayout, AbsoluteCenterLayout, HorizontalAdaptLayout, FloatLeftLayout, FloatRightLayout, VerticalLayout, AbsoluteLayout, DefaultLayout, HTapeLayout, CenterAdaptLayout, VTapeLayout, VerticalAdaptLayout, IconButton, Trigger, TriggerIconButton, Action, ActionFactory, ShowAction, Controller, LayerController, Behavior, BehaviorFactory, RedMarkBehavior, HighlightBehavior, LoadingPane, Searcher, AbstractLabel, Label, TextButton, DownListCombo, IconChangeButton, Button, TextEditor, A, Html, Switcher, BubbleCombo, Loader, ListPane, MultiSelectBar, SelectList, TextValueCombo, Editor, IconLabel, Popover, BarPopover, Tab, AbstractTreeValueChooser, AbstractListTreeValueChooser, ListTreeValueChooserInsertCombo, TreeValueChooserCombo, TreeValueChooserInsertCombo, MultiLayerSelectTreePopup, MultiLayerSingleTreePopup, TreeView, ListTreeView, ListAsyncTree, AsyncTree, MultiLayerSingleTreeCombo, MultiLayerSelectTreeCombo, MultiTreeListCombo, MultiTreeInsertCombo, Combo, IconCombo, DynamicDateCombo, Radio, MultiSelectItem, CustomTree, ButtonGroup, ButtonTree, NodeButton, IconArrowNode, MidTreeLeafItem, FirstTreeLeafItem, LastTreeLeafItem, SmallTextEditor, MultifileEditor, SignEditor, MultiSelectInsertCombo, MultiSelectCombo, SearchEditor, Text, Pane, MultiLayerSingleLevelTree, SimpleColorChooser, AbstractAllValueChooser, AllValueChooserCombo, TextAreaEditor, SingleSelectItem, DynamicDateTimeCombo, MultiTreeCombo, CenterLayout, VirtualGroup, GridLayout, MultiTreePopup, SingleSelectRadioItem, SingleSelectInsertCombo, SingleSelectCombo, CardLayout, DynamicYearMonthCombo, TimeCombo, Iframe, TextValueDownListCombo, Switch, HorizontalLayout, ShelterEditor, SelectTextTrigger, DateInterval, DynamicDatePane, AllCountPager, PopupView, BubblePopupView, BubblePopupBarView, TextBubblePopupBarView, ArrowTreeGroupNodeCheckbox, NumberInterval, DynamicYearQuarterCombo, DynamicYearCombo, IntervalSlider, MultiSelectInsertList, YearMonthInterval, TextValueCheckCombo, NumberEditor, LinearSegment, Img, EditorIconCheckCombo, IconTextValueCombo, ListView, FloatCenterLayout, DynamicYearMonthPopup, DateCalendarPopup, Tree, Node, TextNode, TextValueCheckComboPopup, ImageButton, };

2
dist/resource.css vendored

File diff suppressed because one or more lines are too long

16
dist/utils.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-2-20 09:40:43 */ /*! time: 2021-2-26 15:02:26 */
/******/ (function(modules) { // webpackBootstrap /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache /******/ // The module cache
/******/ var installedModules = {}; /******/ var installedModules = {};
@ -82,12 +82,12 @@
/******/ /******/
/******/ /******/
/******/ // Load entry module and return exports /******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 1236); /******/ return __webpack_require__(__webpack_require__.s = 1238);
/******/ }) /******/ })
/************************************************************************/ /************************************************************************/
/******/ ({ /******/ ({
/***/ 1097: /***/ 1099:
/***/ (function(module, exports) { /***/ (function(module, exports) {
BI.i18n = { BI.i18n = {
@ -320,7 +320,7 @@ if(_global.BI.prepares == null) {
/***/ }), /***/ }),
/***/ 1236: /***/ 1238:
/***/ (function(module, exports, __webpack_require__) { /***/ (function(module, exports, __webpack_require__) {
__webpack_require__(123); __webpack_require__(123);
@ -350,8 +350,8 @@ __webpack_require__(140);
__webpack_require__(141); __webpack_require__(141);
__webpack_require__(142); __webpack_require__(142);
__webpack_require__(143); __webpack_require__(143);
__webpack_require__(1097); __webpack_require__(1099);
__webpack_require__(1237); __webpack_require__(1239);
__webpack_require__(153); __webpack_require__(153);
__webpack_require__(154); __webpack_require__(154);
module.exports = __webpack_require__(155); module.exports = __webpack_require__(155);
@ -359,7 +359,7 @@ module.exports = __webpack_require__(155);
/***/ }), /***/ }),
/***/ 1237: /***/ 1239:
/***/ (function(module, exports) { /***/ (function(module, exports) {
/** /**
@ -990,7 +990,7 @@ if (!_global.BI) {
if (typeof w === "number") { if (typeof w === "number") {
return w >= 0; return w >= 0;
} else if (typeof w === "string") { } else if (typeof w === "string") {
return /^\d{1,3}%$/.exec(w) || w == "auto" || /^\d+px$/.exec(w); return /^\d{1,3}(\.\d)?%$/.exec(w) || w == "auto" || /^\d+px$/.exec(w);
} }
}, },

2
dist/utils.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/utils.min.js.map vendored

File diff suppressed because one or more lines are too long

2
package.json

@ -1,6 +1,6 @@
{ {
"name": "fineui", "name": "fineui",
"version": "2.0.20210220094213", "version": "2.0.20210226150350",
"description": "fineui", "description": "fineui",
"main": "dist/fineui.min.js", "main": "dist/fineui.min.js",
"types": "dist/lib/index.d.ts", "types": "dist/lib/index.d.ts",

7
src/base/single/editor/editor.textarea.js

@ -10,6 +10,9 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
baseCls: "bi-textarea-editor", baseCls: "bi-textarea-editor",
value: "", value: "",
errorText: "", errorText: "",
adjustYOffset: 2,
adjustXOffset: 0,
offsetStyle: "left",
validationChecker: function () { validationChecker: function () {
return true; return true;
}, },
@ -137,7 +140,9 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
} }
if (!this.disabledError && BI.isKey(errorText)) { if (!this.disabledError && BI.isKey(errorText)) {
BI.Bubbles[b ? "show" : "hide"](this.getName(), errorText, this, { BI.Bubbles[b ? "show" : "hide"](this.getName(), errorText, this, {
adjustYOffset: 2 adjustYOffset: o.adjustYOffset,
adjustXOffset: o.adjustXOffset,
offsetStyle: o.offsetStyle,
}); });
return BI.Bubbles.get(this.getName()); return BI.Bubbles.get(this.getName());
} }

3
src/case/colorchooser/colorchooser.js

@ -9,7 +9,7 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.ColorChooser.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.ColorChooser.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-color-chooser bi-border bi-focus-shadow", baseCls: "bi-color-chooser bi-border",
value: "", value: "",
height: 24, height: 24,
el: {}, el: {},
@ -19,6 +19,7 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
_init: function () { _init: function () {
var self = this, o = this.options; var self = this, o = this.options;
o.height -= 2; o.height -= 2;
BI.isNumeric(o.width) && (o.width -= 2);
BI.ColorChooser.superclass._init.apply(this, arguments); BI.ColorChooser.superclass._init.apply(this, arguments);
o.value = o.value || ""; o.value = o.value || "";
this.combo = BI.createWidget({ this.combo = BI.createWidget({

3
src/case/combo/icontextvaluecombo/combo.icontextvalue.js

@ -5,7 +5,7 @@
BI.IconTextValueCombo = BI.inherit(BI.Widget, { BI.IconTextValueCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.IconTextValueCombo.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.IconTextValueCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-icon-text-value-combo bi-border bi-focus-shadow bi-border-radius", baseCls: "bi-icon-text-value-combo bi-border bi-border-radius",
height: 24, height: 24,
iconHeight: null, iconHeight: null,
iconWidth: null, iconWidth: null,
@ -16,6 +16,7 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
_init: function () { _init: function () {
var self = this, o = this.options; var self = this, o = this.options;
o.height -= 2; o.height -= 2;
BI.isNumeric(o.width) && (o.width -= 2);
BI.IconTextValueCombo.superclass._init.apply(this, arguments); BI.IconTextValueCombo.superclass._init.apply(this, arguments);
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.select_icon_text_trigger", type: "bi.select_icon_text_trigger",

3
src/case/combo/textvaluecheckcombo/combo.textvaluecheck.js

@ -6,7 +6,7 @@
BI.TextValueCheckCombo = BI.inherit(BI.Widget, { BI.TextValueCheckCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.TextValueCheckCombo.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.TextValueCheckCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-text-value-check-combo bi-border bi-focus-shadow", baseCls: "bi-text-value-check-combo bi-border",
width: 100, width: 100,
height: 24, height: 24,
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
@ -17,6 +17,7 @@ BI.TextValueCheckCombo = BI.inherit(BI.Widget, {
_init: function () { _init: function () {
var self = this, o = this.options; var self = this, o = this.options;
o.height -= 2; o.height -= 2;
BI.isNumeric(o.width) && (o.width -= 2);
BI.TextValueCheckCombo.superclass._init.apply(this, arguments); BI.TextValueCheckCombo.superclass._init.apply(this, arguments);
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.select_text_trigger", type: "bi.select_text_trigger",

3
src/case/combo/textvaluecombo/combo.textvalue.js

@ -7,7 +7,7 @@
BI.TextValueCombo = BI.inherit(BI.Widget, { BI.TextValueCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.TextValueCombo.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.TextValueCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-text-value-combo bi-border bi-focus-shadow", baseCls: "bi-text-value-combo bi-border",
height: 24, height: 24,
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
text: "", text: "",
@ -18,6 +18,7 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
_init: function () { _init: function () {
var self = this, o = this.options; var self = this, o = this.options;
o.height -= 2; o.height -= 2;
BI.isNumeric(o.width) && (o.width -= 2);
BI.TextValueCombo.superclass._init.apply(this, arguments); BI.TextValueCombo.superclass._init.apply(this, arguments);
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.select_text_trigger", type: "bi.select_text_trigger",

2
src/core/base.js

@ -504,7 +504,7 @@ if (!_global.BI) {
if (typeof w === "number") { if (typeof w === "number") {
return w >= 0; return w >= 0;
} else if (typeof w === "string") { } else if (typeof w === "string") {
return /^\d{1,3}%$/.exec(w) || w == "auto" || /^\d+px$/.exec(w); return /^\d{1,3}(\.\d)?%$/.exec(w) || w == "auto" || /^\d+px$/.exec(w);
} }
}, },

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

@ -26,14 +26,14 @@ BI.prepares.push(function () {
if (!isIE && supportFlex) { if (!isIE && supportFlex) {
return BI.extend({}, ob, {type: "bi.flex_horizontal"}); return BI.extend({}, ob, {type: "bi.flex_horizontal"});
} }
// 解决使用inline_vertical_adapt的顺序问题 // // 解决使用inline_vertical_adapt的顺序问题
// 从右往左放置时,为了兼容,我们统一采用从右到左的放置方式 // // 从右往左放置时,为了兼容,我们统一采用从右到左的放置方式
if (ob.horizontalAlign === BI.HorizontalAlign.Right) { // if (ob.horizontalAlign === BI.HorizontalAlign.Right) {
return BI.extend({verticalAlign: BI.VerticalAlign.Top}, ob, { // return BI.extend({verticalAlign: BI.VerticalAlign.Top}, ob, {
type: "bi.inline_vertical_adapt", // type: "bi.inline_vertical_adapt",
items: ob.items && ob.items.reverse() // items: ob.items && ob.items.reverse()
}); // });
} // }
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) {
@ -43,9 +43,6 @@ BI.prepares.push(function () {
if (!isIE && supportFlex) { if (!isIE && supportFlex) {
return BI.extend({}, ob, {type: "bi.flex_center_adapt"}); return BI.extend({}, ob, {type: "bi.flex_center_adapt"});
} }
if (ob.horizontalAlign === BI.HorizontalAlign.Right) {
return BI.extend({}, ob, {type: "bi.inline_center_adapt", items: ob.items && ob.items.reverse()});
}
return BI.extend({}, ob, {type: "bi.inline_center_adapt"}); return BI.extend({}, ob, {type: "bi.inline_center_adapt"});
} }
return ob; return ob;
@ -57,9 +54,6 @@ BI.prepares.push(function () {
if (!isIE && supportFlex) { if (!isIE && supportFlex) {
return BI.extend({}, ob, {type: "bi.flex_vertical_center_adapt"}); return BI.extend({}, ob, {type: "bi.flex_vertical_center_adapt"});
} }
if (ob.horizontalAlign === BI.HorizontalAlign.Right) {
return BI.extend({}, ob, {type: "bi.inline_vertical_adapt", items: ob.items && ob.items.reverse()});
}
return BI.extend({}, ob, {type: "bi.inline_vertical_adapt"}); return BI.extend({}, ob, {type: "bi.inline_vertical_adapt"});
} }
return ob; return ob;

2
src/core/wrapper/layout/adapt/absolute.center.js

@ -6,7 +6,7 @@
BI.AbsoluteCenterLayout = BI.inherit(BI.Layout, { BI.AbsoluteCenterLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.AbsoluteCenterLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.AbsoluteCenterLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-absolute-center-layout", baseCls: "bi-abs-c-a",
hgap: 0, hgap: 0,
lgap: 0, lgap: 0,
rgap: 0, rgap: 0,

2
src/core/wrapper/layout/adapt/absolute.horizontal.js

@ -6,7 +6,7 @@
BI.AbsoluteHorizontalLayout = BI.inherit(BI.Layout, { BI.AbsoluteHorizontalLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.AbsoluteHorizontalLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.AbsoluteHorizontalLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-absolute-horizontal-layout", baseCls: "bi-abs-h-a",
hgap: 0, hgap: 0,
lgap: 0, lgap: 0,
rgap: 0, rgap: 0,

2
src/core/wrapper/layout/adapt/absolute.vertical.js

@ -6,7 +6,7 @@
BI.AbsoluteVerticalLayout = BI.inherit(BI.Layout, { BI.AbsoluteVerticalLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.AbsoluteVerticalLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.AbsoluteVerticalLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-absolute-vertical-layout", baseCls: "bi-abs-v-a",
hgap: 0, hgap: 0,
lgap: 0, lgap: 0,
rgap: 0, rgap: 0,

2
src/core/wrapper/layout/adapt/adapt.center.js

@ -6,7 +6,7 @@
BI.CenterAdaptLayout = BI.inherit(BI.Layout, { BI.CenterAdaptLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.CenterAdaptLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.CenterAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-center-adapt-layout", baseCls: "bi-c-a",
horizontalAlign: BI.HorizontalAlign.Center, horizontalAlign: BI.HorizontalAlign.Center,
columnSize: [], columnSize: [],
scrollx: false, scrollx: false,

2
src/core/wrapper/layout/adapt/adapt.horizontal.js

@ -6,7 +6,7 @@
BI.HorizontalAdaptLayout = BI.inherit(BI.Layout, { BI.HorizontalAdaptLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.HorizontalAdaptLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.HorizontalAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-horizontal-adapt-layout", baseCls: "bi-h-a",
verticalAlign: BI.VerticalAlign.Top, verticalAlign: BI.VerticalAlign.Top,
columnSize: [], columnSize: [],
scrollx: false, scrollx: false,

85
src/core/wrapper/layout/adapt/adapt.leftrightvertical.js

@ -10,14 +10,20 @@
BI.LeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, { BI.LeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.LeftRightVerticalAdaptLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.LeftRightVerticalAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-left-right-vertical-adapt-layout", baseCls: "bi-lr-v-a",
items: {}, items: {},
llgap: 0, llgap: 0,
lrgap: 0, lrgap: 0,
lhgap: 0, lhgap: 0,
ltgap: 0,
lbgap: 0,
lvgap: 0,
rlgap: 0, rlgap: 0,
rrgap: 0, rrgap: 0,
rhgap: 0 rhgap: 0,
rtgap: 0,
rbgap: 0,
rvgap: 0
}); });
}, },
render: function () { render: function () {
@ -30,11 +36,17 @@ BI.LeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
items: [{ items: [{
el: { el: {
type: "bi.vertical_adapt", type: "bi.vertical_adapt",
ref: function (_ref) {
self.left = _ref;
},
height: "100%", height: "100%",
items: o.items.left, items: o.items.left,
hgap: o.lhgap, hgap: o.lhgap,
lgap: o.llgap, lgap: o.llgap,
rgap: o.lrgap rgap: o.lrgap,
tgap: o.ltgap,
bgap: o.lbgap,
vgap: o.lvgap
} }
}] }]
}); });
@ -45,12 +57,17 @@ BI.LeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
items: [{ items: [{
el: { el: {
type: "bi.vertical_adapt", type: "bi.vertical_adapt",
ref: function (_ref) {
self.right = _ref;
},
height: "100%", height: "100%",
items: o.items.right, items: o.items.right,
textAlign: "right",
hgap: o.rhgap, hgap: o.rhgap,
lgap: o.rlgap, lgap: o.rlgap,
rgap: o.rrgap rgap: o.rrgap,
tgap: o.rtgap,
bgap: o.rbgap,
vgap: o.rvgap
} }
}] }]
}); });
@ -68,8 +85,8 @@ BI.LeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
}, },
populate: function (items) { populate: function (items) {
BI.LeftRightVerticalAdaptLayout.superclass.populate.apply(this, arguments); this.left.populate(items.left);
this._mount(); this.right.populate(items.right);
} }
}); });
BI.shortcut("bi.left_right_vertical_adapt", BI.LeftRightVerticalAdaptLayout); BI.shortcut("bi.left_right_vertical_adapt", BI.LeftRightVerticalAdaptLayout);
@ -78,31 +95,34 @@ BI.shortcut("bi.left_right_vertical_adapt", BI.LeftRightVerticalAdaptLayout);
BI.LeftVerticalAdaptLayout = BI.inherit(BI.Layout, { BI.LeftVerticalAdaptLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.LeftRightVerticalAdaptLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.LeftRightVerticalAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-left-vertical-adapt-layout", baseCls: "bi-l-v-a",
items: [], items: [],
lgap: 0, lgap: 0,
rgap: 0, rgap: 0,
hgap: 0 hgap: 0,
tgap: 0,
bgap: 0,
vgap: 0
}); });
}, },
render: function () { render: function () {
var o = this.options, self = this; var o = this.options, self = this;
BI.LeftVerticalAdaptLayout.superclass.render.apply(this, arguments); BI.LeftVerticalAdaptLayout.superclass.render.apply(this, arguments);
return { return {
type: "bi.left", type: "bi.vertical_adapt",
ref: function (_ref) { ref: function (_ref) {
self.layout = _ref; self.layout = _ref;
}, },
items: [{
el: {
type: "bi.vertical_adapt",
height: "100%",
items: o.items, items: o.items,
lgap: o.lgap,
hgap: o.hgap, hgap: o.hgap,
rgap: o.rgap lgap: o.lgap,
} rgap: o.rgap,
}] tgap: o.tgap,
bgap: o.bgap,
vgap: o.vgap,
scrollx: o.scrollx,
scrolly: o.scrolly,
scrollable: o.scrollable
}; };
}, },
@ -124,32 +144,35 @@ BI.shortcut("bi.left_vertical_adapt", BI.LeftVerticalAdaptLayout);
BI.RightVerticalAdaptLayout = BI.inherit(BI.Layout, { BI.RightVerticalAdaptLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.RightVerticalAdaptLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.RightVerticalAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-right-vertical-adapt-layout", baseCls: "bi-r-v-a",
items: [], items: [],
lgap: 0, lgap: 0,
rgap: 0, rgap: 0,
hgap: 0 hgap: 0,
tgap: 0,
bgap: 0,
vgap: 0
}); });
}, },
render: function () { render: function () {
var o = this.options, self = this; var o = this.options, self = this;
BI.RightVerticalAdaptLayout.superclass.render.apply(this, arguments); BI.RightVerticalAdaptLayout.superclass.render.apply(this, arguments);
return { return {
type: "bi.right", type: "bi.vertical_adapt",
ref: function (_ref) { ref: function (_ref) {
self.layout = _ref; self.layout = _ref;
}, },
items: [{ horizontalAlign: BI.HorizontalAlign.Right,
el: {
type: "bi.vertical_adapt",
height: "100%",
textAlign: "right",
items: o.items, items: o.items,
lgap: o.lgap,
hgap: o.hgap, hgap: o.hgap,
rgap: o.rgap lgap: o.lgap,
} rgap: o.rgap,
}] tgap: o.tgap,
bgap: o.bgap,
vgap: o.vgap,
scrollx: o.scrollx,
scrolly: o.scrolly,
scrollable: o.scrollable
}; };
}, },
@ -163,7 +186,7 @@ BI.RightVerticalAdaptLayout = BI.inherit(BI.Layout, {
}, },
populate: function (items) { populate: function (items) {
this.layout.populate.apply(this, arguments); this.layout.populate(items);
} }
}); });
BI.shortcut("bi.right_vertical_adapt", BI.RightVerticalAdaptLayout); BI.shortcut("bi.right_vertical_adapt", BI.RightVerticalAdaptLayout);

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

@ -6,7 +6,7 @@
BI.TableAdaptLayout = BI.inherit(BI.Layout, { BI.TableAdaptLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.TableAdaptLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.TableAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-table-adapt-layout", baseCls: "bi-t-a",
columnSize: [], columnSize: [],
verticalAlign: BI.VerticalAlign.Top, verticalAlign: BI.VerticalAlign.Top,
horizontalAlign: BI.HorizontalAlign.Left, horizontalAlign: BI.HorizontalAlign.Left,
@ -35,7 +35,7 @@ BI.TableAdaptLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) { _addElement: function (i, item) {
var o = this.options; var o = this.options;
var td; var td;
var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i]; var width = o.columnSize[i] <= 1 ? ((o.columnSize[i] * 100).toFixed(1) + "%") : o.columnSize[i];
if (!this.hasWidget(this._getChildName(i))) { if (!this.hasWidget(this._getChildName(i))) {
var w = BI._lazyCreateWidget(item); var w = BI._lazyCreateWidget(item);
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"}); w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});
@ -53,7 +53,7 @@ BI.TableAdaptLayout = BI.inherit(BI.Layout, {
// 1、由于直接对td设置最大宽度是在规范中未定义的, 所以要使用类似td:firstChild来迂回实现 // 1、由于直接对td设置最大宽度是在规范中未定义的, 所以要使用类似td:firstChild来迂回实现
// 2、不能给多个td设置最大宽度,这样只会平分宽度 // 2、不能给多个td设置最大宽度,这样只会平分宽度
// 3、多百分比宽度就算了 // 3、多百分比宽度就算了
td.element.css({"max-width": o.columnSize[i] <= 1 ? width : width / BI.pixRatio + BI.pixUnit}); td.element.css({"max-width": BI.isNumber(o.columnSize[i]) ? (o.columnSize[i] <= 1 ? width : width / BI.pixRatio + BI.pixUnit) : width});
if (i === 0) { if (i === 0) {
td.element.addClass("first-element"); td.element.addClass("first-element");
} }

2
src/core/wrapper/layout/adapt/adapt.vertical.js

@ -5,7 +5,7 @@
*/ */
BI.VerticalAdaptLayout = BI.inherit(BI.Layout, { BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
props: { props: {
baseCls: "bi-vertical-adapt-layout", baseCls: "bi-v-a",
horizontalAlign: BI.HorizontalAlign.Left, horizontalAlign: BI.HorizontalAlign.Left,
columnSize: [], columnSize: [],
scrollx: false, scrollx: false,

2
src/core/wrapper/layout/adapt/auto.horizontal.js

@ -6,7 +6,7 @@
BI.HorizontalAutoLayout = BI.inherit(BI.Layout, { BI.HorizontalAutoLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.HorizontalAutoLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.HorizontalAutoLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-horizon-auto-layout", baseCls: "bi-h-o",
hgap: 0, hgap: 0,
lgap: 0, lgap: 0,
rgap: 0, rgap: 0,

5
src/core/wrapper/layout/adapt/float.horizontal.js

@ -0,0 +1,5 @@
/**
* 浮动的水平居中布局
*/
BI.FloatHorizontalLayout = BI.Layout;
BI.shortcut("bi.horizontal_float", BI.FloatHorizontalLayout);

6
src/core/wrapper/layout/adapt/inline.center.js

@ -11,7 +11,7 @@ BI.InlineCenterAdaptLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.InlineCenterAdaptLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.InlineCenterAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-inline-center-adapt-layout", baseCls: "bi-i-c-a",
horizontalAlign: BI.HorizontalAlign.Center, horizontalAlign: BI.HorizontalAlign.Center,
verticalAlign: BI.VerticalAlign.Middle, verticalAlign: BI.VerticalAlign.Middle,
columnSize: [], columnSize: [],
@ -38,11 +38,11 @@ BI.InlineCenterAdaptLayout = BI.inherit(BI.Layout, {
var o = this.options; var o = this.options;
var w = BI.InlineCenterAdaptLayout.superclass._addElement.apply(this, arguments); var w = BI.InlineCenterAdaptLayout.superclass._addElement.apply(this, arguments);
w.element.css({ w.element.css({
width: o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : (o.columnSize[i] / BI.pixRatio + BI.pixUnit), width: o.columnSize[i] <= 1 ? ((o.columnSize[i] * 100).toFixed(1) + "%") : (o.columnSize[i] / BI.pixRatio + BI.pixUnit),
position: "relative", position: "relative",
"vertical-align": o.verticalAlign "vertical-align": o.verticalAlign
}); });
w.element.addClass("inline-center-adapt-item"); w.element.addClass("i-c-a-item");
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0)) / BI.pixRatio + BI.pixUnit "margin-top": (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0)) / BI.pixRatio + BI.pixUnit

6
src/core/wrapper/layout/adapt/inline.horizontal.js

@ -11,7 +11,7 @@ BI.InlineHorizontalAdaptLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.InlineHorizontalAdaptLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.InlineHorizontalAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-inline-horizontal-adapt-layout", baseCls: "bi-i-h-a",
horizontalAlign: BI.HorizontalAlign.Center, horizontalAlign: BI.HorizontalAlign.Center,
verticalAlign: BI.VerticalAlign.Top, verticalAlign: BI.VerticalAlign.Top,
columnSize: [], columnSize: [],
@ -38,11 +38,11 @@ BI.InlineHorizontalAdaptLayout = BI.inherit(BI.Layout, {
var o = this.options; var o = this.options;
var w = BI.InlineHorizontalAdaptLayout.superclass._addElement.apply(this, arguments); var w = BI.InlineHorizontalAdaptLayout.superclass._addElement.apply(this, arguments);
w.element.css({ w.element.css({
width: o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : (o.columnSize[i] / BI.pixRatio + BI.pixUnit), width: o.columnSize[i] <= 1 ? ((o.columnSize[i] * 100).toFixed(1) + "%") : (o.columnSize[i] / BI.pixRatio + BI.pixUnit),
position: "relative", position: "relative",
"vertical-align": o.verticalAlign "vertical-align": o.verticalAlign
}); });
w.element.addClass("inline-horizontal-adapt-item"); w.element.addClass("i-h-a-item");
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0)) / BI.pixRatio + BI.pixUnit "margin-top": (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0)) / BI.pixRatio + BI.pixUnit

6
src/core/wrapper/layout/adapt/inline.vertical.js

@ -11,7 +11,7 @@ BI.InlineVerticalAdaptLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.InlineVerticalAdaptLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.InlineVerticalAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-inline-vertical-adapt-layout", baseCls: "bi-i-v-a",
horizontalAlign: BI.HorizontalAlign.Left, horizontalAlign: BI.HorizontalAlign.Left,
verticalAlign: BI.VerticalAlign.Middle, verticalAlign: BI.VerticalAlign.Middle,
columnSize: [], columnSize: [],
@ -38,11 +38,11 @@ BI.InlineVerticalAdaptLayout = BI.inherit(BI.Layout, {
var o = this.options; var o = this.options;
var w = BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this, arguments); var w = BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this, arguments);
w.element.css({ w.element.css({
width: o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : (o.columnSize[i] / BI.pixRatio + BI.pixUnit), width: o.columnSize[i] <= 1 ? ((o.columnSize[i] * 100).toFixed(1) + "%") : (o.columnSize[i] / BI.pixRatio + BI.pixUnit),
position: "relative", position: "relative",
"vertical-align": o.verticalAlign "vertical-align": o.verticalAlign
}); });
w.element.addClass("inline-vertical-adapt-item"); w.element.addClass("i-v-a-item");
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0)) / BI.pixRatio + BI.pixUnit "margin-top": (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0)) / BI.pixRatio + BI.pixUnit

2
src/core/wrapper/layout/flex/flex.center.js

@ -8,7 +8,7 @@
BI.FlexCenterLayout = BI.inherit(BI.Layout, { BI.FlexCenterLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.FlexCenterLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.FlexCenterLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-flex-center-adapt-layout", baseCls: "bi-f-c",
verticalAlign: BI.VerticalAlign.Middle, verticalAlign: BI.VerticalAlign.Middle,
horizontalAlign: BI.HorizontalAlign.Center, horizontalAlign: BI.HorizontalAlign.Center,
hgap: 0, hgap: 0,

2
src/core/wrapper/layout/flex/flex.horizontal.center.js

@ -7,7 +7,7 @@
BI.FlexHorizontalCenter = BI.inherit(BI.Layout, { BI.FlexHorizontalCenter = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.FlexHorizontalCenter.superclass.props.apply(this, arguments), { return BI.extend(BI.FlexHorizontalCenter.superclass.props.apply(this, arguments), {
baseCls: "bi-flex-horizontal-center-adapt-layout", baseCls: "bi-f-h-c",
verticalAlign: BI.VerticalAlign.Top, verticalAlign: BI.VerticalAlign.Top,
rowSize: [], rowSize: [],
scrolly: false, scrolly: false,

4
src/core/wrapper/layout/flex/flex.horizontal.js

@ -8,7 +8,7 @@
BI.FlexHorizontalLayout = BI.inherit(BI.Layout, { BI.FlexHorizontalLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.FlexHorizontalLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.FlexHorizontalLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-flex-horizontal-layout", baseCls: "bi-f-h",
verticalAlign: BI.VerticalAlign.Top, verticalAlign: BI.VerticalAlign.Top,
horizontalAlign: BI.HorizontalAlign.Left,// 如果只有一个子元素且想让该子元素横向撑满,设置成Stretch horizontalAlign: BI.HorizontalAlign.Left,// 如果只有一个子元素且想让该子元素横向撑满,设置成Stretch
columnSize: [], columnSize: [],
@ -42,7 +42,7 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, {
} }
} }
if (o.columnSize[i] > 0) { if (o.columnSize[i] > 0) {
w.element.width(o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : (o.columnSize[i] / BI.pixRatio + BI.pixUnit)); w.element.width(o.columnSize[i] <= 1 ? ((o.columnSize[i] * 100).toFixed(1) + "%") : (o.columnSize[i] / BI.pixRatio + BI.pixUnit));
} }
if (o.columnSize[i] === "fill") { if (o.columnSize[i] === "fill") {
w.element.addClass("fill"); w.element.addClass("fill");

2
src/core/wrapper/layout/flex/flex.vertical.center.js

@ -8,7 +8,7 @@
BI.FlexVerticalCenter = BI.inherit(BI.Layout, { BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.FlexVerticalCenter.superclass.props.apply(this, arguments), { return BI.extend(BI.FlexVerticalCenter.superclass.props.apply(this, arguments), {
baseCls: "bi-flex-vertical-center-adapt-layout", baseCls: "bi-f-v-c",
horizontalAlign: BI.HorizontalAlign.Left, horizontalAlign: BI.HorizontalAlign.Left,
columnSize: [], columnSize: [],
scrollx: false, scrollx: false,

4
src/core/wrapper/layout/flex/flex.vertical.js

@ -7,7 +7,7 @@
BI.FlexVerticalLayout = BI.inherit(BI.Layout, { BI.FlexVerticalLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.FlexVerticalLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.FlexVerticalLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-flex-vertical-layout", baseCls: "bi-f-v",
horizontalAlign: BI.HorizontalAlign.Left, horizontalAlign: BI.HorizontalAlign.Left,
verticalAlign: BI.VerticalAlign.Top, verticalAlign: BI.VerticalAlign.Top,
rowSize: [], rowSize: [],
@ -41,7 +41,7 @@ BI.FlexVerticalLayout = BI.inherit(BI.Layout, {
} }
} }
if (o.rowSize[i] > 0) { if (o.rowSize[i] > 0) {
w.element.height(o.rowSize[i] <= 1 ? (o.rowSize[i] * 100 + "%") : (o.rowSize[i] / BI.pixRatio + BI.pixUnit)); w.element.height(o.rowSize[i] <= 1 ? ((o.rowSize[i] * 100).toFixed(1) + "%") : (o.rowSize[i] / BI.pixRatio + BI.pixUnit));
} }
if (o.rowSize[i] === "fill") { if (o.rowSize[i] === "fill") {
w.element.addClass("fill"); w.element.addClass("fill");

2
src/core/wrapper/layout/flex/wrapper/flex.wrapper.center.js

@ -8,7 +8,7 @@
BI.FlexWrapperCenterLayout = BI.inherit(BI.Layout, { BI.FlexWrapperCenterLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.FlexWrapperCenterLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.FlexWrapperCenterLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-flex-scrollable-center-adapt-layout clearfix", baseCls: "bi-f-s-c clearfix",
horizontalAlign: BI.HorizontalAlign.Center, horizontalAlign: BI.HorizontalAlign.Center,
verticalAlign: BI.VerticalAlign.Middle, verticalAlign: BI.VerticalAlign.Middle,
columnSize: [], columnSize: [],

2
src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.center.js

@ -8,7 +8,7 @@
BI.FlexWrapperHorizontalCenter = BI.inherit(BI.Layout, { BI.FlexWrapperHorizontalCenter = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.FlexWrapperHorizontalCenter.superclass.props.apply(this, arguments), { return BI.extend(BI.FlexWrapperHorizontalCenter.superclass.props.apply(this, arguments), {
baseCls: "bi-flex-scrollable-vertical-center-adapt-layout clearfix", baseCls: "bi-f-s-v-c clearfix",
verticalAlign: BI.VerticalAlign.Top, verticalAlign: BI.VerticalAlign.Top,
rowSize: [], rowSize: [],
scrollable: true, scrollable: true,

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

@ -8,7 +8,7 @@
BI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, { BI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.FlexWrapperHorizontalLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.FlexWrapperHorizontalLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-flex-scrollable-horizontal-layout clearfix", baseCls: "bi-f-s-h clearfix",
verticalAlign: BI.VerticalAlign.Top, verticalAlign: BI.VerticalAlign.Top,
horizontalAlign: BI.HorizontalAlign.Left, horizontalAlign: BI.HorizontalAlign.Left,
columnSize: [], columnSize: [],
@ -25,7 +25,7 @@ BI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, {
render: function () { render: function () {
BI.FlexWrapperHorizontalLayout.superclass.render.apply(this, arguments); BI.FlexWrapperHorizontalLayout.superclass.render.apply(this, arguments);
var o = this.options; var o = this.options;
this.$wrapper = BI.Widget._renderEngine.createElement("<div>").addClass("flex-scrollable-horizontal-layout-wrapper v-" + o.verticalAlign).addClass("h-" + o.horizontalAlign); this.$wrapper = BI.Widget._renderEngine.createElement("<div>").addClass("f-s-h-w v-" + o.verticalAlign).addClass("h-" + o.horizontalAlign);
this.populate(this.options.items); this.populate(this.options.items);
}, },
@ -43,7 +43,7 @@ BI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, {
} }
} }
if (o.columnSize[i] > 0) { if (o.columnSize[i] > 0) {
w.element.width(o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : (o.columnSize[i] / BI.pixRatio + BI.pixUnit)); w.element.width(o.columnSize[i] <= 1 ? ((o.columnSize[i] * 100).toFixed(1) + "%") : (o.columnSize[i] / BI.pixRatio + BI.pixUnit));
} }
if (o.columnSize[i] === "fill") { if (o.columnSize[i] === "fill") {
w.element.addClass("fill"); w.element.addClass("fill");

2
src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.center.js

@ -8,7 +8,7 @@
BI.FlexWrapperVerticalCenter = BI.inherit(BI.Layout, { BI.FlexWrapperVerticalCenter = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.FlexWrapperVerticalCenter.superclass.props.apply(this, arguments), { return BI.extend(BI.FlexWrapperVerticalCenter.superclass.props.apply(this, arguments), {
baseCls: "bi-flex-scrollable-vertical-center-adapt-layout clearfix", baseCls: "bi-f-s-v-c clearfix",
horizontalAlign: BI.HorizontalAlign.Left, horizontalAlign: BI.HorizontalAlign.Left,
columnSize: [], columnSize: [],
scrollx: false, scrollx: false,

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

@ -8,7 +8,7 @@
BI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, { BI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.FlexWrapperVerticalLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.FlexWrapperVerticalLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-flex-scrollable-vertical-layout clearfix", baseCls: "bi-f-s-v clearfix",
horizontalAlign: BI.HorizontalAlign.Left, horizontalAlign: BI.HorizontalAlign.Left,
verticalAlign: BI.VerticalAlign.Top, verticalAlign: BI.VerticalAlign.Top,
rowSize: [], rowSize: [],
@ -25,7 +25,7 @@ BI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, {
render: function () { render: function () {
BI.FlexWrapperVerticalLayout.superclass.render.apply(this, arguments); BI.FlexWrapperVerticalLayout.superclass.render.apply(this, arguments);
var o = this.options; var o = this.options;
this.$wrapper = BI.Widget._renderEngine.createElement("<div>").addClass("flex-scrollable-vertical-layout-wrapper h-" + o.horizontalAlign).addClass("v-" + o.verticalAlign); this.$wrapper = BI.Widget._renderEngine.createElement("<div>").addClass("f-s-v-w h-" + o.horizontalAlign).addClass("v-" + o.verticalAlign);
this.populate(this.options.items); this.populate(this.options.items);
}, },
@ -43,7 +43,7 @@ BI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, {
} }
} }
if (o.rowSize[i] > 0) { if (o.rowSize[i] > 0) {
w.element.height(o.rowSize[i] <= 1 ? (o.rowSize[i] * 100 + "%") : (o.rowSize[i] / BI.pixRatio + BI.pixUnit)); w.element.height(o.rowSize[i] <= 1 ? ((o.rowSize[i] * 100).toFixed(1) + "%") : (o.rowSize[i] / BI.pixRatio + BI.pixUnit));
} }
if (o.rowSize[i] === "fill") { if (o.rowSize[i] === "fill") {
w.element.addClass("fill"); w.element.addClass("fill");

2
src/core/wrapper/layout/layout.absolute.js

@ -6,7 +6,7 @@
BI.AbsoluteLayout = BI.inherit(BI.Layout, { BI.AbsoluteLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.AbsoluteLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.AbsoluteLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-absolute-layout", baseCls: "bi-abs",
hgap: null, hgap: null,
vgap: null, vgap: null,
lgap: null, lgap: null,

2
src/core/wrapper/layout/layout.adaptive.js

@ -1,7 +1,7 @@
BI.AdaptiveLayout = BI.inherit(BI.Layout, { BI.AdaptiveLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.AdaptiveLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.AdaptiveLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-adaptive-layout", baseCls: "bi-adaptive",
hgap: null, hgap: null,
vgap: null, vgap: null,
lgap: null, lgap: null,

2
src/core/wrapper/layout/layout.border.js

@ -7,7 +7,7 @@
BI.BorderLayout = BI.inherit(BI.Layout, { BI.BorderLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.BorderLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.BorderLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-border-layout", baseCls: "bi-border",
items: {} items: {}
}); });
}, },

2
src/core/wrapper/layout/layout.division.js

@ -7,7 +7,7 @@
BI.DivisionLayout = BI.inherit(BI.Layout, { BI.DivisionLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.DivisionLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.DivisionLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-division-layout", baseCls: "bi-division",
columns: null, columns: null,
rows: null, rows: null,
items: [] items: []

4
src/core/wrapper/layout/layout.flow.js

@ -10,7 +10,7 @@
BI.FloatLeftLayout = BI.inherit(BI.Layout, { BI.FloatLeftLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.FloatLeftLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.FloatLeftLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-float-left-layout clearfix", baseCls: "bi-left clearfix",
hgap: 0, hgap: 0,
vgap: 0, vgap: 0,
lgap: 0, lgap: 0,
@ -86,7 +86,7 @@ BI.shortcut("bi.left", BI.FloatLeftLayout);
BI.FloatRightLayout = BI.inherit(BI.Layout, { BI.FloatRightLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.FloatRightLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.FloatRightLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-float-right-layout clearfix", baseCls: "bi-right clearfix",
hgap: 0, hgap: 0,
vgap: 0, vgap: 0,
lgap: 0, lgap: 0,

2
src/core/wrapper/layout/layout.grid.js

@ -7,7 +7,7 @@
BI.GridLayout = BI.inherit(BI.Layout, { BI.GridLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.GridLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.GridLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-grid-layout", baseCls: "bi-grid",
columns: null, columns: null,
rows: null, rows: null,
items: [] items: []

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

@ -6,7 +6,7 @@
BI.HorizontalLayout = BI.inherit(BI.Layout, { BI.HorizontalLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.HorizontalLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.HorizontalLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-horizontal-layout", baseCls: "bi-h",
verticalAlign: BI.VerticalAlign.Top, verticalAlign: BI.VerticalAlign.Top,
horizontalAlign: BI.HorizontalAlign.Left, horizontalAlign: BI.HorizontalAlign.Left,
columnSize: [], columnSize: [],
@ -39,7 +39,7 @@ BI.HorizontalLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) { _addElement: function (i, item) {
var o = this.options; var o = this.options;
var td; var td;
var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i]; var width = o.columnSize[i] <= 1 ? ((o.columnSize[i] * 100).toFixed(1) + "%") : o.columnSize[i];
if (!this.hasWidget(this._getChildName(i))) { if (!this.hasWidget(this._getChildName(i))) {
var w = BI._lazyCreateWidget(item); var w = BI._lazyCreateWidget(item);
w.element.css({position: "relative", margin: "0px auto"}); w.element.css({position: "relative", margin: "0px auto"});
@ -60,7 +60,7 @@ BI.HorizontalLayout = BI.inherit(BI.Layout, {
// 1、由于直接对td设置最大宽度是在规范中未定义的, 所以要使用类似td:firstChild来迂回实现 // 1、由于直接对td设置最大宽度是在规范中未定义的, 所以要使用类似td:firstChild来迂回实现
// 2、不能给多个td设置最大宽度,这样只会平分宽度 // 2、不能给多个td设置最大宽度,这样只会平分宽度
// 3、多百分比宽度就算了 // 3、多百分比宽度就算了
td.element.css({"max-width": o.columnSize[i] <= 1 ? width : width / BI.pixRatio + BI.pixUnit}); td.element.css({"max-width": BI.isNumber(o.columnSize[i]) ? (o.columnSize[i] <= 1 ? width : width / BI.pixRatio + BI.pixUnit) : width});
if (i === 0) { if (i === 0) {
td.element.addClass("first-element"); td.element.addClass("first-element");
} }

2
src/core/wrapper/layout/layout.inline.js

@ -11,7 +11,7 @@ BI.InlineLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.InlineLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.InlineLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-inline-layout", baseCls: "bi-i",
hgap: 0, hgap: 0,
vgap: 0, vgap: 0,
lgap: 0, lgap: 0,

2
src/core/wrapper/layout/layout.lattice.js

@ -10,7 +10,7 @@
BI.LatticeLayout = BI.inherit(BI.Layout, { BI.LatticeLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.LatticeLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.LatticeLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-lattice-layout clearfix" baseCls: "bi-lattice clearfix"
// columnSize: [0.2, 0.2, 0.6], // columnSize: [0.2, 0.2, 0.6],
}); });
}, },

14
src/core/wrapper/layout/layout.table.js

@ -7,7 +7,7 @@
BI.TableLayout = BI.inherit(BI.Layout, { BI.TableLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.TableLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.TableLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-table-layout", baseCls: "bi-t",
scrolly: true, scrolly: true,
columnSize: [200, 200, "fill"], columnSize: [200, 200, "fill"],
rowSize: 30, // or [30,30,30] rowSize: 30, // or [30,30,30]
@ -79,8 +79,8 @@ BI.TableLayout = BI.inherit(BI.Layout, {
abs.push(BI.extend({ abs.push(BI.extend({
top: 0, top: 0,
bottom: 0, bottom: 0,
left: o.columnSize[i] <= 1 ? left * 100 + "%" : left, left: o.columnSize[i] <= 1 ? (left * 100).toFixed(1) + "%" : left,
width: o.columnSize[i] <= 1 ? o.columnSize[i] * 100 + "%" : o.columnSize[i] width: o.columnSize[i] <= 1 ? (o.columnSize[i] * 100).toFixed(1) + "%" : o.columnSize[i]
}, arr[i])); }, arr[i]));
left += o.columnSize[i] + (o.columnSize[i] < 1 ? 0 : o.hgap); left += o.columnSize[i] + (o.columnSize[i] < 1 ? 0 : o.hgap);
} else { } else {
@ -93,8 +93,8 @@ BI.TableLayout = BI.inherit(BI.Layout, {
abs.push(BI.extend({ abs.push(BI.extend({
top: 0, top: 0,
bottom: 0, bottom: 0,
right: o.columnSize[j] <= 1 ? right * 100 + "%" : right, right: o.columnSize[j] <= 1 ? (right * 100).toFixed(1) + "%" : right,
width: o.columnSize[j] <= 1 ? o.columnSize[j] * 100 + "%" : o.columnSize[j] width: o.columnSize[j] <= 1 ? (o.columnSize[j] * 100).toFixed(1) + "%" : o.columnSize[j]
}, arr[j])); }, arr[j]));
right += o.columnSize[j] + (o.columnSize[j] < 1 ? 0 : o.hgap); right += o.columnSize[j] + (o.columnSize[j] < 1 ? 0 : o.hgap);
} else { } else {
@ -106,8 +106,8 @@ BI.TableLayout = BI.inherit(BI.Layout, {
abs.push(BI.extend({ abs.push(BI.extend({
top: 0, top: 0,
bottom: 0, bottom: 0,
left: left <= 1 ? left * 100 + "%" : left, left: left <= 1 ? (left * 100).toFixed(1) + "%" : left,
right: right <= 1 ? right * 100 + "%" : right right: right <= 1 ? (right * 100).toFixed(1) + "%" : right
}, arr[i])); }, arr[i]));
} }
var w = BI._lazyCreateWidget({ var w = BI._lazyCreateWidget({

10
src/core/wrapper/layout/layout.tape.js

@ -6,7 +6,7 @@
BI.HTapeLayout = BI.inherit(BI.Layout, { BI.HTapeLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.HTapeLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.HTapeLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-h-tape-layout", baseCls: "bi-h-tape",
hgap: 0, hgap: 0,
vgap: 0, vgap: 0,
lgap: 0, lgap: 0,
@ -69,7 +69,7 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
left[i] = left[i - 1] + items[i - 1].width + (items[i - 1].lgap || 0) + 2 * (items[i - 1].hgap || 0) + o.hgap + o.lgap + o.rgap; left[i] = left[i - 1] + items[i - 1].width + (items[i - 1].lgap || 0) + 2 * (items[i - 1].hgap || 0) + o.hgap + o.lgap + o.rgap;
} }
if (item.width < 1 && item.width >= 0) { if (item.width < 1 && item.width >= 0) {
w.element.css({left: left[i] * 100 + "%", width: item.width * 100 + "%"}); w.element.css({left: (left[i] * 100).toFixed(1) + "%", width: (item.width * 100).toFixed(1) + "%"});
} else { } else {
w.element.css({ w.element.css({
left: (left[i] + (item.lgap || 0) + (item.hgap || 0) + o.hgap + o.lgap) / BI.pixRatio + BI.pixUnit, left: (left[i] + (item.lgap || 0) + (item.hgap || 0) + o.hgap + o.lgap) / BI.pixRatio + BI.pixUnit,
@ -86,7 +86,7 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
right[i] = right[i + 1] + items[i + 1].width + (items[i + 1].rgap || 0) + 2 * (items[i + 1].hgap || 0) + o.hgap + o.lgap + o.rgap; right[i] = right[i + 1] + items[i + 1].width + (items[i + 1].rgap || 0) + 2 * (items[i + 1].hgap || 0) + o.hgap + o.lgap + o.rgap;
} }
if (item.width < 1 && item.width >= 0) { if (item.width < 1 && item.width >= 0) {
w.element.css({right: right[i] * 100 + "%", width: item.width * 100 + "%"}); w.element.css({right: (right[i] * 100).toFixed(1) + "%", width: (item.width * 100).toFixed(1) + "%"});
} else { } else {
w.element.css({ w.element.css({
right: (right[i] + (item.rgap || 0) + (item.hgap || 0) + o.hgap + o.rgap) / BI.pixRatio + BI.pixUnit, right: (right[i] + (item.rgap || 0) + (item.hgap || 0) + o.hgap + o.rgap) / BI.pixRatio + BI.pixUnit,
@ -186,7 +186,7 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
top[i] = top[i - 1] + items[i - 1].height + (items[i - 1].tgap || 0) + 2 * (items[i - 1].vgap || 0) + o.vgap + o.tgap + o.bgap; top[i] = top[i - 1] + items[i - 1].height + (items[i - 1].tgap || 0) + 2 * (items[i - 1].vgap || 0) + o.vgap + o.tgap + o.bgap;
} }
if (item.height < 1 && item.height >= 0) { if (item.height < 1 && item.height >= 0) {
w.element.css({top: top[i] * 100 + "%", height: item.height * 100 + "%"}); w.element.css({top: (top[i] * 100).toFixed(1) + "%", height: (item.height * 100).toFixed(1) + "%"});
} else { } else {
w.element.css({ w.element.css({
top: (top[i] + (item.vgap || 0) + (item.tgap || 0) + o.vgap + o.tgap) / BI.pixRatio + BI.pixUnit, top: (top[i] + (item.vgap || 0) + (item.tgap || 0) + o.vgap + o.tgap) / BI.pixRatio + BI.pixUnit,
@ -203,7 +203,7 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
bottom[i] = bottom[i + 1] + items[i + 1].height + (items[i + 1].bgap || 0) + 2 * (items[i + 1].vgap || 0) + o.vgap + o.tgap + o.bgap; bottom[i] = bottom[i + 1] + items[i + 1].height + (items[i + 1].bgap || 0) + 2 * (items[i + 1].vgap || 0) + o.vgap + o.tgap + o.bgap;
} }
if (item.height < 1 && item.height >= 0) { if (item.height < 1 && item.height >= 0) {
w.element.css({bottom: bottom[i] * 100 + "%", height: item.height * 100 + "%"}); w.element.css({bottom: (bottom[i] * 100).toFixed(1) + "%", height: (item.height * 100).toFixed(1) + "%"});
} else { } else {
w.element.css({ w.element.css({
bottom: (bottom[i] + (item.vgap || 0) + (item.bgap || 0) + o.vgap + o.bgap) / BI.pixRatio + BI.pixUnit, bottom: (bottom[i] + (item.vgap || 0) + (item.bgap || 0) + o.vgap + o.bgap) / BI.pixRatio + BI.pixUnit,

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

@ -6,7 +6,7 @@
BI.TdLayout = BI.inherit(BI.Layout, { BI.TdLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.TdLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.TdLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-td-layout", baseCls: "bi-td",
columnSize: [200, 200, 200], columnSize: [200, 200, 200],
hgap: 0, hgap: 0,
vgap: 0, vgap: 0,
@ -100,7 +100,7 @@ BI.TdLayout = BI.inherit(BI.Layout, {
first(w, this.rows++, i); first(w, this.rows++, i);
var td = BI._lazyCreateWidget({ var td = BI._lazyCreateWidget({
type: "bi.default", type: "bi.default",
width: o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i], width: o.columnSize[i] <= 1 ? ((o.columnSize[i] * 100).toFixed(1) + "%") : o.columnSize[i],
tagName: "td", tagName: "td",
items: [w] items: [w]
}); });

2
src/core/wrapper/layout/layout.vertical.js

@ -6,7 +6,7 @@
BI.VerticalLayout = BI.inherit(BI.Layout, { BI.VerticalLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.VerticalLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.VerticalLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-vertical-layout", baseCls: "bi-v",
hgap: 0, hgap: 0,
vgap: 0, vgap: 0,
lgap: 0, lgap: 0,

18
src/core/wrapper/layout/layout.window.js

@ -6,7 +6,7 @@
BI.WindowLayout = BI.inherit(BI.Layout, { BI.WindowLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.WindowLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.WindowLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-window-layout", baseCls: "bi-window",
columns: 3, columns: 3,
rows: 2, rows: 2,
hgap: 0, hgap: 0,
@ -114,9 +114,9 @@ BI.WindowLayout = BI.inherit(BI.Layout, {
if (BI.isNull(top[i])) { if (BI.isNull(top[i])) {
top[i] = top[i - 1] + (o.rowSize[i - 1] < 1 ? o.rowSize[i - 1] : o.rowSize[i - 1] + o.vgap + o.bgap); top[i] = top[i - 1] + (o.rowSize[i - 1] < 1 ? o.rowSize[i - 1] : o.rowSize[i - 1] + o.vgap + o.bgap);
} }
var t = top[i] <= 1 ? top[i] * 100 + "%" : (top[i] + o.vgap + o.tgap) / BI.pixRatio + BI.pixUnit, h = ""; var t = top[i] <= 1 ? (top[i] * 100).toFixed(1) + "%" : (top[i] + o.vgap + o.tgap) / BI.pixRatio + BI.pixUnit, h = "";
if (BI.isNumber(o.rowSize[i])) { if (BI.isNumber(o.rowSize[i])) {
h = o.rowSize[i] <= 1 ? o.rowSize[i] * 100 + "%" : o.rowSize[i] / BI.pixRatio + BI.pixUnit; h = o.rowSize[i] <= 1 ? (o.rowSize[i] * 100).toFixed(1) + "%" : o.rowSize[i] / BI.pixRatio + BI.pixUnit;
} }
wi.element.css({top: t, height: h}); wi.element.css({top: t, height: h});
first(wi, i, j); first(wi, i, j);
@ -132,9 +132,9 @@ BI.WindowLayout = BI.inherit(BI.Layout, {
if (BI.isNull(bottom[i])) { if (BI.isNull(bottom[i])) {
bottom[i] = bottom[i + 1] + (o.rowSize[i + 1] < 1 ? o.rowSize[i + 1] : o.rowSize[i + 1] + o.vgap + o.tgap); bottom[i] = bottom[i + 1] + (o.rowSize[i + 1] < 1 ? o.rowSize[i + 1] : o.rowSize[i + 1] + o.vgap + o.tgap);
} }
var b = bottom[i] <= 1 ? bottom[i] * 100 + "%" : (bottom[i] + o.vgap + o.bgap) / BI.pixRatio + BI.pixUnit, h = ""; var b = bottom[i] <= 1 ? (bottom[i] * 100).toFixed(1) + "%" : (bottom[i] + o.vgap + o.bgap) / BI.pixRatio + BI.pixUnit, h = "";
if (BI.isNumber(o.rowSize[i])) { if (BI.isNumber(o.rowSize[i])) {
h = o.rowSize[i] <= 1 ? o.rowSize[i] * 100 + "%" : o.rowSize[i] / BI.pixRatio + BI.pixUnit; h = o.rowSize[i] <= 1 ? (o.rowSize[i] * 100).toFixed(1) + "%" : o.rowSize[i] / BI.pixRatio + BI.pixUnit;
} }
wi.element.css({bottom: b, height: h}); wi.element.css({bottom: b, height: h});
first(wi, i, j); first(wi, i, j);
@ -150,9 +150,9 @@ BI.WindowLayout = BI.inherit(BI.Layout, {
if (BI.isNull(left[j])) { if (BI.isNull(left[j])) {
left[j] = left[j - 1] + (o.columnSize[j - 1] < 1 ? o.columnSize[j - 1] : o.columnSize[j - 1] + o.hgap + o.rgap); left[j] = left[j - 1] + (o.columnSize[j - 1] < 1 ? o.columnSize[j - 1] : o.columnSize[j - 1] + o.hgap + o.rgap);
} }
var l = left[j] <= 1 ? left[j] * 100 + "%" : (left[j] + o.hgap + o.lgap) / BI.pixRatio + BI.pixUnit, w = ""; var l = left[j] <= 1 ? (left[j] * 100).toFixed(1) + "%" : (left[j] + o.hgap + o.lgap) / BI.pixRatio + BI.pixUnit, w = "";
if (BI.isNumber(o.columnSize[j])) { if (BI.isNumber(o.columnSize[j])) {
w = o.columnSize[j] <= 1 ? o.columnSize[j] * 100 + "%" : o.columnSize[j] / BI.pixRatio + BI.pixUnit; w = o.columnSize[j] <= 1 ? (o.columnSize[j] * 100).toFixed(1) + "%" : o.columnSize[j] / BI.pixRatio + BI.pixUnit;
} }
wi.element.css({left: l, width: w}); wi.element.css({left: l, width: w});
first(wi, i, j); first(wi, i, j);
@ -168,9 +168,9 @@ BI.WindowLayout = BI.inherit(BI.Layout, {
if (BI.isNull(right[j])) { if (BI.isNull(right[j])) {
right[j] = right[j + 1] + (o.columnSize[j + 1] < 1 ? o.columnSize[j + 1] : o.columnSize[j + 1] + o.hgap + o.lgap); right[j] = right[j + 1] + (o.columnSize[j + 1] < 1 ? o.columnSize[j + 1] : o.columnSize[j + 1] + o.hgap + o.lgap);
} }
var r = right[j] <= 1 ? right[j] * 100 + "%" : (right[j] + o.hgap + o.rgap) / BI.pixRatio + BI.pixUnit, w = ""; var r = right[j] <= 1 ? (right[j] * 100).toFixed(1) + "%" : (right[j] + o.hgap + o.rgap) / BI.pixRatio + BI.pixUnit, w = "";
if (BI.isNumber(o.columnSize[j])) { if (BI.isNumber(o.columnSize[j])) {
w = o.columnSize[j] <= 1 ? o.columnSize[j] * 100 + "%" : o.columnSize[j] / BI.pixRatio + BI.pixUnit; w = o.columnSize[j] <= 1 ? (o.columnSize[j] * 100).toFixed(1) + "%" : o.columnSize[j] / BI.pixRatio + BI.pixUnit;
} }
wi.element.css({right: r, width: w}); wi.element.css({right: r, width: w});
first(wi, i, j); first(wi, i, j);

2
src/core/wrapper/layout/middle/middle.center.js

@ -6,7 +6,7 @@
BI.CenterLayout = BI.inherit(BI.Layout, { BI.CenterLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.CenterLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.CenterLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-center-layout", baseCls: "bi-center",
hgap: 0, hgap: 0,
vgap: 0, vgap: 0,
lgap: 0, lgap: 0,

2
src/core/wrapper/layout/middle/middle.float.center.js

@ -6,7 +6,7 @@
BI.FloatCenterLayout = BI.inherit(BI.Layout, { BI.FloatCenterLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.FloatCenterLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.FloatCenterLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-float-center-layout", baseCls: "bi-float-center",
hgap: 0, hgap: 0,
vgap: 0, vgap: 0,
lgap: 0, lgap: 0,

2
src/core/wrapper/layout/middle/middle.horizontal.js

@ -6,7 +6,7 @@
BI.HorizontalCenterLayout = BI.inherit(BI.Layout, { BI.HorizontalCenterLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.HorizontalCenterLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.HorizontalCenterLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-horizontal-center-layout", baseCls: "bi-h-center",
hgap: 0, hgap: 0,
vgap: 0, vgap: 0,
lgap: 0, lgap: 0,

2
src/core/wrapper/layout/middle/middle.vertical.js

@ -6,7 +6,7 @@
BI.VerticalCenterLayout = BI.inherit(BI.Layout, { BI.VerticalCenterLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.VerticalCenterLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.VerticalCenterLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-vertical-center-layout", baseCls: "bi-v-center",
hgap: 0, hgap: 0,
vgap: 0, vgap: 0,
lgap: 0, lgap: 0,

17
src/less/core/wrapper/flex.horizontal.less

@ -28,7 +28,7 @@
flex-direction: row; flex-direction: row;
} }
.bi-flex-horizontal-layout { .bi-f-h, .bi-flex-horizontal-layout {
.flex(); .flex();
.horizontal(); .horizontal();
@ -105,18 +105,21 @@
-webkit-justify-content: center; -webkit-justify-content: center;
-moz-justify-content: center; -moz-justify-content: center;
-ms-justify-content: center; -ms-justify-content: center;
-o-justify-content: center;
-ms-flex-pack: center; -ms-flex-pack: center;
-o-justify-content: center;
justify-content: center; justify-content: center;
} }
&.h-right { &.h-right {
/* 09版 */
-webkit-box-pack: flex-end;
/* 12版 */ /* 12版 */
-webkit-flex-direction: row-reverse; -webkit-justify-content: flex-end;
-moz-flex-direction: row-reverse; -moz-justify-content: flex-end;
-ms-flex-direction: row-reverse; -ms-justify-content: flex-end;
-o-flex-direction: row-reverse; -ms-flex-pack: end;
flex-direction: row-reverse; -o-justify-content: flex-end;
justify-content: flex-end;
} }
> .shrink-none { > .shrink-none {

17
src/less/core/wrapper/flex.vertical.less

@ -28,7 +28,7 @@
flex-direction: row; flex-direction: row;
} }
.bi-flex-vertical-layout { .bi-f-v, .bi-flex-vertical-layout{
.flex(); .flex();
.vertical(); .vertical();
@ -104,18 +104,21 @@
-webkit-justify-content: center; -webkit-justify-content: center;
-moz-justify-content: center; -moz-justify-content: center;
-ms-justify-content: center; -ms-justify-content: center;
-o-justify-content: center;
-ms-flex-pack: center; -ms-flex-pack: center;
-o-justify-content: center;
justify-content: center; justify-content: center;
} }
&.v-bottom { &.v-bottom {
/* 09版 */
-webkit-box-pack: flex-end;
/* 12版 */ /* 12版 */
-webkit-flex-direction: column-reverse; -webkit-justify-content: flex-end;
-moz-flex-direction: column-reverse; -moz-justify-content: flex-end;
-ms-flex-direction: column-reverse; -ms-justify-content: flex-end;
-o-flex-direction: column-reverse; -ms-flex-pack: end;
flex-direction: column-reverse; -o-justify-content: flex-end;
justify-content: flex-end;
} }
> .shrink-none { > .shrink-none {

17
src/less/core/wrapper/flex.wrapper.horizontal.less

@ -28,8 +28,8 @@
flex-direction: row; flex-direction: row;
} }
.bi-flex-scrollable-horizontal-layout { .bi-f-s-h, .bi-flex-scrollable-horizontal-layout {
& .flex-scrollable-horizontal-layout-wrapper { & .f-s-h-w, & .flex-scrollable-horizontal-layout-wrapper {
.flex(); .flex();
.horizontal(); .horizontal();
@ -118,12 +118,15 @@
} }
&.h-right { &.h-right {
/* 09版 */
-webkit-box-pack: flex-end;
/* 12版 */ /* 12版 */
-webkit-flex-direction: row-reverse; -webkit-justify-content: flex-end;
-moz-flex-direction: row-reverse; -moz-justify-content: flex-end;
-ms-flex-direction: row-reverse; -ms-justify-content: flex-end;
-o-flex-direction: row-reverse; -ms-flex-pack: end;
flex-direction: row-reverse; -o-justify-content: flex-end;
justify-content: flex-end;
} }
> .shrink-none { > .shrink-none {

17
src/less/core/wrapper/flex.wrapper.vertical.less

@ -28,8 +28,8 @@
flex-direction: row; flex-direction: row;
} }
.bi-flex-scrollable-vertical-layout { .bi-f-s-v, .bi-flex-scrollable-vertical-layout {
& .flex-scrollable-vertical-layout-wrapper { & .f-s-v-w, & .flex-scrollable-vertical-layout-wrapper {
.flex(); .flex();
.vertical(); .vertical();
@ -118,12 +118,15 @@
} }
&.v-bottom { &.v-bottom {
/* 09版 */
-webkit-box-pack: flex-end;
/* 12版 */ /* 12版 */
-webkit-flex-direction: column-reverse; -webkit-justify-content: flex-end;
-moz-flex-direction: column-reverse; -moz-justify-content: flex-end;
-ms-flex-direction: column-reverse; -ms-justify-content: flex-end;
-o-flex-direction: column-reverse; -ms-flex-pack: end;
flex-direction: column-reverse; -o-justify-content: flex-end;
justify-content: flex-end;
} }
> .shrink-none { > .shrink-none {

4
src/less/core/wrapper/inline.center.less

@ -1,4 +1,4 @@
.bi-inline-center-adapt-layout { .bi-i-c-a, .bi-inline-center-adapt-layout {
&:after { &:after {
display: inline-block; display: inline-block;
width: 0; width: 0;
@ -7,7 +7,7 @@
content: ' '; content: ' ';
} }
& > .inline-center-adapt-item { & > .i-c-a-item, & > .inline-center-adapt-item {
display: inline-block; display: inline-block;
&.x-icon { &.x-icon {

4
src/less/core/wrapper/inline.horizontal.less

@ -1,4 +1,4 @@
.bi-inline-horizontal-adapt-layout { .bi-i-h-a, .bi-inline-horizontal-adapt-layout {
&:after { &:after {
display: inline-block; display: inline-block;
width: 0; width: 0;
@ -7,7 +7,7 @@
content: ' '; content: ' ';
} }
& > .inline-horizontal-adapt-item { & > .i-h-a-item, & > .inline-horizontal-adapt-item {
display: inline-block; display: inline-block;
&.x-icon { &.x-icon {

4
src/less/core/wrapper/inline.vertical.less

@ -1,4 +1,4 @@
.bi-inline-vertical-adapt-layout { .bi-i-v-a, .bi-inline-vertical-adapt-layout {
&:after { &:after {
display: inline-block; display: inline-block;
width: 0; width: 0;
@ -7,7 +7,7 @@
content: ' '; content: ' ';
} }
& > .inline-vertical-adapt-item { & > .i-v-a-item, & > .inline-vertical-adapt-item {
display: inline-block; display: inline-block;
&.x-icon { &.x-icon {

8
src/widget/dynamicdate/dynamicdate.combo.js

@ -16,12 +16,6 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
supportDynamic: true, supportDynamic: true,
}, },
_init: function () {
var o = this.options;
o.height -= 2;
BI.DynamicDateCombo.superclass._init.apply(this, arguments);
},
render: function () { render: function () {
var self = this, opts = this.options; var self = this, opts = this.options;
this.storeTriggerValue = ""; this.storeTriggerValue = "";
@ -61,7 +55,7 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
format: opts.format, format: opts.format,
allowEdit: opts.allowEdit, allowEdit: opts.allowEdit,
watermark: opts.watermark, watermark: opts.watermark,
height: opts.height, height: opts.height - 2,
value: opts.value, value: opts.value,
ref: function () { ref: function () {
self.trigger = this; self.trigger = this;

8
src/widget/dynamicdatetime/dynamicdatetime.combo.js

@ -16,12 +16,6 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
supportDynamic: true supportDynamic: true
}, },
_init: function () {
var o = this.options;
o.height -= 2;
BI.DynamicDateTimeCombo.superclass._init.apply(this, arguments);
},
render: function () { render: function () {
var self = this, opts = this.options; var self = this, opts = this.options;
this.storeTriggerValue = ""; this.storeTriggerValue = "";
@ -61,7 +55,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
allowEdit: opts.allowEdit, allowEdit: opts.allowEdit,
watermark: opts.watermark, watermark: opts.watermark,
format: opts.format, format: opts.format,
height: opts.height, height: opts.height - 2,
value: opts.value, value: opts.value,
ref: function () { ref: function () {
self.trigger = this; self.trigger = this;

4
src/widget/multilayerdownlist/popup.downlist.js

@ -111,7 +111,7 @@ BI.MultiLayerDownListPopup = BI.inherit(BI.Pane, {
}; };
self._createChildren(item); self._createChildren(item);
} else { } else {
item.type = "bi.down_list_item"; item.type = item.type || "bi.down_list_item";
item.title = item.title || item.text; item.title = item.title || item.text;
item.textRgap = 10; item.textRgap = 10;
item.isNeedAdjustWidth = false; item.isNeedAdjustWidth = false;
@ -159,7 +159,7 @@ BI.MultiLayerDownListPopup = BI.inherit(BI.Pane, {
var fatherValue = BI.deepClone(self._formatEL(item).el.value); var fatherValue = BI.deepClone(self._formatEL(item).el.value);
var childValue = BI.deepClone(child.value); var childValue = BI.deepClone(child.value);
self.singleValues.push(child.value); self.singleValues.push(child.value);
child.type = "bi.down_list_item"; child.type = child.type || "bi.down_list_item";
child.extraCls = " child-down-list-item"; child.extraCls = " child-down-list-item";
child.title = child.title || child.text; child.title = child.title || child.text;
child.textRgap = 10; child.textRgap = 10;

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save