axios
the following forms are injected into vue
const asiosInstance = axios.create({
baseURL: apiUrl,
timeout: 10000
})
Vue.prototype.$http = asiosInstance
use it as follows
this.$http.get("xx").then()
my current scenario is that there is a filtering feature in which the filter conditions change when the user clicks, and then requests data immediately, but the backend interface is very slow abroad, and when the user clicks quickly, multiple requests are initiated. When these requests respond, the page will appear how many refresh data, which feels very uncomfortable.
so I think the current this.$http.get ("xx")
ignores the previous request each time, while other locations, such as this.$http.get (" yy")
, are not affected,