diff --git a/zh-cn/application-dev/reference/apis/js-apis-image.md b/zh-cn/application-dev/reference/apis/js-apis-image.md index 2cbde23567dfda510e172245e6e7b71505b04fdd..4c33499d46af3a18ff616caf7ee6057bec2c1d85 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-image.md +++ b/zh-cn/application-dev/reference/apis/js-apis-image.md @@ -2079,9 +2079,9 @@ dequeueImage(callback: AsyncCallback\): void ```js creator.dequeueImage((err, img) => { if (err) { - console.info('dequeueImage succeeded.'); + console.info('dequeueImage failded.'); } - console.info('dequeueImage failed.'); + console.info('dequeueImage succeeded.'); }); ``` @@ -2127,12 +2127,19 @@ queueImage(interface: Image, callback: AsyncCallback\): void **示例:** ```js -creator.queueImage(img, (err) => { +creator.dequeueImage((err, img) => { if (err) { - console.info('dequeueImage failed: ' + err); + console.info('dequeueImage failded.'); } - console.info('dequeueImage succeeded'); -}) + console.info('dequeueImage succeeded.'); + creator.queueImage(img, (err) => { + if (err) { + console.info('dequeueImage failed: ' + err); + } + console.info('dequeueImage succeeded'); + }) +}); + ``` ### queueImage9+ @@ -2158,11 +2165,19 @@ queueImage(interface: Image): Promise\ **示例:** ```js -creator.queueImage(img).then(() => { +creator.dequeueImage().then(img => { console.info('dequeueImage succeeded.'); + creator.queueImage(img).then(() => { + console.info('dequeueImage succeeded.'); + }).catch(error => { + console.info('dequeueImage failed: ' + error); + }) }).catch(error => { - console.info('dequeueImage failed: ' + error); + console.log('dequeueImage failed: ' + error); }) + + + ``` ### on9+