mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2024-04-21 12:32:22 +00:00
docs: 变量名改为习惯用法
xxx这种名称偏向于口语化,适用于不严格的使用环境。 开发常用的约定俗称的随机名是 foo, bar, baz 等等
This commit is contained in:
+2
-2
@@ -404,9 +404,9 @@ export {add as default};
|
||||
// export default add;
|
||||
|
||||
// app.js
|
||||
import { default as xxx } from 'modules';
|
||||
import { default as foo } from 'modules';
|
||||
// 等同于
|
||||
// import xxx from 'modules';
|
||||
// import foo from 'modules';
|
||||
```
|
||||
|
||||
正是因为`export default`命令其实只是输出一个叫做`default`的变量,所以它后面不能跟变量声明语句。
|
||||
|
||||
Reference in New Issue
Block a user