Promise用法. 1 年前. 基础事例. const promise = new Promise((resolve, reject) => {. setTimeout(()=>{. var ok = Math.random() > 0.5// 模拟请求成功或失败.
確定! 回上一頁