const sleep = ms => new Promise(resolve => setTimeout(resolve, ms)); async test() { // 业务逻辑1 await sleep(1000); // 业务逻辑2 }
本文标题:RN 延迟 sleep
本文链接:https://www.haomeiwen.com/subject/eppqlctx.html
网友评论