Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
00fd028c
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看板
提交
00fd028c
编写于
5月 25, 2022
作者:
L
lovechinamo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Signed-off-by: lovechinamo <wangdongqi2@huawei.com>
Changes to be committed:
上级
c4f0cc1d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
34 addition
and
25 deletion
+34
-25
zh-cn/application-dev/reference/apis/js-apis-inputmethod.md
zh-cn/application-dev/reference/apis/js-apis-inputmethod.md
+19
-19
zh-cn/application-dev/reference/apis/js-apis-system-time.md
zh-cn/application-dev/reference/apis/js-apis-system-time.md
+3
-2
zh-cn/application-dev/reference/apis/js-apis-timer.md
zh-cn/application-dev/reference/apis/js-apis-timer.md
+12
-4
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-inputmethod.md
浏览文件 @
00fd028c
...
...
@@ -10,7 +10,7 @@
import inputMethod from '@ohos.inputMethod';
```
## inputMethod<sup>
8
+</sup>
## inputMethod<sup>
6
+</sup>
常量值。
...
...
@@ -21,7 +21,7 @@ import inputMethod from '@ohos.inputMethod';
| MAX_TYPE_NUM | number | 是 | 否 | 可支持的最大输入法个数。 |
## InputMethodProperty<sup>
8
+</sup><a name="InputMethodProperty"></a>
## InputMethodProperty<sup>
6
+</sup><a name="InputMethodProperty"></a>
输入法应用属性。
...
...
@@ -50,7 +50,7 @@ getInputMethodController(): InputMethodController
```
js
var
InputMethodController
=
inputMethod
.
getInputMethodController
();
```
## inputMethod.getInputMethodSetting<sup>
8
+</sup><a name="getInputMethodSetting"></a>
## inputMethod.getInputMethodSetting<sup>
6
+</sup><a name="getInputMethodSetting"></a>
getInputMethodSetting(): InputMethodSetting
...
...
@@ -60,9 +60,9 @@ getInputMethodSetting(): InputMethodSetting
**返回值:**
| 类型 | 说明 |
| ----------------------------------------- | ---------------------------- |
|
[
InputMethodSetting
](
#InputMethodSetting
)
| 回调返回当前客户端设置实例。 |
| 类型 | 说明 |
| ----------------------------------------- | ---------------------------- |
|
[
InputMethodSetting
](
#InputMethodSetting
)
| 回调返回当前客户端设置实例。 |
**示例:**
...
...
@@ -84,9 +84,9 @@ stopInput(callback: AsyncCallback<boolean>): void
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback
<
boolean
>
| 是 | 返回输入法隐藏是否成功。 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback
<
boolean
>
| 是 | 返回输入法隐藏是否成功。 |
**示例:**
...
...
@@ -106,9 +106,9 @@ stopInput(): Promise<boolean>
**返回值:**
| 类型 | 说明 |
| -------- | -------- |
| Promise
<
boolean
>
| 返回输入法隐藏是否成功。 |
| 类型 | 说明 |
| -------- | -------- |
| Promise
<
boolean
>
| 返回输入法隐藏是否成功。 |
**示例:**
...
...
@@ -118,7 +118,7 @@ stopInput(): Promise<boolean>
console
.
info
(
'
stopInput isSuccess =
'
+
isSuccess
);
```
## InputMethodSetting<sup>
8
+</sup><a name="InputMethodSetting"></a>
## InputMethodSetting<sup>
6
+</sup><a name="InputMethodSetting"></a>
下列API示例中都需使用
[
getInputMethodSetting
](
#getInputMethodSetting
)
回调获取到InputMethodSetting实例,再通过此实例调用对应方法。
...
...
@@ -131,9 +131,9 @@ listInputMethod(callback: AsyncCallback<Array<InputMethodProperty>>)
**系统能力**
: SystemCapability.Miscservices.InputMethodFramework
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------------------------------------------------- | ---- | ---------------------- |
| callback | Array
<
[
InputMethodProperty
](
#InputMethodProperty
)
>
| 是 | 返回已安装输入法列表。 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------------------------------------------------- | ---- | ---------------------- |
| callback | Array
<
[
InputMethodProperty
](
#InputMethodProperty
)
>
| 是 | 返回已安装输入法列表。 |
**示例:**
```
js
...
...
@@ -154,9 +154,9 @@ listInputMethod(): Promise<Array<InputMethodProperty>>
**系统能力**
: SystemCapability.Miscservices.InputMethodFramework
**返回值:**
| 类型 | 说明 |
| ----------------------------------------------------------- | ---------------------- |
| Promise
<Array
<[
InputMethodProperty
](
#InputMethodProperty
)
>
> | 返回已安装输入法列表。 |
| 类型 | 说明 |
| ----------------------------------------------------------- | ---------------------- |
| Promise
<Array
<[
InputMethodProperty
](
#InputMethodProperty
)
>
> | 返回已安装输入法列表。 |
**示例:**
```
js
...
...
zh-cn/application-dev/reference/apis/js-apis-system-time.md
浏览文件 @
00fd028c
# 设置系统时间
本模块用来设置、获取当前系统时间,设置、获取当前系统日期和设置、获取当前系统时区。
>  **说明:**
> 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
...
...
@@ -200,7 +201,7 @@ getRealActiveTime(isNano?: boolean): Promise<number>
## systemTime.getRealTime<sup>8+</sup>
getRealTime(
callback: AsyncCallback
<
number
>
): void
getRealTime(
isNano?: boolean, callback: AsyncCallback
<number>
): void;
获取自系统启动以来经过的时间,包括深度睡眠时间,使用callback形式返回结果。
...
...
@@ -228,7 +229,7 @@ getRealTime(callback: AsyncCallback<number>): void
## systemTime.getRealTime<sup>8+</sup>
getRealTime(
): Promise
<
number
>
;
getRealTime(
isNano?: boolean): Promise
<number>
;
获取自系统启动以来经过的时间,包括深度睡眠时间,使用Promise形式返回结果。
...
...
zh-cn/application-dev/reference/apis/js-apis-timer.md
浏览文件 @
00fd028c
...
...
@@ -3,6 +3,13 @@
## setTimeout
## 导入模块
```
import Time from '@ohos.Time';
```
setTimeout(handler[,delay[,…args]]): number
设置一个定时器,该定时器在定时器到期后执行一个函数。
...
...
@@ -20,7 +27,7 @@ setTimeout(handler[,delay[,…args]]): number
| number | timeout定时器的ID。 |
-
示例
```
```
js
export
default
{
setTimeOut
()
{
var
timeoutID
=
setTimeout
(
function
()
{
...
...
@@ -43,7 +50,7 @@ clearTimeout(timeoutID: number): void
| timeoutID | number | 是 | 要取消定时器的ID,
是由setTimeout()返回的。 |
-
示例
```
```
js
export
default
{
clearTimeOut
()
{
var
timeoutID
=
setTimeout
(
function
()
{
...
...
@@ -74,7 +81,7 @@ setInterval(handler[, delay[, ...args]]): number
| number | intervalID重复定时器的ID。 |
-
示例
```
```
js
export
default
{
setInterval
()
{
var
intervalID
=
setInterval
(
function
()
{
...
...
@@ -97,7 +104,7 @@ clearInterval(intervalID: number): void
| intervalID | number | 是 | 要取消的重复定时器的ID,是由
setInterval()
返回的。 |
-
示例
```
```
js
export
default
{
clearInterval
()
{
var
intervalID
=
setInterval
(
function
()
{
...
...
@@ -107,3 +114,4 @@ clearInterval(intervalID: number): void
}
}
```
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录