Browse Source

Merge pull request #233 in ~GUY/fineui from ~YOUNG/fineuig:master to master

* commit '66b37a416fbb51be0402df2c93115093ae51a62f':
  flex 布局IE10兼容
  BI-10727 布局
es6
Young 7 years ago
parent
commit
a26b167a84
  1. 18
      bi/core.css
  2. 14
      bi/widget.js
  3. 18
      dist/bundle.css
  4. 14
      dist/bundle.js
  5. 18
      dist/core.css
  6. 14
      dist/widget.js
  7. 2
      src/css/core/wrapper/flex.center.css
  8. 6
      src/css/core/wrapper/flex.horizontal.css
  9. 4
      src/css/core/wrapper/flex.vertical.center.css
  10. 2
      src/css/core/wrapper/flex.wrapper.center.css
  11. 2
      src/css/core/wrapper/flex.wrapper.horizontal.css
  12. 2
      src/css/core/wrapper/flex.wrapper.vertical.center.css
  13. 2
      src/less/core/wrapper/flex.center.less
  14. 6
      src/less/core/wrapper/flex.horizontal.less
  15. 4
      src/less/core/wrapper/flex.vertical.center.less
  16. 2
      src/less/core/wrapper/flex.wrapper.center.less
  17. 2
      src/less/core/wrapper/flex.wrapper.horizontal.less
  18. 2
      src/less/core/wrapper/flex.wrapper.vertical.center.less
  19. 14
      src/widget/arrangement/arrangement.js

18
bi/core.css

