SvenZhao
11/21/2018 - 9:11 AM

sleep.js

// 延时ms后执行
export function sleep(ms, data) {
  return new Promise(resolve => setTimeout(() => {
    resolve(data);
  }, ms));
}