class Test { test(){ console.log(this) } } let test1 = new Test() let {test} = new Test() test1.test() //Test //怎样才能让这里实现啊 test() //undefined
class Test { constructor(){ this.test = this.test.bind(this) } test(){ console.log(this) } }
2.1m questions
2.1m answers
60 comments
57.0k users