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

!23990 【轻量级 PR】:update zh-cn/application-dev/reference/apis/js-apis-inputmonitor.md.

Merge pull request !23990 from PingPing2023/N/A
...@@ -37,7 +37,7 @@ on(type: 'touch', receiver: TouchEventReceiver): void ...@@ -37,7 +37,7 @@ on(type: 'touch', receiver: TouchEventReceiver): void
```js ```js
try { try {
inputMonitor.on('touch', (touchEvent) => { inputMonitor.on('touch', (touchEvent: TouchEvent) => {
console.log(`Monitor on success ${JSON.stringify(touchEvent)}`); console.log(`Monitor on success ${JSON.stringify(touchEvent)}`);
return false; return false;
}); });
...@@ -97,7 +97,7 @@ off(type: 'touch', receiver?: TouchEventReceiver): void ...@@ -97,7 +97,7 @@ off(type: 'touch', receiver?: TouchEventReceiver): void
```js ```js
// 取消监听单个回调函数 // 取消监听单个回调函数
function callback(touchEvent) { let callback = (touchEvent: touchEvent) => {
console.log(`Monitor on success ${JSON.stringify(touchEvent)}`); console.log(`Monitor on success ${JSON.stringify(touchEvent)}`);
return false; return false;
}; };
...@@ -112,7 +112,7 @@ try { ...@@ -112,7 +112,7 @@ try {
```js ```js
// 取消监听所有回调函数 // 取消监听所有回调函数
function callback(touchEvent) { let callback = (touchEvent: touchEvent) => {
console.log(`Monitor on success ${JSON.stringify(touchEvent)}`); console.log(`Monitor on success ${JSON.stringify(touchEvent)}`);
return false; return false;
}; };
...@@ -146,7 +146,7 @@ off(type: 'mouse', receiver?: Callback<MouseEvent>): void ...@@ -146,7 +146,7 @@ off(type: 'mouse', receiver?: Callback<MouseEvent>): void
```js ```js
// 取消监听单个回调函数 // 取消监听单个回调函数
function callback(mouseEvent) { let callback = (mouseEvent: MouseEvent) => {
console.log(`Monitor on success ${JSON.stringify(mouseEvent)}`); console.log(`Monitor on success ${JSON.stringify(mouseEvent)}`);
return false; return false;
}; };
...@@ -161,7 +161,7 @@ try { ...@@ -161,7 +161,7 @@ try {
```js ```js
// 取消监听所有回调函数 // 取消监听所有回调函数
function callback(mouseEvent) { let callback = (mouseEvent: MouseEvent) => {
console.log(`Monitor on success ${JSON.stringify(mouseEvent)}`); console.log(`Monitor on success ${JSON.stringify(mouseEvent)}`);
return false; return false;
}; };
...@@ -260,7 +260,7 @@ off(type: 'pinch', receiver?: Callback<[Pinch](js-apis-multimodalinput-gestur ...@@ -260,7 +260,7 @@ off(type: 'pinch', receiver?: Callback<[Pinch](js-apis-multimodalinput-gestur
```js ```js
// 取消监听单个回调函数 // 取消监听单个回调函数
function callback(pinchEvent) { let callback = (pinchEvent: Pinch) => {
console.log(`Monitor on success ${JSON.stringify(pinchEvent)}`); console.log(`Monitor on success ${JSON.stringify(pinchEvent)}`);
return false; return false;
}; };
...@@ -275,7 +275,7 @@ try { ...@@ -275,7 +275,7 @@ try {
```js ```js
// 取消监听所有回调函数 // 取消监听所有回调函数
function callback(pinchEvent) { let callback = (pinchEvent: Pinch) => {
console.log(`Monitor on success ${JSON.stringify(pinchEvent)}`); console.log(`Monitor on success ${JSON.stringify(pinchEvent)}`);
return false; return false;
}; };
...@@ -339,7 +339,7 @@ off(type: 'threeFingersSwipe', receiver?: Callback<[ThreeFingersSwipe](js-api ...@@ -339,7 +339,7 @@ off(type: 'threeFingersSwipe', receiver?: Callback<[ThreeFingersSwipe](js-api
```js ```js
// 取消监听单个回调函数 // 取消监听单个回调函数
function callback(threeFingersSwipe) { let callback = (threeFingersSwipe: ThreeFingersSwipe) => {
console.log(`Monitor on success ${JSON.stringify(threeFingersSwipe)}`); console.log(`Monitor on success ${JSON.stringify(threeFingersSwipe)}`);
return false; return false;
}; };
...@@ -354,7 +354,7 @@ try { ...@@ -354,7 +354,7 @@ try {
```js ```js
// 取消监听所有回调函数 // 取消监听所有回调函数
function callback(threeFingersSwipe) { let callback = (threeFingersSwipe: ThreeFingersSwipe) => {
console.log(`Monitor on success ${JSON.stringify(threeFingersSwipe)}`); console.log(`Monitor on success ${JSON.stringify(threeFingersSwipe)}`);
return false; return false;
}; };
...@@ -418,7 +418,7 @@ off(type: 'fourFingersSwipe', receiver?: Callback<[FourFingersSwipe](js-apis- ...@@ -418,7 +418,7 @@ off(type: 'fourFingersSwipe', receiver?: Callback<[FourFingersSwipe](js-apis-
```js ```js
// 取消监听单个回调函数 // 取消监听单个回调函数
function callback(fourFingersSwipe) { let callback = (fourFingersSwipe: FourFingersSwipe) => {
console.log(`Monitor on success ${JSON.stringify(fourFingersSwipe)}`); console.log(`Monitor on success ${JSON.stringify(fourFingersSwipe)}`);
return false; return false;
}; };
...@@ -433,7 +433,7 @@ try { ...@@ -433,7 +433,7 @@ try {
```js ```js
// 取消监听所有回调函数 // 取消监听所有回调函数
function callback(fourFingersSwipe) { let callback = (fourFingersSwipe: FourFingersSwipe) => {
console.log(`Monitor on success ${JSON.stringify(fourFingersSwipe)}`); console.log(`Monitor on success ${JSON.stringify(fourFingersSwipe)}`);
return false; return false;
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册