ES6中的import和export使用方法

  1. 1
    2
    3
    4
    export const obj = {};
    export const obj2 = {};

    import * as JsName from './jsName.js'; // obj和obj2均在JsName对象下
  2. 1
    2
    3
    4
    5
    export const obj = {};
    export const obj2 = {};

    import { obj } from './schedule.js';
    import { obj2 } from './schedule.js';