Last active
February 18, 2019 19:54
-
-
Save pxwee5/b8739c1f0959d9ff29ba580280cfec81 to your computer and use it in GitHub Desktop.
WindowInstanceMap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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