ES6 import export

import

import './module1.js';  (无对象导入)
import d from './module1.js'; (导入默认对象)
import {Employee, getEmployee} from './module1.js'; (导入命名对象)
import {default as d, Employee} from './module1.js'; (导入默认对象和命名对象)
import * as allFromModule1 from './module1.js'; (导入所有对象)

Export

export {
Employee,
getEmployee
};
export {
Associate as Employee,
getAssociate as getEmployee
};
export default {
Employee,
getEmployee
};
上一篇:SQL学习笔记四(补充-1-1)之MySQL单表查询补充部分:SQL逻辑查询语句执行顺序


下一篇:步步深入MySQL:架构->查询执行流程->SQL解析顺序!