@ -1225,12 +1225,14 @@ i {
-moz-justify-content: center;
-ms-justify-content: center;
-o-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
/* 09版 */
-webkit-box-align: center;
/* 12版 */
-webkit-align-items: center;
-moz-align-items: center;
-ms-flex-align: center;
-ms-align-items: center;
-o-align-items: center;
align-items: center;
@ -1263,13 +1265,15 @@ i {
-moz-justify-content: flex-start;
-ms-justify-content: flex-start;
-o-justify-content: flex-start;
-ms-flex-pack: start;
justify-content: flex-start;
/* 09版 */
-webkit-box-align: flex-start;
-webkit-box-align: start;
/* 12版 */
-webkit-align-items: flex-start;
-moz-align-items: flex-start;
-ms-align-items: flex-start;
-ms-flex-align: start;
-o-align-items: flex-start;
align-items: flex-start;
/* 09版 */
@ -1288,6 +1292,7 @@ i {
-webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
-ms-flex-align: center;
-o-align-items: center;
align-items: center;
}
@ -1298,6 +1303,7 @@ i {
-webkit-align-items: flex-end;
-moz-align-items: flex-end;
-ms-align-items: flex-end;
-ms-flex-align: end;
-o-align-items: flex-end;
align-items: flex-end;
}
@ -1329,6 +1335,7 @@ i {
-moz-justify-content: flex-start;
-ms-justify-content: flex-start;
-o-justify-content: flex-start;
-ms-flex-pack: start;
justify-content: flex-start;
/* 09版 */
-webkit-box-align: center;
@ -1336,6 +1343,7 @@ i {
-webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
-ms-flex-align: center;
-o-align-items: center;
align-items: center;
/* 09版 */
@ -1362,6 +1370,7 @@ i {
-webkit-justify-content: center;
-moz-justify-content: center;
-ms-justify-content: center;
-ms-flex-pack: center;
-o-justify-content: center;
justify-content: center;
/* 09版 */
@ -1370,6 +1379,7 @@ i {
-webkit-align-items: stretch;
-moz-align-items: stretch;
-ms-align-items: stretch;
-ms-flex-align: stretch;
-o-align-items: stretch;
align-items: stretch;
}
@ -1400,6 +1410,7 @@ i {
-webkit-justify-content: center;
-moz-justify-content: center;
-ms-justify-content: center;
-ms-flex-pack: center;
-o-justify-content: center;
justify-content: center;
/* 09版 */
@ -1408,6 +1419,7 @@ i {
-webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
-ms-flex-align: center;
-o-align-items: center;
align-items: center;
min-width: 100%;
@ -1441,6 +1453,7 @@ i {
-webkit-justify-content: flex-start;
-moz-justify-content: flex-start;
-ms-justify-content: flex-start;
-ms-flex-pack: start;
-o-justify-content: flex-start;
justify-content: flex-start;
/* 09版 */
@ -1449,6 +1462,7 @@ i {
-webkit-align-items: flex-start;
-moz-align-items: flex-start;
-ms-align-items: flex-start;
-ms-flex-align: start;
-o-align-items: flex-start;
align-items: flex-start;
/* 09版 */
@ -1508,6 +1522,7 @@ i {
-webkit-justify-content: flex-start;
-moz-justify-content: flex-start;
-ms-justify-content: flex-start;
-ms-flex-pack: start;
-o-justify-content: flex-start;
justify-content: flex-start;
/* 09版 */
@ -1516,6 +1531,7 @@ i {
-webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
-ms-flex-align: center;
-o-align-items: center;
align-items: center;
/* 09版 */

14
bi/widget.js

@ -1045,7 +1045,7 @@ BI.Arrangement = BI.inherit(BI.Widget, {
element: this.container
});
}
this.wrapper.populate(items);
this.wrapper.addItems(items);
},
getClientWidth: function () {
@ -1778,7 +1778,17 @@ BI.Arrangement = BI.inherit(BI.Widget, {
},
populate: function (items) {
this.regions = {};
// this.regions = {};
var self = this;
BI.each(this.regions, function (name, region) {
var exist = BI.some(items, function (i, item) {
return item.el.attr("id") === name;
});
if (!exist) {
self.regions[name].el.setVisible(false);
}
delete self.regions[name];
});
this._populate(items);
this._renderRegion();
}

18
dist/bundle.css vendored

@ -1225,12 +1225,14 @@ i {
-moz-justify-content: center;
-ms-justify-content: center;
-o-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
/* 09版 */
-webkit-box-align: center;
/* 12版 */
-webkit-align-items: center;
-moz-align-items: center;
-ms-flex-align: center;
-ms-align-items: center;
-o-align-items: center;
align-items: center;
@ -1263,13 +1265,15 @@ i {
-moz-justify-content: flex-start;
-ms-justify-content: flex-start;
-o-justify-content: flex-start;
-ms-flex-pack: start;
justify-content: flex-start;
/* 09版 */
-webkit-box-align: flex-start;
-webkit-box-align: start;
/* 12版 */
-webkit-align-items: flex-start;
-moz-align-items: flex-start;
-ms-align-items: flex-start;
-ms-flex-align: start;
-o-align-items: flex-start;
align-items: flex-start;
/* 09版 */
@ -1288,6 +1292,7 @@ i {
-webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
-ms-flex-align: center;
-o-align-items: center;
align-items: center;
}
@ -1298,6 +1303,7 @@ i {
-webkit-align-items: flex-end;
-moz-align-items: flex-end;
-ms-align-items: flex-end;
-ms-flex-align: end;
-o-align-items: flex-end;
align-items: flex-end;
}
@ -1329,6 +1335,7 @@ i {
-moz-justify-content: flex-start;
-ms-justify-content: flex-start;
-o-justify-content: flex-start;
-ms-flex-pack: start;
justify-content: flex-start;
/* 09版 */
-webkit-box-align: center;
@ -1336,6 +1343,7 @@ i {
-webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
-ms-flex-align: center;
-o-align-items: center;
align-items: center;
/* 09版 */
@ -1362,6 +1370,7 @@ i {
-webkit-justify-content: center;
-moz-justify-content: center;
-ms-justify-content: center;
-ms-flex-pack: center;
-o-justify-content: center;
justify-content: center;
/* 09版 */
@ -1370,6 +1379,7 @@ i {
-webkit-align-items: stretch;
-moz-align-items: stretch;
-ms-align-items: stretch;
-ms-flex-align: stretch;
-o-align-items: stretch;
align-items: stretch;
}
@ -1400,6 +1410,7 @@ i {
-webkit-justify-content: center;
-moz-justify-content: center;
-ms-justify-content: center;
-ms-flex-pack: center;
-o-justify-content: center;
justify-content: center;
/* 09版 */
@ -1408,6 +1419,7 @@ i {
-webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
-ms-flex-align: center;
-o-align-items: center;
align-items: center;
min-width: 100%;
@ -1441,6 +1453,7 @@ i {
-webkit-justify-content: flex-start;
-moz-justify-content: flex-start;
-ms-justify-content: flex-start;
-ms-flex-pack: start;
-o-justify-content: flex-start;
justify-content: flex-start;
/* 09版 */
@ -1449,6 +1462,7 @@ i {
-webkit-align-items: flex-start;
-moz-align-items: flex-start;
-ms-align-items: flex-start;
-ms-flex-align: start;
-o-align-items: flex-start;
align-items: flex-start;
/* 09版 */
@ -1508,6 +1522,7 @@ i {
-webkit-justify-content: flex-start;
-moz-justify-content: flex-start;
-ms-justify-content: flex-start;
-ms-flex-pack: start;
-o-justify-content: flex-start;
justify-content: flex-start;
/* 09版 */
@ -1516,6 +1531,7 @@ i {
-webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
-ms-flex-align: center;
-o-align-items: center;
align-items: center;
/* 09版 */

14
dist/bundle.js vendored

@ -76130,7 +76130,7 @@ BI.Arrangement = BI.inherit(BI.Widget, {
element: this.container
});
}
this.wrapper.populate(items);
this.wrapper.addItems(items);
},
getClientWidth: function () {
@ -76863,7 +76863,17 @@ BI.Arrangement = BI.inherit(BI.Widget, {
},
populate: function (items) {
this.regions = {};
// this.regions = {};
var self = this;
BI.each(this.regions, function (name, region) {
var exist = BI.some(items, function (i, item) {
return item.el.attr("id") === name;
});
if (!exist) {
self.regions[name].el.setVisible(false);
}
delete self.regions[name];
});
this._populate(items);
this._renderRegion();
}

18
dist/core.css vendored

@ -1225,12 +1225,14 @@ i {
-moz-justify-content: center;
-ms-justify-content: center;
-o-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
/* 09版 */
-webkit-box-align: center;
/* 12版 */
-webkit-align-items: center;
-moz-align-items: center;
-ms-flex-align: center;
-ms-align-items: center;
-o-align-items: center;
align-items: center;
@ -1263,13 +1265,15 @@ i {
-moz-justify-content: flex-start;
-ms-justify-content: flex-start;
-o-justify-content: flex-start;
-ms-flex-pack: start;
justify-content: flex-start;
/* 09版 */
-webkit-box-align: flex-start;
-webkit-box-align: start;
/* 12版 */
-webkit-align-items: flex-start;
-moz-align-items: flex-start;
-ms-align-items: flex-start;
-ms-flex-align: start;
-o-align-items: flex-start;
align-items: flex-start;
/* 09版 */
@ -1288,6 +1292,7 @@ i {
-webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
-ms-flex-align: center;
-o-align-items: center;
align-items: center;
}
@ -1298,6 +1303,7 @@ i {
-webkit-align-items: flex-end;
-moz-align-items: flex-end;
-ms-align-items: flex-end;
-ms-flex-align: end;
-o-align-items: flex-end;
align-items: flex-end;
}
@ -1329,6 +1335,7 @@ i {
-moz-justify-content: flex-start;
-ms-justify-content: flex-start;
-o-justify-content: flex-start;
-ms-flex-pack: start;
justify-content: flex-start;
/* 09版 */
-webkit-box-align: center;
@ -1336,6 +1343,7 @@ i {
-webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
-ms-flex-align: center;
-o-align-items: center;
align-items: center;
/* 09版 */
@ -1362,6 +1370,7 @@ i {
-webkit-justify-content: center;
-moz-justify-content: center;
-ms-justify-content: center;
-ms-flex-pack: center;
-o-justify-content: center;
justify-content: center;
/* 09版 */
@ -1370,6 +1379,7 @@ i {
-webkit-align-items: stretch;
-moz-align-items: stretch;
-ms-align-items: stretch;
-ms-flex-align: stretch;
-o-align-items: stretch;
align-items: stretch;
}
@ -1400,6 +1410,7 @@ i {
-webkit-justify-content: center;
-moz-justify-content: center;
-ms-justify-content: center;
-ms-flex-pack: center;
-o-justify-content: center;
justify-content: center;
/* 09版 */
@ -1408,6 +1419,7 @@ i {
-webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
-ms-flex-align: center;
-o-align-items: center;
align-items: center;
min-width: 100%;
@ -1441,6 +1453,7 @@ i {
-webkit-justify-content: flex-start;
-moz-justify-content: flex-start;
-ms-justify-content: flex-start;
-ms-flex-pack: start;
-o-justify-content: flex-start;
justify-content: flex-start;
/* 09版 */
@ -1449,6 +1462,7 @@ i {
-webkit-align-items: flex-start;
-moz-align-items: flex-start;
-ms-align-items: flex-start;
-ms-flex-align: start;
-o-align-items: flex-start;
align-items: flex-start;
/* 09版 */
@ -1508,6 +1522,7 @@ i {
-webkit-justify-content: flex-start;
-moz-justify-content: flex-start;
-ms-justify-content: flex-start;
-ms-flex-pack: start;
-o-justify-content: flex-start;
justify-content: flex-start;
/* 09版 */
@ -1516,6 +1531,7 @@ i {
-webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
-ms-flex-align: center;
-o-align-items: center;
align-items: center;
/* 09版 */

14
dist/widget.js vendored

@ -1045,7 +1045,7 @@ BI.Arrangement = BI.inherit(BI.Widget, {
element: this.container
});
}
this.wrapper.populate(items);
this.wrapper.addItems(items);
},
getClientWidth: function () {
@ -1778,7 +1778,17 @@ BI.Arrangement = BI.inherit(BI.Widget, {
},
populate: function (items) {
this.regions = {};
// this.regions = {};
var self = this;
BI.each(this.regions, function (name, region) {
var exist = BI.some(items, function (i, item) {
return item.el.attr("id") === name;
});
if (!exist) {
self.regions[name].el.setVisible(false);
}
delete self.regions[name];
});
this._populate(items);
this._renderRegion();
}

2
src/css/core/wrapper/flex.center.css

@ -26,12 +26,14 @@
-moz-justify-content: center;
-ms-justify-content: center;
-o-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
/* 09版 */
-webkit-box-align: center;
/* 12版 */
-webkit-align-items: center;
-moz-align-items: center;
-ms-flex-align: center;
-ms-align-items: center;
-o-align-items: center;
align-items: center;

6
src/css/core/wrapper/flex.horizontal.css

@ -26,13 +26,15 @@
-moz-justify-content: flex-start;
-ms-justify-content: flex-start;
-o-justify-content: flex-start;
-ms-flex-pack: start;
justify-content: flex-start;
/* 09版 */
-webkit-box-align: flex-start;
-webkit-box-align: start;
/* 12版 */
-webkit-align-items: flex-start;
-moz-align-items: flex-start;
-ms-align-items: flex-start;
-ms-flex-align: start;
-o-align-items: flex-start;
align-items: flex-start;
/* 09版 */
@ -51,6 +53,7 @@
-webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
-ms-flex-align: center;
-o-align-items: center;
align-items: center;
}
@ -61,6 +64,7 @@
-webkit-align-items: flex-end;
-moz-align-items: flex-end;
-ms-align-items: flex-end;
-ms-flex-align: end;
-o-align-items: flex-end;
align-items: flex-end;
}

4
src/css/core/wrapper/flex.vertical.center.css

@ -26,6 +26,7 @@
-moz-justify-content: flex-start;
-ms-justify-content: flex-start;
-o-justify-content: flex-start;
-ms-flex-pack: start;
justify-content: flex-start;
/* 09版 */
-webkit-box-align: center;
@ -33,6 +34,7 @@
-webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
-ms-flex-align: center;
-o-align-items: center;
align-items: center;
/* 09版 */
@ -59,6 +61,7 @@
-webkit-justify-content: center;
-moz-justify-content: center;
-ms-justify-content: center;
-ms-flex-pack: center;
-o-justify-content: center;
justify-content: center;
/* 09版 */
@ -67,6 +70,7 @@
-webkit-align-items: stretch;
-moz-align-items: stretch;
-ms-align-items: stretch;
-ms-flex-align: stretch;
-o-align-items: stretch;
align-items: stretch;
}

2
src/css/core/wrapper/flex.wrapper.center.css

@ -25,6 +25,7 @@
-webkit-justify-content: center;
-moz-justify-content: center;
-ms-justify-content: center;
-ms-flex-pack: center;
-o-justify-content: center;
justify-content: center;
/* 09版 */
@ -33,6 +34,7 @@
-webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
-ms-flex-align: center;
-o-align-items: center;
align-items: center;
min-width: 100%;

2
src/css/core/wrapper/flex.wrapper.horizontal.css

@ -25,6 +25,7 @@
-webkit-justify-content: flex-start;
-moz-justify-content: flex-start;
-ms-justify-content: flex-start;
-ms-flex-pack: start;
-o-justify-content: flex-start;
justify-content: flex-start;
/* 09版 */
@ -33,6 +34,7 @@
-webkit-align-items: flex-start;
-moz-align-items: flex-start;
-ms-align-items: flex-start;
-ms-flex-align: start;
-o-align-items: flex-start;
align-items: flex-start;
/* 09版 */

2
src/css/core/wrapper/flex.wrapper.vertical.center.css

@ -25,6 +25,7 @@
-webkit-justify-content: flex-start;
-moz-justify-content: flex-start;
-ms-justify-content: flex-start;
-ms-flex-pack: start;
-o-justify-content: flex-start;
justify-content: flex-start;
/* 09版 */
@ -33,6 +34,7 @@
-webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
-ms-flex-align: center;
-o-align-items: center;
align-items: center;
/* 09版 */

2
src/less/core/wrapper/flex.center.less

@ -22,6 +22,7 @@
-moz-justify-content: center;
-ms-justify-content: center;
-o-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
/* 09版 */
@ -29,6 +30,7 @@
/* 12版 */
-webkit-align-items: center;
-moz-align-items: center;
-ms-flex-align: center;
-ms-align-items: center;
-o-align-items: center;
align-items: center;

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

@ -22,14 +22,16 @@
-moz-justify-content: flex-start;
-ms-justify-content: flex-start;
-o-justify-content: flex-start;
-ms-flex-pack: start;
justify-content: flex-start;
/* 09版 */
-webkit-box-align: flex-start;
-webkit-box-align: start;
/* 12版 */
-webkit-align-items: flex-start;
-moz-align-items: flex-start;
-ms-align-items: flex-start;
-ms-flex-align: start;
-o-align-items: flex-start;
align-items: flex-start;
@ -49,6 +51,7 @@
-webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
-ms-flex-align: center;
-o-align-items: center;
align-items: center;
}
@ -59,6 +62,7 @@
-webkit-align-items: flex-end;
-moz-align-items: flex-end;
-ms-align-items: flex-end;
-ms-flex-align: end;
-o-align-items: flex-end;
align-items: flex-end;
}

4
src/less/core/wrapper/flex.vertical.center.less

@ -22,6 +22,7 @@
-moz-justify-content: flex-start;
-ms-justify-content: flex-start;
-o-justify-content: flex-start;
-ms-flex-pack: start;
justify-content: flex-start;
/* 09版 */
@ -30,6 +31,7 @@
-webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
-ms-flex-align: center;
-o-align-items: center;
align-items: center;
@ -58,6 +60,7 @@
-webkit-justify-content: center;
-moz-justify-content: center;
-ms-justify-content: center;
-ms-flex-pack: center;
-o-justify-content: center;
justify-content: center;
/* 09版 */
@ -66,6 +69,7 @@
-webkit-align-items: stretch;
-moz-align-items: stretch;
-ms-align-items: stretch;
-ms-flex-align: stretch;
-o-align-items: stretch;
align-items: stretch;
}

2
src/less/core/wrapper/flex.wrapper.center.less

@ -21,6 +21,7 @@
-webkit-justify-content: center;
-moz-justify-content: center;
-ms-justify-content: center;
-ms-flex-pack: center;
-o-justify-content: center;
justify-content: center;
@ -30,6 +31,7 @@
-webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
-ms-flex-align: center;
-o-align-items: center;
align-items: center;

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

@ -21,6 +21,7 @@
-webkit-justify-content: flex-start;
-moz-justify-content: flex-start;
-ms-justify-content: flex-start;
-ms-flex-pack: start;
-o-justify-content: flex-start;
justify-content: flex-start;
@ -30,6 +31,7 @@
-webkit-align-items: flex-start;
-moz-align-items: flex-start;
-ms-align-items: flex-start;
-ms-flex-align: start;
-o-align-items: flex-start;
align-items: flex-start;

2
src/less/core/wrapper/flex.wrapper.vertical.center.less

@ -22,6 +22,7 @@
-webkit-justify-content: flex-start;
-moz-justify-content: flex-start;
-ms-justify-content: flex-start;
-ms-flex-pack: start;
-o-justify-content: flex-start;
justify-content: flex-start;
@ -31,6 +32,7 @@
-webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
-ms-flex-align: center;
-o-align-items: center;
align-items: center;

14
src/widget/arrangement/arrangement.js

@ -298,7 +298,7 @@ BI.Arrangement = BI.inherit(BI.Widget, {
element: this.container
});
}
this.wrapper.populate(items);
this.wrapper.addItems(items);
},
getClientWidth: function () {
@ -1031,7 +1031,17 @@ BI.Arrangement = BI.inherit(BI.Widget, {
},
populate: function (items) {
this.regions = {};
// this.regions = {};
var self = this;
BI.each(this.regions, function (name, region) {
var exist = BI.some(items, function (i, item) {
return item.el.attr("id") === name;
});
if (!exist) {
self.regions[name].el.setVisible(false);
}
delete self.regions[name];
});
this._populate(items);
this._renderRegion();
}

Loading…
Cancel
Save