mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2024-04-21 12:32:22 +00:00
edit module
This commit is contained in:
+2
-2
@@ -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`方法。
|
||||
|
||||
Reference in New Issue
Block a user