Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
aafe227d
D
Docs
项目概览
OpenHarmony
/
Docs
大约 2 年 前同步成功
通知
161
Star
293
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看板
未验证
提交
aafe227d
编写于
8月 31, 2022
作者:
O
openharmony_ci
提交者:
Gitee
8月 31, 2022
浏览文件
操作
浏览文件
下载
差异文件
!8920 修改取消monthly分支level9接口说明
Merge pull request !8920 from 赵凌岚/monthly_20220816
上级
404f7f99
4d56015d
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
0 addition
and
155 deletion
+0
-155
zh-cn/application-dev/reference/apis/js-apis-inputmethodengine.md
...plication-dev/reference/apis/js-apis-inputmethodengine.md
+0
-155
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-inputmethodengine.md
浏览文件 @
aafe227d
...
@@ -45,11 +45,6 @@ import inputMethodEngine from '@ohos.inputmethodengine';
...
@@ -45,11 +45,6 @@ import inputMethodEngine from '@ohos.inputmethodengine';
| FLAG_SINGLE_LINE | number | 是 | 否 | 编辑框为单行。 |
| FLAG_SINGLE_LINE | number | 是 | 否 | 编辑框为单行。 |
| DISPLAY_MODE_PART | number | 是 | 否 | 编辑框显示为半屏。 |
| DISPLAY_MODE_PART | number | 是 | 否 | 编辑框显示为半屏。 |
| DISPLAY_MODE_FULL | number | 是 | 否 | 编辑框显示为全屏。 |
| DISPLAY_MODE_FULL | number | 是 | 否 | 编辑框显示为全屏。 |
| CURSOR_UP
<sup>
9+
</sup>
| number | 是 | 否 | 光标上移。 |
| CURSOR_DOWN
<sup>
9+
</sup>
| number | 是 | 否 | 光标下移。 |
| CURSOR_LEFT
<sup>
9+
</sup>
| number | 是 | 否 | 光标左移。 |
| CURSOR_RIGHT
<sup>
9+
</sup>
| number | 是 | 否 | 光标右移。 |
| WINDOW_TYPE_INPUT_METHOD_FLOAT
<sup>
9+
</sup>
| number | 是 | 否 | 输入法应用窗口风格标识。 |
## inputMethodEngine.getInputMethodEngine<a name="getInputMethodEngine"></a>
## inputMethodEngine.getInputMethodEngine<a name="getInputMethodEngine"></a>
...
@@ -144,98 +139,6 @@ off(type: 'inputStart', callback?: (kbController: KeyboardController, textInputC
...
@@ -144,98 +139,6 @@ off(type: 'inputStart', callback?: (kbController: KeyboardController, textInputC
});
});
```
```
### on('inputStop')<sup>9+</sup>
on(type: 'inputStop', callback: () => void): void
订阅停止输入法应用事件,使用callback回调。
**系统能力**
: SystemCapability.MiscServices.InputMethodFramework
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ------ | ---- | ------------------------------------------------------------ |
| type | string | 是 | 设置监听类型。
<br/>
-type为‘inputStop’时表示订阅停止输入法应用事件。 |
| callback | void | 是 | 回调函数。 |
**示例:**
```
js
InputMethodEngine
.
getInputMethodEngine
().
on
(
'
inputStop
'
,
()
=>
{
console
.
log
(
"
inputMethodEngine inputStop
"
);
});
```
### off('inputStop')<sup>9+</sup>
off(type: 'inputStop', callback: () => void): void
取消订阅停止输入法应用事件。使用callback回调。
**系统能力**
: SystemCapability.MiscServices.InputMethodFramework
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ------ | ---- | ------------------------------------------------------------ |
| type | string | 是 | 设置监听类型。
<br/>
-type为‘inputStop’时表示订阅停止输入法应用事件。 |
| callback | void | 是 | 回调函数。 |
**示例:**
```
js
InputMethodEngine
.
getInputMethodEngine
().
off
(
'
inputStop
'
,
()
=>
{
console
.
log
(
"
inputMethodEngine delete inputStop notification.
"
);
});
```
### on('setCallingWindow')<sup>9+</sup>
on(type: 'setCallingWindow', callback: (wid:number) => void): void
订阅设置调用窗口事件,使用callback回调。
**系统能力**
: SystemCapability.MiscServices.InputMethodFramework
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ------ | ---- | ------------------------------------------------------------ |
| type | string | 是 | 设置监听类型。
<br/>
-type为‘setCallingWindow’时表示订阅设置调用窗口事件。 |
| callback | number | 是 | 调用方window id。 |
**示例:**
```
js
InputMethodEngine
.
getInputMethodEngine
().
on
(
'
setCallingWindow
'
,
(
wid
)
=>
{
console
.
log
(
"
inputMethodEngine setCallingWindow
"
);
});
```
### off('setCallingWindow')<sup>9+</sup>
off(type: 'setCallingWindow', callback: (wid:number) => void): void
取消订阅设置调用窗口事件。使用callback回调。
**系统能力**
: SystemCapability.MiscServices.InputMethodFramework
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ------ | ---- | ------------------------------------------------------------ |
| type | string | 是 | 设置监听类型。
<br/>
-type为‘setCallingWindow’时表示订阅设置调用窗口事件。 |
| callback | number | 是 | 调用方window id。 |
**示例:**
```
js
InputMethodEngine
.
getInputMethodEngine
().
off
(
'
setCallingWindow
'
,
()
=>
{
console
.
log
(
"
inputMethodEngine delete setCallingWindow notification.
"
);
});
```
### on('keyboardShow'|'keyboardHide')
### on('keyboardShow'|'keyboardHide')
on(type: 'keyboardShow'|'keyboardHide', callback: () => void): void
on(type: 'keyboardShow'|'keyboardHide', callback: () => void): void
...
@@ -1005,64 +908,6 @@ getEditorAttribute(): Promise<EditorAttribute>
...
@@ -1005,64 +908,6 @@ getEditorAttribute(): Promise<EditorAttribute>
}
}
```
```
### moveCursor<sup>9+</sup>
moveCursor(direction: number, callback: AsyncCallback
<
void
>
): void
移动光标。使用callback形式返回结果。参数个数为1,否则抛出异常。
**系统能力**
: SystemCapability.MiscServices.InputMethodFramework
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| --------- | ------------------------- | ---- | -------------- |
| direction | number | 是 | 光标移动方向。 |
| callback | AsyncCallback
<
void
>
| 是 | 回调函数。 |
**示例:**
```
js
TextInputClient
.
moveCursor
(
inputMethodEngine
.
CURSOR_xxx
,
(
err
)
=>
{
if
(
err
==
undefined
)
{
console
.
error
(
"
moveCursor callback result---err:
"
+
err
.
msg
);
return
;
}
});
```
### moveCursor<sup>9+</sup>
moveCursor(direction: number): Promise
<
void
>
移动光标。使用promise形式返回结果。参数个数为1,否则抛出异常。
**系统能力**
: SystemCapability.MiscServices.InputMethodFramework
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| --------- | ------ | ---- | -------------- |
| direction | number | 是 | 光标移动方向。 |
**返回值:**
| 类型 | 说明 |
| ------------------- | ------------------------- |
| Promise
<
void
>
| 无返回结果的Promise对象。 |
**示例:**
```
js
async
function
InputMethodEngine
()
{
await
TextInputClient
.
moveCursor
(
inputMethodEngine
.
CURSOR_xxx
).
then
(
async
(
err
)
=>
{
console
.
log
(
'
moveCursor success
'
);
}).
catch
((
err
)
=>
{
console
.
error
(
"
moveCursor success err:
"
+
err
.
msg
);
});
}
```
## EditorAttribute<a name="EditorAttribute"></a>
## EditorAttribute<a name="EditorAttribute"></a>
编辑框属性值。
编辑框属性值。
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录