How the loading component in vuejs can be hidden after all requests have been returned

currently the loading component is used directly through axios"s interceptor, showing when sending the request and hiding when the response comes back

but for example, if there are multiple requests, the loading is hidden when the first request is returned. I don"t know what can be done to make all the requests respond and then return

.
Mar.02,2021

use

Promise.all([axios1, axios2]).then(() => {
  // loading
})

Promise.all([axios1, axios2]).then(() => {
  this.listLoading = false
}).catch(e => {this.listLoading = false})

global is implemented. The http requests that still exist are counted by interceptors axios.interceptors.request and axios.interceptors.response , and the status of vuex Synchronize is controlled to show and hide through the global loading component.
beside the point, I think this experience is better than no addition.

Menu