From cc92a082bb88eb11844a6490dbd2d2967219168c Mon Sep 17 00:00:00 2001 From: hungry_feiwei Date: Fri, 22 Apr 2022 09:10:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=BE=E5=A4=87=E7=9B=91?= =?UTF-8?q?=E5=90=AC=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: hungry_feiwei --- runtime/main/extend/systemplugin/napi/inputDevice.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/runtime/main/extend/systemplugin/napi/inputDevice.js b/runtime/main/extend/systemplugin/napi/inputDevice.js index cadc2c35..8c5d09d1 100644 --- a/runtime/main/extend/systemplugin/napi/inputDevice.js +++ b/runtime/main/extend/systemplugin/napi/inputDevice.js @@ -29,7 +29,7 @@ export function mockInputDevice() { axisRanges: [AxisRange] } - const EventType = ['add', 'remove'] + const EventType = ['changed'] const DeviceIds = [0, 1, 2, 3, 4, 5, 6, 7] const inputDevice = { on: function (...args) { @@ -38,7 +38,7 @@ export function mockInputDevice() { const len = args.length; if (len === 2) { if (EventType.indexOf(args[0]) === -1) { - console.warn("the first parameter must be 'add'|'remove'") + console.warn("the first parameter must be 'changed'") } if (typeof args[1] != 'function') { console.warn("the second parameter type must be 'function'") @@ -52,14 +52,14 @@ export function mockInputDevice() { " Previewer may be different from that on a real device.") const len = args.length; if (len < 1 || len > 2) { - console.warn("the number of parameter must be one or two") + console.warn("a maximum of two parameters") } else if (len === 1) { if (EventType.indexOf(args[0]) === -1) { - console.warn("first parameter must be 'add'|'remove'") + console.warn("first parameter must be 'changed'") } } else { if (EventType.indexOf(args[0]) === -1) { - console.warn("first parameter must be 'add'|'remove'") + console.warn("first parameter must be 'changed'") } if (typeof args[1] != 'function') { console.warn("second parameter type must be 'function'")