diff --git a/zh-cn/application-dev/reference/apis/js-apis-inputdevice.md b/zh-cn/application-dev/reference/apis/js-apis-inputdevice.md index e10e496b951d41df40df0522a0e000c9c2b40357..735081c1a27df9b2ff17fb71474a49d6493d5df8 100755 --- a/zh-cn/application-dev/reference/apis/js-apis-inputdevice.md +++ b/zh-cn/application-dev/reference/apis/js-apis-inputdevice.md @@ -238,7 +238,7 @@ getDeviceIds(callback: AsyncCallback<Array<number>>): void **示例**: ```js -inputDevice.getDeviceList((error, ids) => { +inputDevice.getDeviceIds((error, ids) => { if (error) { console.log(`Failed to get device id list, error: ${JSON.stringify(error, [`code`, `message`])}`); return; @@ -266,7 +266,7 @@ getDeviceIds(): Promise<Array<number>> **示例**: ```js -inputDevice.getDeviceList().then((ids) => { +inputDevice.getDeviceIds().then((ids) => { console.log(`Device id list: ${JSON.stringify(ids)}`); }); ``` @@ -292,7 +292,7 @@ getDevice(deviceId: number, callback: AsyncCallback<InputDeviceData>): voi ```js // 获取输入设备id为1的设备信息。 -inputDevice.getDeviceInfo(1, (error, deviceData) => { +inputDevice.getDevice(1, (error, deviceData) => { if (error) { console.log(`Failed to get device info, error: ${JSON.stringify(error, [`code`, `message`])}`); return; @@ -327,7 +327,7 @@ getDevice(deviceId: number): Promise<InputDeviceData> ```js // 获取输入设备id为1的设备信息。 -inputDevice.getDeviceInfo(1).then((deviceData) => { +inputDevice.getDevice(1).then((deviceData) => { console.log(`Device info: ${JSON.stringify(deviceData)}`); }); ```