导出:
export [default] class/function/variable ...
export {x [as y], ...}
.export {x [as y], ...} from "module"
export * from "module"
(不会重新导出默认的导出)。export {default [as y]} from "module"
(重新导出默认的导出)。导入:
import {x [as y], ...} from "module"
import x from "module"
import {default as x} from "module"
import * as obj from "module"
import "module"
原文:https://www.cnblogs.com/LangZ-/p/13302878.html