ciao!
sono paio d'ore che ci sbatto la testa ma non riesco a capire.
anche perchè questo problema ce l'ho solo qua.
in pratica:
li dove ho messo errore mi dice questo:codice:<script> import AllenamentiService from '@/service/AllenamentiService'; export default { data() { return { allService: null, totQta: null, events: null } }, created() { this.allService = new AllenamentiService(); }, mounted() { this.getAll(); }, methods: { getAll() { this.allService.getAll().then(data => { console.log(data); // SI VEDONO TUTTI I DATI this.events = data; this.totQta = data.length; // VALORIZZATO CORRETTAMENTE console.log(this.events); // ERRORE }); } } } </script>
dato che solo qui mi da questo problema non riesco proprio a capire.codice:Proxy { <target>: (1455) […], <handler>: {…} } <target>: Array(1455) [ {…}, {…}, {…}, … ] <handler>: Object { get: get(target, key, receiver), set: set(target, key, value, receiver), deleteProperty: deleteProperty(target, key), … } deleteProperty: function deleteProperty(target, key) get: function get(target, key, receiver) has: function has(target, key) ownKeys: function ownKeys(target) set: function set(target, key, value, receiver) <prototype>: Object { … }
anche perchè quel allService.getAll() già lo uso in un altro componente!

Rispondi quotando