組件1 one.vue和組件2 two.vue都發(fā)起這個(gè)請(qǐng)求,反復(fù)來(lái)回切換,每次都請(qǐng)求,如何阻止,路由地址是固定的。mounted: function () { axios.get('http://192.168.137.1/jsonp-test/data/dish_getbypage.php?start=2') .then((response)=> { console.log(response) this.foodsList=response.data }).catch((error) => { console.log(error) }) }
vue2來(lái)回切換路由,如何阻止router-view的組件每次都刷新,每次都發(fā)起請(qǐng)求
喵喵時(shí)光機(jī)
2019-03-12 14:15:43