未验证 提交 0635708d 编写于 作者: 孙悦 提交者: Gitee

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

Signed-off-by: Nsunyue <sunyue77@h-partners.com>
上级 5ee000ac
...@@ -94,7 +94,7 @@ stopInput(callback: AsyncCallback&lt;boolean&gt;): void ...@@ -94,7 +94,7 @@ stopInput(callback: AsyncCallback&lt;boolean&gt;): void
**示例:** **示例:**
```js ```js
InputMethodController.stopInput((error)=>{ InputMethodController.stopInput((error)=>{
console.info('stopInput'); console.info('stopInput');
}); });
``` ```
...@@ -117,8 +117,8 @@ stopInput(): Promise&lt;boolean&gt; ...@@ -117,8 +117,8 @@ stopInput(): Promise&lt;boolean&gt;
```js ```js
var isSuccess = InputMethodController.stopInput(); var isSuccess = InputMethodController.stopInput();
console.info('stopInput isSuccess = ' + isSuccess); console.info('stopInput isSuccess = ' + isSuccess);
``` ```
## InputMethodSetting<sup>8+</sup> ## InputMethodSetting<sup>8+</sup>
...@@ -141,11 +141,11 @@ listInputMethod(callback: AsyncCallback&lt;Array&lt;InputMethodProperty&gt;&gt;) ...@@ -141,11 +141,11 @@ listInputMethod(callback: AsyncCallback&lt;Array&lt;InputMethodProperty&gt;&gt;)
**示例:** **示例:**
```js ```js
InputMethodSetting.listInputMethod((properties)=>{ InputMethodSetting.listInputMethod((properties)=>{
for (var i = 0;i < properties.length; i++) { for (var i = 0;i < properties.length; i++) {
var property = properties[i]; var property = properties[i];
console.info(property.packageName + "/" + property.methodId); console.info(property.packageName + "/" + property.methodId);
} }
}); });
``` ```
...@@ -165,11 +165,11 @@ listInputMethod(): Array&lt;InputMethodProperty&gt; ...@@ -165,11 +165,11 @@ listInputMethod(): Array&lt;InputMethodProperty&gt;
**示例:** **示例:**
```js ```js
var properties = InputMethodSetting.listInputMethod(); var properties = InputMethodSetting.listInputMethod();
for (var i = 0;i < properties.length; i++) { for (var i = 0;i < properties.length; i++) {
var property = properties[i]; var property = properties[i];
console.info(property.packageName + "/" + property.methodId); console.info(property.packageName + "/" + property.methodId);
} }
``` ```
### displayOptionalInputMethod ### displayOptionalInputMethod
...@@ -189,9 +189,9 @@ displayOptionalInputMethod(callback: AsyncCallback&lt;void&gt;): void ...@@ -189,9 +189,9 @@ displayOptionalInputMethod(callback: AsyncCallback&lt;void&gt;): void
**示例:** **示例:**
```js ```js
InputMethodSetting.displayOptionalInputMethod(()=>{ InputMethodSetting.displayOptionalInputMethod(()=>{
console.info('displayOptionalInputMethod is called'); console.info('displayOptionalInputMethod is called');
}); });
``` ```
### displayOptionalInputMethod ### displayOptionalInputMethod
...@@ -211,5 +211,5 @@ displayOptionalInputMethod(callback: AsyncCallback&lt;void&gt;): void ...@@ -211,5 +211,5 @@ displayOptionalInputMethod(callback: AsyncCallback&lt;void&gt;): void
**示例:** **示例:**
```js ```js
InputMethodSetting.displayOptionalInputMethod(); InputMethodSetting.displayOptionalInputMethod();
``` ```
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册