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>
|
||||
<div>
|
||||
<Row>
|
||||
<i-col span="12">col-12</i-col>
|
||||
<i-col span="12">col-12</i-col>
|
||||
</Row>
|
||||
<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 :gutter="16">
|
||||
<i-col class-name="demo-col" span="4" v-for="i in n" key="i">
|
||||
<div>col-8</div>
|
||||
</i-col>
|
||||
</Row>
|
||||
<Button @click="add">add</Button>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
|
||||
data () {
|
||||
return {
|
||||
n: 2
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
this.n++;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -67,6 +67,17 @@
|
|||
|
||||
return style;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
updateGutter () {
|
||||
this.$parent.updateGutter(this.$parent.gutter);
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.updateGutter();
|
||||
},
|
||||
beforeDestroy () {
|
||||
this.updateGutter();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -69,9 +69,6 @@
|
|||
gutter (val) {
|
||||
this.updateGutter(val);
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.updateGutter(this.gutter);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
Loading…
Add table
Reference in a new issue