未验证 提交 cf0a266f 编写于 作者: P PingPing2023 提交者: Gitee

update zh-cn/application-dev/reference/apis/js-apis-inputmonitor.md.

Signed-off-by: NPingPing2023 <pingping@huawei.com>
上级 31818ecb
......@@ -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&lt;MouseEvent&gt;): 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&lt;[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&lt;[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&lt;[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.
先完成此消息的编辑!
想要评论请 注册