David-Desmaisons / Vue.resize

Vue directive to detect resize events with deboucing and throttling capacity.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed when activated for the second time in the keep-alive component

zsedcbm opened this issue · comments

When I wrap the div with the keep-alive component, v-resize is valid the first time it is entered. When the div re-triggers activated, v-resize is invalid.

https://codepen.io/zsedcbm/pen/RvKKLd

no nested router looks like success

I found this workaround:

  activated(){
    Vueresize.inserted(this.$el, { value: this.relayout});
  },
  deactivated(){
    Vueresize.unbind(this.$el, { value: this.relayout});
  },

Not the most elegant solution, but for now no better idea

https://codepen.io/dede89/pen/JzvPZZ

Corrected in version 1.2.0