2

I write method using store, but I want it to run every time the page is refreshed without clicking the button, how can I do this

sabcan
  • 407
  • 3
  • 15
  • 1
    Does this answer your question? [How to call a vue.js function on page load](https://stackoverflow.com/questions/40714319/how-to-call-a-vue-js-function-on-page-load) – JHeth Aug 16 '20 at 19:27
  • 1
    Invoke the method from mounted(). See this doc https://vuejs.org/v2/guide/instance.html. – danh Aug 16 '20 at 19:27

0 Answers0