You need to sign in or sign up before continuing.
未验证 提交 f52417ee 编写于 作者: O openharmony_ci 提交者: Gitee

!5103 【轻量级 PR】:master:update...

!5103 【轻量级 PR】:master:update zh-cn/application-dev/reference/apis/js-apis-display.md:display自动化测试问题修改,需同步翻译
Merge pull request !5103 from 葛亚芳/N/A
...@@ -168,11 +168,10 @@ on(type: 'add'|'remove'|'change', callback: Callback<number>): void ...@@ -168,11 +168,10 @@ on(type: 'add'|'remove'|'change', callback: Callback<number>): void
**示例:** **示例:**
```js ```js
var type = "add";
var callback = (data) => { var callback = (data) => {
console.info('Listening enabled. Data: ' + JSON.stringify(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 ...@@ -192,6 +191,5 @@ off(type: 'add'|'remove'|'change', callback?: Callback<number>): void
**示例:** **示例:**
```js ```js
var type = "remove"; display.off("remove");
display.off(type);
``` ```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册