Skip to content

Instantly share code, notes, and snippets.

@Tusko
Created October 2, 2019 12:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tusko/f055ed6a12047cc7c8cfacd00b011a1a to your computer and use it in GitHub Desktop.
Save Tusko/f055ed6a12047cc7c8cfacd00b011a1a to your computer and use it in GitHub Desktop.
get parent component refs VUE
export default {
mounted () {
let profile = this.$parent
let flag = false
while (!flag) {
if (has(profile.$refs, 'profileScroll')) {
flag = true
} else {
profile = profile.$parent
}
}
profile.$refs.profileScroll.onMouseWheel = () => {}
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment