node.js中this指向失效解决

问题:在外部单独使用类实例对象的方法,this没有指向该类实例对象 代码如下 class CQH { hello() { let name = this.name(); console.log( ); } name() { return "chenqionghe" } } const cqh = n
posted @ 2019-08-26 20:42  雪山飞猪  阅读(1143)  评论(0编辑  收藏  举报