[Vuejs]-Vue.Js, my function is called many times for no reason

0👍

i solve that with items.maps

getBudgets () {
               axios.get('/getbudgets')
               .then(response => {
                  this.budgets = response.data;
                   let items = response.data;
                   this.budgets = items.map((item)=>{
                   item.person.photo = '/img/' + item.person.photo
                    console.log('#', item.person.photo);
                     console.log('#1', );
                     return item;

                    });

               })
               .catch(error => {
                   console.log('errors: ', error);
               })
               },

Then i removed getphoto() from my code and in i wrote that

<img :src=budget.person.photo>

Leave a comment