如下图,我想让图中的CPU,内存以及网络数据包获取函数同时执行应该怎么办?
JS部分
axios.all
const fn = () => {
Promise.all([fn1(),fn2(),fn3()])
}
runAllRequests() {
Promise.all([this.getCPU(), this.getMen(), this.getNet()]).then((res) => {
console.log('res', res);
});
}
公用promise