react中在hooks方法useEffect中加载异步数据
useEffect( ()=>{ (async function getPipeList(value:any) { let result= await GetPipeList(value); setPipeList(result.dataList); })({}); (async function getDevicesList(value:any) { let result= await GetDevicesList (value); setDevicesList(result.dataList); })({}); return {setPipeList(null),setDevicesList(null)} },[] );