Skip to content

Commit

Permalink
Merge pull request hilongjw#239 from taoxhsmile/master
Browse files Browse the repository at this point in the history
unobserve observe can trigger lazyLoadHandler
  • Loading branch information
hilongjw authored Apr 9, 2018
2 parents 7a0d199 + 8cfd6a3 commit 90f297e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lazy.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,10 @@ export default function (Vue) {
loading,
error
})
this._observer && this._observer.observe(el)
if(this._observer){
this._observer.unobserve(el)
this._observer.observe(el)
}
this.lazyLoadHandler()
Vue.nextTick(() => this.lazyLoadHandler())
}
Expand Down

0 comments on commit 90f297e

Please sign in to comment.