1.export
export test1 = ()=>{
}
import {test1} from "/"
總結通過 export 導出的方法、函數(shù) import導入時要加{ };使用時直接用test1
2.export default
export defult test2
import test2 from "/"
默認導出 能且只能導出這一項,使用時直接用test2
3.export default {}
export default {test3,test4}
import name from "/"
name.test3
默認部分導出,能導出多項 import 導入的是{test3,test4} 并且沒有名字 需要自定義,在通過name.test3的
方式使用