mackxu
子曰:学而时习之,不亦说乎?

语法:

export * from "foo";
export {foo} from "foo";
export {foo, bar} from "foo";
export {foo as bar} from "foo";
export {foo as default} from "foo";
export {foo as default, bar} from "foo";
export {default} from "foo";
export {default as foo} from "foo";

注意:export-from 用于聚集模块。但不能在直接使用。例如在index.js里export { a } from 'b.js', a在index.js里无法使用

参考:http://blog.csdn.net/DeepLies/article/details/52916221?locationNum=13&fps=1

posted on 2017-06-11 12:19  mackxu  阅读(8518)  评论(0编辑  收藏  举报