PLDaily / vue2-waterfall

😁 An AutoHeight Waterfall Component For Vue2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

请问下如何主动的去渲染?

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