f / vue-wait

Complex Loader and Progress Management for Vue/Vuex and Nuxt Applications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add integration with nuxt asyncData/fetch

Kolobok12309 opened this issue · comments

Mb for nuxt asyncData api, because waitFor not working for this
Something like this

export default function (waiter, func) {
  return async (...args) => {
    const { app } = args[0];

    try {
      app.wait.start(waiter);
      return await func.apply(this, args);
    } finally {
      app.wait.end(waiter);
    }
  };
};

Or if vue-wait have this function, sorry and help pls)