[Vuejs]-Smooth transition of v-if/else height in Vue.js

0👍

Shameless plug, I created vue-smooth-reflow for this exact use case.

Here’s a demo: https://jsfiddle.net/guanzo/snyvoxec/1/

new Vue({
  el: '#demo',
  mixins: [SmoothReflow],
  data: {
    show: true
  },
    mounted(){
        this.$smoothReflow()
    },
  methods: {
    loadData() {
        this.show = !this.show
      setTimeout(() => {  
        this.show = !this.show
      }, 1000);
    }
  }
})

Leave a comment