1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-24 18:32:22 +00:00

Update module.md

This commit is contained in:
Zheeeng 2018-01-28 11:14:33 +08:00 committed by GitHub
parent 90686191f8
commit c1b0b3f510
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -501,12 +501,12 @@ let o = new MyClass();
```javascript
export { foo, bar } from 'my_module';
// 等同于
// 可以简单理解为
import { foo, bar } from 'my_module';
export { foo, bar };
```
上面代码中,`export``import`语句可以结合在一起,写成一行。
上面代码中,`export``import`语句可以结合在一起,写成一行。但需要注意的是实际上foo、bar并没有被导入到当前模块不能直接使用foo、bar模块。
模块的接口改名和整体输出,也可以采用这种写法。