[Vuejs]-Import Vue component and update content via axios

0👍

RESOLVED:

the problem was in function searchUser, when I save data into array after take it from axios via GET.

Replace “function” for “=>”

Right is HERE

0👍

That’s because your searchUser function is outside of the vue instance therefore ‘this’ does not refer to it.
Try putting searchUser in methods, you will need to call it with this.searchUser then.

EDIT: your data definition is wrong, it should be:

data() {
        return {
            currentLog: {}
       }
}

Leave a comment