eslint-格式错误

报错内容:

iterators/generators require regenerator-runtime, which is too heavyweight for this guide to allow them. Separately, loops should be avoided in favor of array iterations  no-restricted-syntax

报错代码

for (let item of params){

str += `${item.seriesName} : ${item.value}%<br>`;

}

 解决方案:

params.forEach((item:any) => {

str += `${item.seriesName} : ${item.value}%<br>`;

});

猜你喜欢

转载自blog.csdn.net/weixin_56263402/article/details/121159435
今日推荐