From 4a866de85d51b290f4d7e8c8ea949f322a7ba633 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=9B=E4=BA=9A=E8=8A=B3?= Date: Wed, 8 Jun 2022 04:37:56 +0000 Subject: [PATCH] =?UTF-8?q?3.1Release=E5=88=86=E6=94=AF=EF=BC=9Aupdate=20z?= =?UTF-8?q?h-cn/application-dev/reference/apis/js-apis-display.md=EF=BC=9A?= =?UTF-8?q?display=E8=87=AA=E5=8A=A8=E5=8C=96=E6=B5=8B=E8=AF=95=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E6=94=B9=EF=BC=8C=E9=9C=80=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E7=BF=BB=E8=AF=91=20Signed-off-by:=20@ge-yafang=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zh-cn/application-dev/reference/apis/js-apis-display.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-display.md b/zh-cn/application-dev/reference/apis/js-apis-display.md index 4e6836d751..5ec470ae38 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-display.md +++ b/zh-cn/application-dev/reference/apis/js-apis-display.md @@ -168,11 +168,10 @@ on(type: 'add'|'remove'|'change', callback: Callback<number>): void **示例:** ```js - var type = "add"; var callback = (data) => { console.info('Listening enabled. Data: ' + JSON.stringify(data)) } - display.on(type, callback); + display.on("add", callback); ``` @@ -192,6 +191,5 @@ off(type: 'add'|'remove'|'change', callback?: Callback<number>): void **示例:** ```js - var type = "remove"; - display.off(type); + display.off("remove"); ``` -- GitLab