Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
491ca50d
D
Docs
项目概览
OpenHarmony
/
Docs
大约 1 年 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
491ca50d
编写于
3月 14, 2022
作者:
Z
zhouyongfei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新自动化测试问题
Signed-off-by:
N
zhouyongfei
<
zhouyongfei@huawei.com
>
上级
7ae3f55a
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
22 addition
and
20 deletion
+22
-20
zh-cn/application-dev/reference/apis/js-apis-inputmethod.md
zh-cn/application-dev/reference/apis/js-apis-inputmethod.md
+5
-3
zh-cn/application-dev/reference/apis/js-apis-inputmethodengine.md
...plication-dev/reference/apis/js-apis-inputmethodengine.md
+17
-17
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-inputmethod.md
浏览文件 @
491ca50d
...
@@ -134,8 +134,10 @@ listInputMethod(callback: AsyncCallback<Array<InputMethodProperty>>)
...
@@ -134,8 +134,10 @@ listInputMethod(callback: AsyncCallback<Array<InputMethodProperty>>)
-
示例
-
示例
```
```
InputMethodSetting.listInputMethod((properties)=>{
InputMethodSetting.listInputMethod((properties)=>{
var property = properties[i];
for (var i = 0;i < properties.length; i++) {
console.info(property.packageName + "/" + property.methodId);
var property = properties[i];
console.info(property.packageName + "/" + property.methodId);
}
});
});
```
```
...
@@ -157,7 +159,7 @@ listInputMethod(): Promise<Array<InputMethodProperty>>
...
@@ -157,7 +159,7 @@ listInputMethod(): Promise<Array<InputMethodProperty>>
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
)
;
}
}
```
```
...
...
zh-cn/application-dev/reference/apis/js-apis-inputmethodengine.md
浏览文件 @
491ca50d
...
@@ -88,7 +88,7 @@ createKeyboardDelegate(): KeyboardDelegate
...
@@ -88,7 +88,7 @@ createKeyboardDelegate(): KeyboardDelegate
### on('inputStart')<a name="inputStart"></a>
### on('inputStart')<a name="inputStart"></a>
on(type: 'inputStart', callback: (kbController: KeyboardController, textInputClient: TextInputClient) => void): void
;
on(type: 'inputStart', callback: (kbController: KeyboardController, textInputClient: TextInputClient) => void): void
订阅输入法绑定成功事件,使用callback回调返回输入法操作相关实例。
订阅输入法绑定成功事件,使用callback回调返回输入法操作相关实例。
...
@@ -112,7 +112,7 @@ on(type: 'inputStart', callback: (kbController: KeyboardController, textInputCli
...
@@ -112,7 +112,7 @@ on(type: 'inputStart', callback: (kbController: KeyboardController, textInputCli
### off('inputStart')
### off('inputStart')
off(type: 'inputStart', callback?: (kbController: KeyboardController, textInputClient: TextInputClient) => void): void
;
off(type: 'inputStart', callback?: (kbController: KeyboardController, textInputClient: TextInputClient) => void): void
取消订阅输入法绑定成功事件。
取消订阅输入法绑定成功事件。
...
@@ -135,7 +135,7 @@ off(type: 'inputStart', callback?: (kbController: KeyboardController, textInputC
...
@@ -135,7 +135,7 @@ off(type: 'inputStart', callback?: (kbController: KeyboardController, textInputC
### on('keyboardShow'|'keyboardHide')
### on('keyboardShow'|'keyboardHide')
on(type: 'keyboardShow'|'keyboardHide', callback: () => void): void
;
on(type: 'keyboardShow'|'keyboardHide', callback: () => void): void
订阅输入法事件。
订阅输入法事件。
...
@@ -158,7 +158,7 @@ on(type: 'keyboardShow'|'keyboardHide', callback: () => void): void;
...
@@ -158,7 +158,7 @@ on(type: 'keyboardShow'|'keyboardHide', callback: () => void): void;
### off('keyboardShow'|'keyboardHide')
### off('keyboardShow'|'keyboardHide')
off(type: 'keyboardShow'|'keyboardHide', callback?: () => void): void
;
off(type: 'keyboardShow'|'keyboardHide', callback?: () => void): void
取消订阅输入法事件。
取消订阅输入法事件。
...
@@ -184,7 +184,7 @@ off(type: 'keyboardShow'|'keyboardHide', callback?: () => void): void;
...
@@ -184,7 +184,7 @@ off(type: 'keyboardShow'|'keyboardHide', callback?: () => void): void;
### on('keyDown'|'keyUp')
### on('keyDown'|'keyUp')
on(type: 'keyDown'|'keyUp', callback: (event: KeyEvent) => boolean): void
;
on(type: 'keyDown'|'keyUp', callback: (event: KeyEvent) => boolean): void
订阅硬键盘事件,使用callback回调返回按键信息。
订阅硬键盘事件,使用callback回调返回按键信息。
...
@@ -209,7 +209,7 @@ on(type: 'keyDown'|'keyUp', callback: (event: KeyEvent) => boolean): void;
...
@@ -209,7 +209,7 @@ on(type: 'keyDown'|'keyUp', callback: (event: KeyEvent) => boolean): void;
### off('keyDown'|'keyUp')
### off('keyDown'|'keyUp')
off(type: 'keyDown'|'keyUp', callback?: (event: KeyEvent) => boolean): void
;
off(type: 'keyDown'|'keyUp', callback?: (event: KeyEvent) => boolean): void
取消订阅硬键盘事件。
取消订阅硬键盘事件。
...
@@ -230,7 +230,7 @@ off(type: 'keyDown'|'keyUp', callback?: (event: KeyEvent) => boolean): void;
...
@@ -230,7 +230,7 @@ off(type: 'keyDown'|'keyUp', callback?: (event: KeyEvent) => boolean): void;
### on('cursorContextChange')
### on('cursorContextChange')
on(type: 'cursorContextChange', callback: (x: number, y:number, height:number) => void): void
;
on(type: 'cursorContextChange', callback: (x: number, y:number, height:number) => void): void
订阅光标变化事件,使用callback回调返回光标信息。
订阅光标变化事件,使用callback回调返回光标信息。
...
@@ -255,7 +255,7 @@ on(type: 'cursorContextChange', callback: (x: number, y:number, height:number) =
...
@@ -255,7 +255,7 @@ on(type: 'cursorContextChange', callback: (x: number, y:number, height:number) =
### off('cursorContextChange')
### off('cursorContextChange')
off(type: 'cursorContextChange', callback?: (x: number, y:number, height:number) => void): void
;
off(type: 'cursorContextChange', callback?: (x: number, y:number, height:number) => void): void
取消订阅光标变化事件。
取消订阅光标变化事件。
...
@@ -276,7 +276,7 @@ off(type: 'cursorContextChange', callback?: (x: number, y:number, height:number)
...
@@ -276,7 +276,7 @@ off(type: 'cursorContextChange', callback?: (x: number, y:number, height:number)
```
```
### on('selectionChange')
### on('selectionChange')
on(type: 'selectionChange', callback: (oldBegin: number, oldEnd: number, newBegin: number, newEnd: number) => void): void
;
on(type: 'selectionChange', callback: (oldBegin: number, oldEnd: number, newBegin: number, newEnd: number) => void): void
订阅文本选择变化事件,使用callback回调返回文本选择信息。
订阅文本选择变化事件,使用callback回调返回文本选择信息。
...
@@ -299,7 +299,7 @@ on(type: 'selectionChange', callback: (oldBegin: number, oldEnd: number, newBegi
...
@@ -299,7 +299,7 @@ on(type: 'selectionChange', callback: (oldBegin: number, oldEnd: number, newBegi
### off('selectionChange')
### off('selectionChange')
off(type: 'selectionChange', callback?: (oldBegin: number, oldEnd: number, newBegin: number, newEnd: number) => void): void
;
off(type: 'selectionChange', callback?: (oldBegin: number, oldEnd: number, newBegin: number, newEnd: number) => void): void
取消订阅文本选择变化事件。
取消订阅文本选择变化事件。
...
@@ -321,7 +321,7 @@ off(type: 'selectionChange', callback?: (oldBegin: number, oldEnd: number, newBe
...
@@ -321,7 +321,7 @@ off(type: 'selectionChange', callback?: (oldBegin: number, oldEnd: number, newBe
### on('textChange')
### on('textChange')
on(type: 'textChange', callback: (text: string) => void): void
;
on(type: 'textChange', callback: (text: string) => void): void
订阅文本变化事件,使用callback回调返回当前文本内容。
订阅文本变化事件,使用callback回调返回当前文本内容。
...
@@ -344,7 +344,7 @@ on(type: 'textChange', callback: (text: string) => void): void;
...
@@ -344,7 +344,7 @@ on(type: 'textChange', callback: (text: string) => void): void;
### off('textChange')
### off('textChange')
off(type: 'textChange', callback?: (text: string) => void): void
;
off(type: 'textChange', callback?: (text: string) => void): void
取消订阅文本变化事件。
取消订阅文本变化事件。
...
@@ -478,7 +478,7 @@ getBackward(length:number, callback: AsyncCallback<string>): void
...
@@ -478,7 +478,7 @@ getBackward(length:number, callback: AsyncCallback<string>): void
-
示例
-
示例
```
```
TextInputClient.getBackward(5
,
(text)=>{
TextInputClient.getBackward(5
,
(text)=>{
console.info("text = " + text);
console.info("text = " + text);
});
});
```
```
...
@@ -525,7 +525,7 @@ deleteForward(length:number, callback: AsyncCallback<boolean>): void
...
@@ -525,7 +525,7 @@ deleteForward(length:number, callback: AsyncCallback<boolean>): void
-
示例
-
示例
```
```
TextInputClient.deleteForward(5
,
(isSuccess)=>{
TextInputClient.deleteForward(5
,
(isSuccess)=>{
console.info("isSuccess = " + isSuccess);
console.info("isSuccess = " + isSuccess);
});
});
```
```
...
@@ -571,7 +571,7 @@ deleteBackward(length:number, callback: AsyncCallback<boolean>): void
...
@@ -571,7 +571,7 @@ deleteBackward(length:number, callback: AsyncCallback<boolean>): void
-
示例
-
示例
```
```
TextInputClient.deleteBackward(5
,
(isSuccess)=>{
TextInputClient.deleteBackward(5
,
(isSuccess)=>{
console.info("isSuccess = " + isSuccess);
console.info("isSuccess = " + isSuccess);
});
});
```
```
...
@@ -617,7 +617,7 @@ sendKeyFunction(action:number, callback: AsyncCallback<boolean>): void
...
@@ -617,7 +617,7 @@ sendKeyFunction(action:number, callback: AsyncCallback<boolean>): void
-
示例
-
示例
```
```
TextInputClient.sendKeyFunction(inputMethod.ENTER_KEY_TYPE_NEXT
,
(isSuccess)=>{
TextInputClient.sendKeyFunction(inputMethod.ENTER_KEY_TYPE_NEXT
,
(isSuccess)=>{
console.info("isSuccess = " + isSuccess);
console.info("isSuccess = " + isSuccess);
});
});
```
```
...
@@ -664,7 +664,7 @@ insertText(text:string, callback: AsyncCallback<boolean>): void
...
@@ -664,7 +664,7 @@ insertText(text:string, callback: AsyncCallback<boolean>): void
-
示例
-
示例
```
```
TextInputClient.insertText("test"
,
(isSuccess)=>{
TextInputClient.insertText("test"
,
(isSuccess)=>{
console.info("isSuccess = " + isSuccess);
console.info("isSuccess = " + isSuccess);
});
});
```
```
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录