// hello.js
funciton hello () {
console.log('hello');
}
1.
export.hello = hello;
var aaa = require('hello.js');
aaa.hello(); // console.log('hello');
2.
module.export = hello;
var aaa = require('hello.js');
aaa(); // console.log('hello');
export和module.export的区别
最新推荐文章于 2024-08-24 19:45:13 发布