未验证 提交 e6f119d8 编写于 作者: O openharmony_ci 提交者: Gitee

!12429 多模参考代码修改

Merge pull request !12429 from mayunteng/master
......@@ -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)}`);
});
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册