2017-04-22 94 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'); 
    } 
相關問題