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 68eac8890e7aab4e0bb892b5701feceb19f40dc4..05d5f7c4e56c466eba964e6aefccf4c98b3c0d11 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+