fixed #540
This commit is contained in:
parent
e5337c810c
commit
c2db4f928c
3 changed files with 31 additions and 20 deletions
|
@ -1,26 +1,29 @@
|
||||||
|
<style>
|
||||||
|
.demo-col div{
|
||||||
|
background: #f50;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<Row>
|
<Row :gutter="16">
|
||||||
<i-col span="12">col-12</i-col>
|
<i-col class-name="demo-col" span="4" v-for="i in n" key="i">
|
||||||
<i-col span="12">col-12</i-col>
|
<div>col-8</div>
|
||||||
</Row>
|
</i-col>
|
||||||
<br>
|
|
||||||
<Row>
|
|
||||||
<i-col span="8">col-8</i-col>
|
|
||||||
<i-col span="8">col-8</i-col>
|
|
||||||
<i-col span="8">col-8</i-col>
|
|
||||||
</Row>
|
|
||||||
<br>
|
|
||||||
<Row>
|
|
||||||
<i-col span="6">col-6</i-col>
|
|
||||||
<i-col span="6">col-6</i-col>
|
|
||||||
<i-col span="6">col-6</i-col>
|
|
||||||
<i-col span="6">col-6</i-col>
|
|
||||||
</Row>
|
</Row>
|
||||||
|
<Button @click="add">add</Button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
n: 2
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
add () {
|
||||||
|
this.n++;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -67,6 +67,17 @@
|
||||||
|
|
||||||
return style;
|
return style;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
updateGutter () {
|
||||||
|
this.$parent.updateGutter(this.$parent.gutter);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted () {
|
||||||
|
this.updateGutter();
|
||||||
|
},
|
||||||
|
beforeDestroy () {
|
||||||
|
this.updateGutter();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -69,9 +69,6 @@
|
||||||
gutter (val) {
|
gutter (val) {
|
||||||
this.updateGutter(val);
|
this.updateGutter(val);
|
||||||
}
|
}
|
||||||
},
|
|
||||||
mounted () {
|
|
||||||
this.updateGutter(this.gutter);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Add table
Reference in a new issue