support use transitiongroup in el-col (#4483)

pull/4491/head
baiyaaaaa 2017-04-27 13:07:29 +08:00 committed by cinwell.li
parent 3655d0be33
commit f989479961
2 changed files with 12 additions and 12 deletions

View File

@ -17,23 +17,21 @@ export default {
computed: {
gutter() {
return this.$parent.gutter;
},
style() {
var ret = {};
if (this.gutter) {
ret.paddingLeft = this.gutter / 2 + 'px';
ret.paddingRight = ret.paddingLeft;
let parent = this.$parent;
while (parent && parent.$options.componentName !== 'ElRow') {
parent = parent.$parent;
}
return ret;
return parent ? parent.gutter : 0;
}
},
render(h) {
let { style } = this;
let classList = [];
let style = {};
if (this.gutter) {
style.paddingLeft = this.gutter / 2 + 'px';
style.paddingRight = style.paddingLeft;
}
['span', 'offset', 'pull', 'push'].forEach(prop => {
if (this[prop]) {

View File

@ -17,6 +17,8 @@
export default {
name: 'ElRow',
componentName: 'ElRow',
props: {
gutter: Number,
type: String,