Es6 Arrow expression this

for example, I wrote
const fn = () = > {
this / / in test.js how to get this this to get the vue object?
}
export default fn
then in the vue file
import test from "test"

test.fn.bind (this) ()
but what if the this in fn is not a pointing vue object?

Aug.17,2021
Whether

is the this of the arrow function determines the scope when it is defined and cannot be changed. In this case, the arrow function


cannot be used.

define a variable outside this function equal to the vue object

let self = this;
const fn = () => {  
    //selfvue
}
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-1eab1b9-2032.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-1eab1b9-2032.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?