2017-04-22 100 views

回答

0

您是否尝试过使用它?

exports.first = function() { 
    exports.second('hai'); 
} 

exports.second = function (type) { 
     console.log(type); 
} 

这应该有效。如果不是,请告诉我。

1

您正在将功能绑定到export object而不是this

所以,你应该使用export对象来调用它。

exports.first = function() { 
     exports.second('hai'); 
    } 
相关问题