mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-28 21:32:20 +00:00
edit module
This commit is contained in:
parent
2d4b16d4ca
commit
50a63996d5
@ -374,9 +374,9 @@ export { area as circleArea } from 'circle';
|
||||
```javascript
|
||||
// main.js
|
||||
|
||||
module math from "circleplus";
|
||||
import * as math from "circleplus";
|
||||
import exp from "circleplus";
|
||||
console.log(exp(math.E));
|
||||
console.log(exp(math.e));
|
||||
```
|
||||
|
||||
上面代码中的`import exp`表示,将`circleplus`模块的默认方法加载为`exp`方法。
|
||||
|
Loading…
x
Reference in New Issue
Block a user