请问下如何主动的去渲染?
geesmart opened this issue · comments
比如,之前是隐藏的,我显示后,现在就没有看得到效果。怎么主动的去渲染?
<button @click="setActive">click</button>
<Waterfall v-if="active">
<WaterfallItem1</WaterfallItem>
</Waterfall>
data () {
return {
active: false
}
},
methods: {
setActive () {
this.active = true
}
}
这样?没理解你的意思。v-if 会重新渲染,不要用 v-show