guy 4 years ago
parent
commit
bff16eb607
  1. 4
      src/core/shortcut.js
  2. 31
      src/less/core/wrapper/flex.wrapper.horizontal.less
  3. 31
      src/less/core/wrapper/flex.wrapper.vertical.less

4
src/core/shortcut.js

@ -60,7 +60,7 @@
BI.Plugin.getObject(el.type, this); BI.Plugin.getObject(el.type, this);
} }
}]); }]);
return w.type === el.type ? createWidget(w, context, lazy) : BI.createWidget(BI.extend({}, item, {type: w.type}), options, context, lazy); return w.type === el.type ? createWidget(w, context, lazy) : BI.createWidget(BI.extend({/**important**/}, el, {type: w.type}), options, context, lazy);
} }
if (item.el && (item.el.type || options.type)) { if (item.el && (item.el.type || options.type)) {
el = BI.extend({}, options, item.el); el = BI.extend({}, options, item.el);
@ -71,7 +71,7 @@
BI.Plugin.getObject(el.type, this); BI.Plugin.getObject(el.type, this);
} }
}]); }]);
return w.type === el.type ? createWidget(w, context, lazy) : BI.createWidget(BI.extend({}, item, {type: w.type}), options, context, lazy); return w.type === el.type ? createWidget(w, context, lazy) : BI.createWidget(BI.extend({/**important**/}, el, {type: w.type}), options, context, lazy);
} }
if (BI.isWidget(item.el)) { if (BI.isWidget(item.el)) {
return item.el; return item.el;

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

@ -54,6 +54,11 @@
-ms-align-items: center; -ms-align-items: center;
-o-align-items: center; -o-align-items: center;
align-items: center; align-items: center;
&.h-center {
min-width: 100%;
float: left;
}
} }
&.v-bottom { &.v-bottom {
@ -101,13 +106,14 @@
&.h-stretch { &.h-stretch {
/* 09版 */ /* 09版 */
-webkit-box-orient: vertical; -webkit-box-align: stretch;
/* 12版 */ /* 12版 */
-webkit-flex-direction: column; -webkit-align-items: stretch;
-moz-flex-direction: column; -moz-align-items: stretch;
-ms-flex-direction: column; -ms-align-items: stretch;
-o-flex-direction: column; -ms-flex-align: stretch;
flex-direction: column; -o-align-items: stretch;
align-items: stretch;
&.v-middle { &.v-middle {
/* 09版 */ /* 09版 */
@ -132,19 +138,6 @@
-o-justify-content: flex-end; -o-justify-content: flex-end;
justify-content: flex-end; justify-content: flex-end;
} }
&.v-stretch {
}
/* 09版 */
-webkit-box-align: stretch;
/* 12版 */
-webkit-align-items: stretch;
-moz-align-items: stretch;
-ms-align-items: stretch;
-ms-flex-align: stretch;
-o-align-items: stretch;
align-items: stretch;
} }
} }
} }

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

@ -55,6 +55,11 @@
-ms-flex-align: center; -ms-flex-align: center;
-o-align-items: center; -o-align-items: center;
align-items: center; align-items: center;
&.v-middle {
min-height: 100%;
float: left;
}
} }
&.h-right { &.h-right {
@ -104,13 +109,14 @@
&.v-stretch { &.v-stretch {
/* 09版 */ /* 09版 */
-webkit-box-orient: horizontal; -webkit-box-align: stretch;
/* 12版 */ /* 12版 */
-webkit-flex-direction: row; -webkit-align-items: stretch;
-moz-flex-direction: row; -moz-align-items: stretch;
-ms-flex-direction: row; -ms-align-items: stretch;
-o-flex-direction: row; -ms-flex-align: stretch;
flex-direction: row; -o-align-items: stretch;
align-items: stretch;
&.h-center { &.h-center {
/* 09版 */ /* 09版 */
@ -135,19 +141,6 @@
-o-justify-content: flex-end; -o-justify-content: flex-end;
justify-content: flex-end; justify-content: flex-end;
} }
&.h-stretch {
}
/* 09版 */
-webkit-box-align: stretch;
/* 12版 */
-webkit-align-items: stretch;
-moz-align-items: stretch;
-ms-align-items: stretch;
-ms-flex-align: stretch;
-o-align-items: stretch;
align-items: stretch;
} }
} }
} }

Loading…
Cancel
Save