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 f2d0516da50f96cd1a77a97253ab7c1871794e85..3cf22878de46d2e5a7b857fe9fe04667ee2f261b 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-image.md +++ b/zh-cn/application-dev/reference/apis/js-apis-image.md @@ -735,9 +735,15 @@ rotate(angle: number, callback: AsyncCallback\): void **示例:** ```js -async function Demo() { - await pixelmap.rotate(90.0); -} +var angle = 90.0; +pixelmap.rotate(angle, (err) => { + if (err) { + console.error("Failed to set rotation."); + return; + } else { + console.log("Succeeded in setting rotation."); + } +}) ``` ### rotate9+