- 
      
- 
        Save Korveld/8e998b227e03cf74d177f53bb82928a0 to your computer and use it in GitHub Desktop. 
    Handle resize event in Nuxt JS
  
        
  
    
      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
    
  
  
    
  | <script> | |
| export default { | |
| mounted: function () { | |
| this.$nextTick(function () { | |
| this.onResize(); | |
| }) | |
| window.addEventListener('resize', this.onResize) | |
| }, | |
| methods: { | |
| onResize() { | |
| console.log('Resized') | |
| } | |
| } | |
| } | |
| </script> | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment