未验证 提交 4f853024 编写于 作者: O openharmony_ci 提交者: Gitee

!23822 update stationary js doc

Merge pull request !23822 from 周澎亮/master
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
## 导入模块 ## 导入模块
```js ```ts
import stationary from '@ohos.stationary' import stationary from '@ohos.stationary'
``` ```
...@@ -79,8 +79,8 @@ on(activity: ActivityType, event: ActivityEvent, reportLatencyNs: number, callba ...@@ -79,8 +79,8 @@ on(activity: ActivityType, event: ActivityEvent, reportLatencyNs: number, callba
**示例:** **示例:**
```js ```ts
var reportLatencyNs = 100; let reportLatencyNs = 100;
stationary.on('still', stationary.ActivityEvent.ENTER, reportLatencyNs, (data) => { stationary.on('still', stationary.ActivityEvent.ENTER, reportLatencyNs, (data) => {
console.log('data='+ JSON.stringify(data)); console.log('data='+ JSON.stringify(data));
}) })
...@@ -103,7 +103,7 @@ once(activity: ActivityType, callback: Callback<ActivityResponse>): void ...@@ -103,7 +103,7 @@ once(activity: ActivityType, callback: Callback<ActivityResponse>): void
**示例:** **示例:**
```js ```ts
stationary.once('still', (data) => { stationary.once('still', (data) => {
console.log("data="+ JSON.stringify(data)); console.log("data="+ JSON.stringify(data));
}) })
...@@ -127,6 +127,6 @@ off(activity: ActivityType, event: ActivityEvent, callback?: Callback<Activit ...@@ -127,6 +127,6 @@ off(activity: ActivityType, event: ActivityEvent, callback?: Callback<Activit
**示例:** **示例:**
```js ```ts
stationary.off('still', stationary.ActivityEvent.ENTER); stationary.off('still', stationary.ActivityEvent.ENTER);
``` ```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册