From a3c407f6713e19950f19e6c7c1a6ae311e3c6491 Mon Sep 17 00:00:00 2001 From: "ester.zhou" Date: Wed, 9 Mar 2022 19:22:25 +0800 Subject: [PATCH] update docs Signed-off-by: ester.zhou --- en/application-dev/reference/apis/js-apis-commonEvent.md | 6 +++--- .../reference/arkui-js/js-components-canvas-image.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/en/application-dev/reference/apis/js-apis-commonEvent.md b/en/application-dev/reference/apis/js-apis-commonEvent.md index 655c8682e3..32045b0f0c 100644 --- a/en/application-dev/reference/apis/js-apis-commonEvent.md +++ b/en/application-dev/reference/apis/js-apis-commonEvent.md @@ -169,9 +169,9 @@ Publishes a common event with given attributes. This method uses a callback to r ```js // Attributes of a common event. var options = { - code: 0; // Result code of the common event - data: "initial data";// Result data of the common event - isOrdered: true; // The common event is an ordered one. + code: 0, // Result code of the common event + data: "initial data",// Result data of the common event + isOrdered: true // The common event is an ordered one. } // Callback for common event publication function PublishCallBack(err) { diff --git a/en/application-dev/reference/arkui-js/js-components-canvas-image.md b/en/application-dev/reference/arkui-js/js-components-canvas-image.md index 8ad046dea4..32bd1bb59a 100644 --- a/en/application-dev/reference/arkui-js/js-components-canvas-image.md +++ b/en/application-dev/reference/arkui-js/js-components-canvas-image.md @@ -89,7 +89,7 @@ export default { onShow(){ const el =this.$refs.canvas - var ctx = this.$element('drawImage').getContext('2d'); + var ctx =el.getContext('2d'); var img = new Image(); img.src = 'common/images/example.jpg'; img.onload = function() { -- GitLab