From 062c5f52eae57dc45e118d246f4fe3364e15d737 Mon Sep 17 00:00:00 2001 From: xu-rui-w Date: Mon, 11 Jul 2022 19:58:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E8=E4=B8=AA=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xu-rui-w --- .../reference/apis/js-apis-image.md | 40 ++++++++++++++----- 1 file changed, 30 insertions(+), 10 deletions(-) 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 8ce3028998..e24b0f80ab 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-image.md +++ b/zh-cn/application-dev/reference/apis/js-apis-image.md @@ -587,7 +587,9 @@ scale(x: number, y: number, callback: AsyncCallback\): void **示例:** ```js -await pixelMap.scale(2.0, 1.0); +async function () { + await pixelMap.scale(2.0, 1.0); +} ``` ### scale9+ @@ -614,7 +616,9 @@ scale(x: number, y: number): Promise\ **示例:** ```js -await pixelMap.scale(2.0, 1.0); +async function () { + await pixelMap.scale(2.0, 1.0); +} ``` ### translate9+ @@ -636,7 +640,9 @@ translate(x: number, y: number, callback: AsyncCallback\): void **示例:** ```js -await pixelMap.translate(3.0, 1.0); +async function () { + await pixelMap.translate(3.0, 1.0); +} ``` ### translate9+ @@ -663,7 +669,9 @@ translate(x: number, y: number): Promise\ **示例:** ```js -await pixelMap.translate(3.0, 1.0); +async function () { + await pixelMap.translate(3.0, 1.0); +} ``` ### rotate9+ @@ -684,7 +692,9 @@ rotate(angle: number, callback: AsyncCallback\): void **示例:** ```js -await pixelMap.rotate(90.0); +async function () { + await pixelMap.rotate(90.0); +} ``` ### rotate9+ @@ -710,7 +720,9 @@ rotate(angle: number): Promise\ **示例:** ```js -await pixelMap.rotate(90.0); +async function () { + await pixelMap.rotate(90.0); +} ``` ### flip9+ @@ -732,7 +744,9 @@ flip(horizontal: boolean, vertical: boolean, callback: AsyncCallback\): vo **示例:** ```js -await pixelMap.flip(false, true); +async function () { + await pixelMap.flip(false, true); +} ``` ### flip9+ @@ -759,7 +773,9 @@ flip(horizontal: boolean, vertical: boolean): Promise\ **示例:** ```js -await pixelMap.flip(false, true); +async function () { + await pixelMap.flip(false, true); +} ``` ### crop9+ @@ -780,7 +796,9 @@ crop(region: Region, callback: AsyncCallback\): void **示例:** ```js -await pixelMap.crop(3x3); +async function () { + await pixelMap.crop(3x3); +} ``` ### crop9+ @@ -806,7 +824,9 @@ crop(region: Region): Promise\ **示例:** ```js -await pixelMap.crop(3x3); +async function () { + await pixelMap.crop(3x3); +} ``` ### release7+ -- GitLab