# 数据导入导出
- exports
```
/* models/data.js */
var a = 10;
function go(){
console.log("hello")
}
```
a.导出
```
export{a, go};
```
b.导出
```
export default {
a,
go
}
```
- import
对应导出a
```
import{a,go} from "../../models/data" //要写相对路径
```
对应导出b
```
import data from "../../models/data" //'data'自己定义
```