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