await 就是 等待方法执行完 返回结果 这时候只用接收 就好了 .then 也是等待方法执行完 只是 await 返回的直接是数据 .then返回的是个方法 方法里面带有 数据
异步 await 和.then的区别
最新推荐文章于 2024-03-02 23:24:33 发布
await 就是 等待方法执行完 返回结果 这时候只用接收 就好了 .then 也是等待方法执行完 只是 await 返回的直接是数据 .then返回的是个方法 方法里面带有 数据