Skip to content

Commit 13f696e

Browse files
Update module.md
这里有歧义。输出时已经each方法改写成forEach:'export { each as forEach }',import时只需要引入forEach即可,不需要再import { each as forEach } from 'lodash'。如果你import的as表示的是export中的第二个export,那实际上第三个的export就不需要写了
1 parent 8a0f974 commit 13f696e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/module.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ import _ from 'lodash';
464464
如果想在一条`import`语句中,同时输入默认方法和其他接口,可以写成下面这样。
465465

466466
```javascript
467-
import _, { each, each as forEach } from 'lodash';
467+
import _, { each, forEach } from 'lodash';
468468
```
469469

470470
对应上面代码的`export`语句如下。

0 commit comments

Comments
 (0)