最新亚洲精品福利在线,欧美一区二区三区大片,久久91无码一区二区三区,色哟哟免费观看视频入口,美女裸露双奶头屁股无裸体

ES6分別暴露export與默認(rèn)暴露export default組件及引入

時(shí)間:2023-10-08 15:30:38 類型:JS/JQUERY
字號(hào):    

ES6中除了單獨(dú)分別export, 及export default外,也可以組合使用

示例如下:

a.js

const R = {name:"莊子",age:18}

export class Bird{}
export default R;

b.js

import R,{Bird} from "./Module"
//R引入的是默認(rèn)暴露,{Bird}引入的是分別暴露
console.log(new Bird(),R.name);


<