Why the this in the request callback of axios does not point to Vue?

in fact, I would like to ask js under what circumstances will it change the direction of this? Is there anything other than bind,apply?

Mar.18,2021

axios is an independent library, which has nothing to do with any framework / library, so why bind to Vue .

in addition to bind apply,call , which can be this each time a function is called, and some methods, such as Array.prototype.map , can set this

of callback through the last parameter.

otherwise this all point to the object calling the function


this points to the object that calls him.


suggest taking a look at the scope


do you want to ask whether the this in the axios request callback points to the question

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e8997c-46d4e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e8997c-46d4e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?