<template>
<div class="dd"></div>
</template>
<script>
import apifrom '../api.json'
let dataList=api
export default{
data(){
return {
}
},
mounted () {
this.getGoodsList()
},
methods: {
async getGoodsList (data) {
const res=await dataList(data)
console.log(res);
}
}
}
</script>
<style>
</style>
想使用json文件异步获取数据,请问各位专家 应该怎样写获取到数据