es6 export-from用法
Posted tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了es6 export-from用法相关的知识,希望对你有一定的参考价值。
语法:
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
以上是关于es6 export-from用法的主要内容,如果未能解决你的问题,请参考以下文章