async setStateAsync(state) { return new Promise((resolve) => { this.setState(state, resolve); }); }
或者这样写
setStateAsync = async (state) => { return new Promise((resolve) => { this.setState(state, resolve); }); }
posted on 2022-07-05 19:43 漫思 阅读(31) 评论(0) 编辑 收藏 举报