Ask for help. The timeout for setting axios is invalid.

axios.get(path, {
        timeout: 1000,
        params: {
            id: 12
        }
    });

repeatedly checked, backend 3 seconds to respond, I set axios 1 second timeout, but axios has not entered the catch, how fat 4?

clipboard.png
clipboard.png


found some clues on StackOverflow, needs to create an Axios instance

try to update JsFiddle, and it works
https://jsfiddle.net/Les41a0c/2/

.

axiosVueVue.prototype.axios = axios

import Vue from 'vue'
import App from './App'

//axios
Vue.prototype.axios = axiso;
axios.interceptors.response.use()

axios.get(path,params,{timeout: 1000});

//
Menu