Skip to content

Instantly share code, notes, and snippets.

@pxwee5
Last active February 18, 2019 19:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save pxwee5/b8739c1f0959d9ff29ba580280cfec81 to your computer and use it in GitHub Desktop.
Save pxwee5/b8739c1f0959d9ff29ba580280cfec81 to your computer and use it in GitHub Desktop.
WindowInstanceMap
import Vue from 'vue'
const WindowInstanceMap = new Vue({
data() {
return {
scrollY: 0
}
},
created() {
window.addEventListener('scroll', e => {
this.scrollY = window.scrollY
})
},
})
export default WindowInstanceMap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment