axios.all(_array).then(axios.spread((...responses) => { console.log(responses) }));以上改成ES5咋写,求问!
2 回答
德玛西亚99
TA贡献1770条经验 获得超3个赞
"use strict";
axios.all(_array).then(axios.spread(function () {
for (var _len = arguments.length, responses = Array(_len), _key = 0; _key < _len; _key++) {
responses[_key] = arguments[_key];
}
console.log(responses);
}));
这个是 babel 官网的转义结果
叮当猫咪
TA贡献1776条经验 获得超12个赞
axios.all(_array).then(axios.spread(function () {
var responses = Array.from(arguments)
console.log(arguments)
}));
添加回答
举报
0/150
提交
取消