How to Properly Use Vue Router beforeRouteEnter or Watch to trigger method in Single File Component?
问题 I'm working on an app in Vue.js using Single File Components and Vue Router. I have a Search component where I need to execute a method to re-populate search results each time a user visits the route. The method executes correctly the first time the route is visited because of the "create" hook: created: function() { this.initializeSearch(); }, However, when the user leaves the route (to register or log into the app for instance), and returns to the Search page, I can't seem to find a way to