R
R
Renhor2019-08-24 00:21:32
Vue.js
Renhor, 2019-08-24 00:21:32

How to disable page loading progress bar in Nuxt for normal AJAX requests?

For AJAX I use axios. They wrote like this:

You can also disable progress bar per request using progress config.

this.$axios.$get('URL', { progress: false })

It doesn't work for me like that. If I add progress: false to nuxt.config.js - the progress bar is disabled for loading pages, but I need to disable the progress bar for normal Ajax requests. For example, my chat is updated every 5-15 seconds, and this bar becomes quite annoying.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor, 2020-08-01
@IgorPI

nuxt.config.js

...
  /*
  ** Customize the progress bar color
  */
  loading: false,

  modules: [],
...

In my case, there was also Quasar
Vue.use(Quasar, {
  lang,
  iconSet,
  config: {
    iconSet,
    screen: {
      bodyClasses: true
    },
    loadingBar: {
      color: 'purple',
      size: '0px',
      position: 'bottom'
    }
  }
})

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question