Promise

      new Promise((resolve) => {
        setTimeout(() => {
          resolve()
        }, 1000);
      }).then(() => {
        console.log('hello world');
        Message.warning('hello world');
        return new Promise((resolve,) => {
          setTimeout(() => {
            resolve()
          }, 1000);
        })
      }).then(() => {
        Message.warning('hello vuejs');
        console.log('hello vuejs');
        return new Promise((resolve) => {
          setTimeout(() => {
            resolve()
          }, 1000);
        })
      }).then(() => {
        Message.warning('final');
        console.log('final');
      })

上一篇:L1-069 胎压监测


下一篇:认识阿里云ECS //ECS7天实践训练营入门 DAY1