mirror of https://github.com/ElemeFE/element
support use transitiongroup in el-col (#4483)
parent
3655d0be33
commit
f989479961
|
@ -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]) {
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
export default {
|
||||
name: 'ElRow',
|
||||
|
||||
componentName: 'ElRow',
|
||||
|
||||
props: {
|
||||
gutter: Number,
|
||||
type: String,
|
||||
|
|
Loading…
Reference in New Issue