1.第一种写法(一个变量)
export const config ={ } 导出 ------》 import { config} from ’ ./index.js ’
2. 第二种写法(多个变量)
export { config,fun1,fn} 导出 ------》import { config,fun1,fn} from ‘./index.js’
ES6 Module export与import
最新推荐文章于 2022-09-05 10:37:47 发布
1.第一种写法(一个变量)
export const config ={ } 导出 ------》 import { config} from ’ ./index.js ’
2. 第二种写法(多个变量)
export { config,fun1,fn} 导出 ------》import { config,fun1,fn} from ‘./index.js’