问题描述我要取到size,在父作用域中使用,这样写会不会有什么问题?asyncfunction(){...letsize=awaitthis.fileSize(filePath).then(size=>size)}fileSize(){returnPromise((resolve)=>{...resolve(size)})}
我要取到size,在父作用域中使用,这样写会不会有什么问题?asyncfunction(){...letsize=awaitthis.fileSize(filePath).then(size=>size)}fileSize(){returnPromise((resolve)=>{...resolve(size)})}
asyncfunction(){...letsize=awaitthis.fileSize(filePath).then(size=>size)}fileSize(){returnPromise((resolve)=>{...resolve(size)})}
...letsize=awaitthis.fileSize(filePath).then(size=>size)}fileSize(){returnPromise((resolve)=>{...resolve(size)})}
letsize=awaitthis.fileSize(filePath).then(size=>size)}fileSize(){returnPromise((resolve)=>{...resolve(size)})}
}fileSize(){returnPromise((resolve)=>{...resolve(size)})}
fileSize(){returnPromise((resolve)=>{...resolve(size)})}
returnPromise((resolve)=>{...resolve(size)})}
...resolve(size)})}
resolve(size)})}
})}
}
慕码人8056858
相关分类