摘要:
代码如下 <div onClick={e=>{ e.stopPropagation(); }} /> 这样是能阻止冒泡的 ,e.stopPropagation(); 能正常 执行 但是下面 这样写 是不行的 <div onClick={async (e)=>{ let res = await xxx 阅读全文
posted @ 2022-10-08 21:09
ifnk
阅读(97)
评论(0)
推荐(0)
摘要:
forEach 数组里面 forEach 如果带 await 的话,里面 是并行的 [1,2,3].forEach(async (x) => { await xxx(x) }) 这里面 1 2 3 是 会同时被 xxx 函数处理的 想要并行的话,得写成这样 for (const x of [1, 2 阅读全文
posted @ 2022-10-08 09:16
ifnk
阅读(815)
评论(0)
推荐(0)

浙公网安备 33010602011771号