From 8221bb6e64010da640fb3fb4214d5def9ecfb6b5 Mon Sep 17 00:00:00 2001 From: mayunteng_1 Date: Sat, 24 Dec 2022 09:22:28 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=A4=9A=E6=A8=A1=E5=AD=90=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E3=80=91=E6=8E=A5=E5=8F=A3=E6=96=87=E6=A1=A3=E5=8F=8A?= =?UTF-8?q?=E6=8C=87=E5=8D=97=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: mayunteng_1 Change-Id: Iaa9a20fd40d1814204b6771bc0ba24304df27a31 --- zh-cn/application-dev/device/inputdevice-guidelines.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zh-cn/application-dev/device/inputdevice-guidelines.md b/zh-cn/application-dev/device/inputdevice-guidelines.md index d7aaf54eec..d08fbacfef 100644 --- a/zh-cn/application-dev/device/inputdevice-guidelines.md +++ b/zh-cn/application-dev/device/inputdevice-guidelines.md @@ -41,7 +41,7 @@ try { inputDevice.getDeviceList().then(data => { for (let i = 0; i < data.length; ++i) { inputDevice.getKeyboardType(data[i]).then(type => { - if (type == inputDevice.KeyboardType.ALPHABETIC_KEYBOARD) { + if (type === inputDevice.KeyboardType.ALPHABETIC_KEYBOARD) { // 物理键盘已连接 isPhysicalKeyboardExist = true; } @@ -53,7 +53,7 @@ try { console.log(`Device event info: ${JSON.stringify(data)}`); inputDevice.getKeyboardType(data.deviceId, (error, type) => { console.log("The keyboard type is: " + type); - if (type == inputDevice.KeyboardType.ALPHABETIC_KEYBOARD && data.type == 'add') { + if (type === inputDevice.KeyboardType.ALPHABETIC_KEYBOARD && data.type == 'add') { // 物理键盘已插入 isPhysicalKeyboardExist = true; } else if (type == inputDevice.KeyboardType.ALPHABETIC_KEYBOARD && data.type == 'remove') { -- GitLab