模拟接口延迟

代码块3212 阅读0
 await new Promise((resolve) => {
    setTimeout(() => {
      resolve(true);
    }, 3000);
  });

使用Promise,可用于测试按钮loading等

评论

发表评论