1. Instalación
npm install --save axios
Captura de pantalla de la finalización de la instalación (si hay un error, consulte el artículo
anterior ) 2. Configure en main.js
3. Utilice
created () {
this.$axios.get("http://localhost:8080/static/js/data.json").then((response) => {
this.$nextTick(() => {
console.log(response)
})
})
},