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

!7380 文档格式修改+示例代码低错修改

Merge pull request !7380 from LiAn/master
......@@ -54,8 +54,10 @@ To make you better understand how functions work together and jumpstart your app
API references encompass all components and APIs available in OpenHarmony, helping you use and integrate APIs more effectively.
They are organized as follows:
- [Component Reference (TypeScript-based Declarative Development Paradigm)](reference/arkui-ts/Readme-EN.md)
- [Component Reference (JavaScript-based Web-like Development Paradigm)](reference/arkui-js/Readme-EN.md)
- [Component Reference (TypeScript-based Declarative Development Paradigm)](reference/arkui-ts/Readme-EN.md)
- APIs
- [JS and TS APIs](reference/apis/Readme-EN.md)
- Native APIs
......
# Development References
- [JavaScript-based Web-like Development Paradigm](arkui-js/Readme-EN.md)
- [TypeScript-based Declarative Development Paradigm](arkui-ts/Readme-EN.md)
- [Component Reference(TypeScript-based Declarative Development Paradigm)](arkui-ts/Readme-EN.md)
- [Component Reference(JavaScript-based Web-like Development Paradigm)](arkui-js/Readme-EN.md)
- [APIs](apis/Readme-EN.md)
- [JS (eTS Included) APIs](apis/Readme-EN.md)
- Native APIs
- [Standard Library](native-lib/third_party_libc/musl.md)
......
# UI Development
- [ArkUI Overview](arkui-overview.md)
- TypeScript-based Declarative Development Paradigm
- [Overview](ui-ts-overview.md)
- Framework Overview
- File Organization
- [Directory Structure](ts-framework-directory.md)
- [Rules for Accessing Application Code Files](ts-framework-file-access-rules.md)
- ["js" Tag](ts-framework-js-tag.md)
- Resource Access
- [Accessing Application Resources](ts-application-resource-access.md)
- [Accessing System Resources](ts-system-resource-access.md)
- [Media Resource Types](ts-media-resource-type.md)
- [Pixel Units](ts-pixel-units.md)
- [Types](ts-types.md)
- Declarative Syntax
- [Overview](ts-syntax-intro.md)
- General UI Description Specifications
- [Basic Concepts](ts-general-ui-concepts.md)
- Declarative UI Description Specifications
- [Configuration Without Parameters](ts-parameterless-configuration.md)
- [Configuration with Mandatory Parameters](ts-configuration-with-mandatory-parameters.md)
- [Attribute Configuration](ts-attribution-configuration.md)
- [Event Configuration](ts-event-configuration.md)
- [Child Component Configuration](ts-child-component-configuration.md)
- Componentization
- [@Component](ts-component-based-component.md)
- [@Entry](ts-component-based-entry.md)
- [@Preview](ts-component-based-preview.md)
- [@Builder](ts-component-based-builder.md)
- [@Extend](ts-component-based-extend.md)
- [@CustomDialog](ts-component-based-customdialog.md)
- [@Styles](ts-component-based-styles.md)
- About UI State Management
- [Basic Concepts](ts-ui-state-mgmt-concepts.md)
- Managing Component States
- [@State](ts-component-states-state.md)
- [@Prop](ts-component-states-prop.md)
- [@Link](ts-component-states-link.md)
- Managing Application States
- [AppStorage](ts-application-states-appstorage.md)
- [PersistentStorage](ts-application-states-apis-persistentstorage.md)
- [Environment](ts-application-states-apis-environment.md)
- Managing Other States
- [@Observed and @ObjectLink](ts-other-states-observed-objectlink.md)
- [@Consume and @Provide](ts-other-states-consume-provide.md)
- [@Watch](ts-other-states-watch.md)
- About Rendering Control Syntax
- [if/else](ts-rending-control-syntax-if-else.md)
- [ForEach](ts-rending-control-syntax-foreach.md)
- [LazyForEach](ts-rending-control-syntax-lazyforeach.md)
- About @Component
- [build Function](ts-function-build.md)
- [Initialization of Custom Components' Member Variables](ts-custom-component-initialization.md)
- [Custom Component Lifecycle Callbacks](ts-custom-component-lifecycle-callbacks.md)
- [Component Creation and Re-initialization](ts-component-creation-re-initialization.md)
- [About Syntactic Sugar](ts-syntactic-sugar.md)
- Common Component Development Guidelines
- [Button](ui-ts-basic-components-button.md)
- [Web](ui-ts-components-web.md)
- Common Layout Development Guidelines
- [Flex Layout](ui-ts-layout-flex.md)
- [Grid Layout](ui-ts-layout-grid-container.md)
- [Media Query](ui-ts-layout-mediaquery.md)
- Experiencing the Declarative UI
- [Creating a Declarative UI Project](ui-ts-creating-project.md)
- [Getting to Know Components](ui-ts-components.md)
- [Creating a Simple Page](ui-ts-creating-simple-page.md)
- Defining Page Layout and Connection
- [Building a Food Data Model](ui-ts-building-data-model.md)
- [Building a Food Category List Layout](ui-ts-building-category-list-layout.md)
- [Building a Food Category Grid Layout](ui-ts-building-category-grid-layout.md)
- [Implementing Page Redirection and Data Transmission](ui-ts-page-redirection-data-transmission.md)
- JavaScript-based Web-like Development Paradigm
- [Overview](ui-js-overview.md)
- Framework
......@@ -73,74 +144,4 @@
- [Animation Effect](ui-js-animate-dynamic-effects.md)
- [Animation Frame](ui-js-animate-frame.md)
- [Custom Components](ui-js-custom-components.md)
- TypeScript-based Declarative Development Paradigm
- [Overview](ui-ts-overview.md)
- Framework Overview
- File Organization
- [Directory Structure](ts-framework-directory.md)
- [Rules for Accessing Application Code Files](ts-framework-file-access-rules.md)
- ["js" Tag](ts-framework-js-tag.md)
- Resource Access
- [Accessing Application Resources](ts-application-resource-access.md)
- [Accessing System Resources](ts-system-resource-access.md)
- [Media Resource Types](ts-media-resource-type.md)
- [Pixel Units](ts-pixel-units.md)
- [Types](ts-types.md)
- Declarative Syntax
- [Overview](ts-syntax-intro.md)
- General UI Description Specifications
- [Basic Concepts](ts-general-ui-concepts.md)
- Declarative UI Description Specifications
- [Configuration Without Parameters](ts-parameterless-configuration.md)
- [Configuration with Mandatory Parameters](ts-configuration-with-mandatory-parameters.md)
- [Attribute Configuration](ts-attribution-configuration.md)
- [Event Configuration](ts-event-configuration.md)
- [Child Component Configuration](ts-child-component-configuration.md)
- Componentization
- [@Component](ts-component-based-component.md)
- [@Entry](ts-component-based-entry.md)
- [@Preview](ts-component-based-preview.md)
- [@Builder](ts-component-based-builder.md)
- [@Extend](ts-component-based-extend.md)
- [@CustomDialog](ts-component-based-customdialog.md)
- [@Styles](ts-component-based-styles.md)
- About UI State Management
- [Basic Concepts](ts-ui-state-mgmt-concepts.md)
- Managing Component States
- [@State](ts-component-states-state.md)
- [@Prop](ts-component-states-prop.md)
- [@Link](ts-component-states-link.md)
- Managing Application States
- [AppStorage](ts-application-states-appstorage.md)
- [PersistentStorage](ts-application-states-apis-persistentstorage.md)
- [Environment](ts-application-states-apis-environment.md)
- Managing Other States
- [@Observed and @ObjectLink](ts-other-states-observed-objectlink.md)
- [@Consume and @Provide](ts-other-states-consume-provide.md)
- [@Watch](ts-other-states-watch.md)
- About Rendering Control Syntax
- [if/else](ts-rending-control-syntax-if-else.md)
- [ForEach](ts-rending-control-syntax-foreach.md)
- [LazyForEach](ts-rending-control-syntax-lazyforeach.md)
- About @Component
- [build Function](ts-function-build.md)
- [Initialization of Custom Components' Member Variables](ts-custom-component-initialization.md)
- [Custom Component Lifecycle Callbacks](ts-custom-component-lifecycle-callbacks.md)
- [Component Creation and Re-initialization](ts-component-creation-re-initialization.md)
- [About Syntactic Sugar](ts-syntactic-sugar.md)
- Common Component Development Guidelines
- [Button](ui-ts-basic-components-button.md)
- [Web](ui-ts-components-web.md)
- Common Layout Development Guidelines
- [Flex Layout](ui-ts-layout-flex.md)
- [Grid Layout](ui-ts-layout-grid-container.md)
- [Media Query](ui-ts-layout-mediaquery.md)
- Experiencing the Declarative UI
- [Creating a Declarative UI Project](ui-ts-creating-project.md)
- [Getting to Know Components](ui-ts-components.md)
- [Creating a Simple Page](ui-ts-creating-simple-page.md)
- Defining Page Layout and Connection
- [Building a Food Data Model](ui-ts-building-data-model.md)
- [Building a Food Category List Layout](ui-ts-building-category-list-layout.md)
- [Building a Food Category Grid Layout](ui-ts-building-category-grid-layout.md)
- [Implementing Page Redirection and Data Transmission](ui-ts-page-redirection-data-transmission.md)
此差异已折叠。
......@@ -42,8 +42,8 @@
- [示例代码](https://gitee.com/openharmony/app_samples/blob/master/README_zh.md)
- [Codelabs](https://gitee.com/openharmony/codelabs/blob/master/README.md)
- API参考
- [组件参考(基于JS扩展的类Web开发范式)](reference/arkui-js/Readme-CN.md)
- [组件参考(基于TS扩展的声明式开发范式)](reference/arkui-ts/Readme-CN.md)
- [组件参考(基于JS扩展的类Web开发范式)](reference/arkui-js/Readme-CN.md)
- 接口
- [JS及TS API参考](reference/apis/Readme-CN.md)
- Native API
......
......@@ -54,11 +54,14 @@ DevEco Studio工具是OpenHarmony应用开发的推荐IDE工具。
API参考提供了OpenHarmony全量组件和接口的参考文档,可以帮助开发者快速查找到指定接口的详细描述和调用方法。
内容包括:
- [组件参考(基于JS扩展的类Web开发范式)](reference/arkui-js/Readme-CN.md)
- [组件参考(基于TS扩展的声明式开发范式)](reference/arkui-ts/Readme-CN.md)
- 接口参考
- [组件参考(基于JS扩展的类Web开发范式)](reference/arkui-js/Readme-CN.md)
- 接口参考
- [JS及TS API参考](reference/apis/Readme-CN.md)
- Native API
- Native API
- [Native API参考](reference/native-apis/Readme-CN.md)
- [标准库](reference/native-lib/third_party_libc/musl.md)
- [Node_API](reference/native-lib/third_party_napi/napi.md)
......
# 开发参考
- [基于JS扩展的类Web开发范式](arkui-js/Readme-CN.md)
- [基于TS扩展的声明式开发范式](arkui-ts/Readme-CN.md)
- [组件参考(基于TS扩展的声明式开发范式)](arkui-ts/Readme-CN.md)
- [组件参考(基于JS扩展的类Web开发范式)](arkui-js/Readme-CN.md)
- [接口参考(JS及TS API)](apis/Readme-CN.md)
- 接口参考(Native API)
- [OpenHarmony Native API](./native-apis/Readme-CN.md)
......
......@@ -121,7 +121,7 @@
- 资源调度
- [@ohos.backgroundTaskManager (后台任务管理)](js-apis-backgroundTaskManager.md)
- [@ohos.distributedMissionManager (distributedMissionManager)](js-apis-distributedMissionManager.md)
- [@ohos.distributedMissionManager (分布式任务管理)](js-apis-distributedMissionManager.md)
- [@ohos.workScheduler (延迟任务调度)](js-apis-workScheduler.md)
- [@ohos.WorkSchedulerExtensionAbility (延迟任务调度回调)](js-apis-WorkSchedulerExtensionAbility.md)
- 定制管理
......
......@@ -4,13 +4,14 @@
开发者在开发应用时,通过复写该模块的接口,在延迟任务触发的时候,系统会通过接口回调应用,开发者在回调接口里面可以处理自己的任务逻辑。
> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:**
> **说明:**
>
> 本模块首批接口从API version 9开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
## 导入模块
```
```ts
import WorkSchedulerExtensionAbility from '@ohos.WorkSchedulerExtensionAbility'
```
......@@ -24,13 +25,13 @@ onWorkStart(work: workScheduler.WorkInfo): void
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| ---- | --------------------- | ---- | -------------- |
| 参数名 | 类型 | 必填 | 说明 |
| ---- | ---------------------------------------- | ---- | -------------- |
| work | [workScheduler.WorkInfo](js-apis-workScheduler.md#workinfo) | 是 | 指示要添加到执行队列的工作。 |
**示例:**
```
```ts
export default class MyWorkSchedulerExtensionAbility extends WorkSchedulerExtensionAbility {
onWorkStart(workInfo) {
console.log('MyWorkSchedulerExtensionAbility onWorkStart' + JSON.stringify(workInfo));
......@@ -48,14 +49,14 @@ onWorkStop(work: workScheduler.WorkInfo): void
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| ---- | --------------------- | ---- | -------------- |
| 参数名 | 类型 | 必填 | 说明 |
| ---- | ---------------------------------------- | ---- | -------------- |
| work | [workScheduler.WorkInfo](js-apis-workScheduler.md#workinfo) | 是 | 指示要添加到执行队列的工作。 |
**示例:**
```
```ts
export default class MyWorkSchedulerExtensionAbility extends WorkSchedulerExtensionAbility {
onWorkStop(workInfo) {
console.log('MyWorkSchedulerExtensionAbility onWorkStop' + JSON.stringify(workInfo));
......
......@@ -12,7 +12,7 @@ AccessibilityExtensionContext模块提供扩展的上下文的能力,包括允
## 导入模块
```js
import AccessibilityExtensionAbility from './@ohos.application.AccessibilityExtensionAbility'
import AccessibilityExtensionAbility from '@ohos.application.AccessibilityExtensionAbility'
```
## FocusDirection
......@@ -21,13 +21,13 @@ import AccessibilityExtensionAbility from './@ohos.application.AccessibilityExte
**系统能力**:以下各项对应的系统能力均为 SystemCapability.Barrierfree.Accessibility.Core
| 名称 | 描述 |
| -------- | -------- |
| up | 表示向上查询。 |
| down | 表示向上查询。 |
| left | 表示向左查询。 |
| right | 表示向右查询。 |
| forward | 表示向前查询。 |
| 名称 | 描述 |
| -------- | ------- |
| up | 表示向上查询。 |
| down | 表示向上查询。 |
| left | 表示向左查询。 |
| right | 表示向右查询。 |
| forward | 表示向前查询。 |
| backward | 表示向后查询。 |
## FocusType
......@@ -36,10 +36,10 @@ import AccessibilityExtensionAbility from './@ohos.application.AccessibilityExte
**系统能力**:以下各项对应的系统能力均为 SystemCapability.Barrierfree.Accessibility.Core
| 名称 | 描述 |
| -------- | -------- |
| 名称 | 描述 |
| ------------- | ----------- |
| accessibility | 表示无障碍的焦点类型。 |
| normal | 表示普通的焦点类型。 |
| normal | 表示普通的焦点类型。 |
## Rect
......@@ -49,12 +49,12 @@ import AccessibilityExtensionAbility from './@ohos.application.AccessibilityExte
### 参数
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| ------ | -------- | ---- | ---- | ------------------ |
| left | number | 是 | 否 | 矩形区域的左边界。 |
| top | number | 是 | 否 | 矩形区域的上边界。 |
| width | number | 是 | 否 | 矩形区域的宽度。 |
| height | number | 是 | 否 | 矩形区域的高度。 |
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| ------ | ------ | ---- | ---- | --------- |
| left | number | 是 | 否 | 矩形区域的左边界。 |
| top | number | 是 | 否 | 矩形区域的上边界。 |
| width | number | 是 | 否 | 矩形区域的宽度。 |
| height | number | 是 | 否 | 矩形区域的高度。 |
## WindowType
......@@ -62,10 +62,10 @@ import AccessibilityExtensionAbility from './@ohos.application.AccessibilityExte
**系统能力**:以下各项对应的系统能力均为 SystemCapability.Barrierfree.Accessibility.Core
| 名称 | 描述 |
| -------- | -------- |
| 名称 | 描述 |
| ----------- | --------- |
| application | 表示应用窗口类型。 |
| system | 表示系统窗口类型。 |
| system | 表示系统窗口类型。 |
## AccessibilityExtensionContext.setEventTypeFilter
......@@ -77,14 +77,14 @@ setEventTypeFilter(type: Array<accessibility.EventType>): Promise\<boolean>;
**参数:**
| 参数名 | 参数类型 | 必填 | 说明 |
| ----- | ------ | ------ | ------ |
| type | Array&lt;[EventType](js-apis-accessibility.md#EventType)&gt; | 是 | 关注的事件类型。 |
| 参数名 | 参数类型 | 必填 | 说明 |
| ---- | ---------------------------------------- | ---- | -------- |
| type | Array&lt;[EventType](js-apis-accessibility.md#EventType)&gt; | 是 | 关注的事件类型。 |
**返回值:**
| 类型 | 说明 |
| -------------------------------- | --------------------------------------- |
| 类型 | 说明 |
| ---------------------- | --------------------- |
| Promise&lt;boolean&gt; | Promise对象。返回当前设置是否成功。 |
**示例:**
......@@ -103,14 +103,14 @@ setTargetBundleName(targetNames: Array\<string>): Promise\<boolean>;
**参数:**
| 参数名 | 参数类型 | 必填 | 说明 |
| ----- | ------ | ------ | ------ |
| targetNames | Array&lt;string&gt; | 是 | 关注的目标包名。 |
| 参数名 | 参数类型 | 必填 | 说明 |
| ----------- | ------------------- | ---- | -------- |
| targetNames | Array&lt;string&gt; | 是 | 关注的目标包名。 |
**返回值:**
| 类型 | 说明 |
| -------------------------------- | --------------------------------------- |
| 类型 | 说明 |
| ---------------------- | --------------------- |
| Promise&lt;boolean&gt; | Promise对象。返回当前设置是否成功。 |
**示例:**
......@@ -129,14 +129,14 @@ getFocusElement(isAccessibilityFocus?: boolean): Promise\<AccessibilityElement>;
**参数:**
| 参数名 | 参数类型 | 必填 | 说明 |
| ----- | ------ | ------ | ------ |
| isAccessibilityFocus | boolean | 否 | 获取的是否是无障碍焦点元素,默认为否。 |
| 参数名 | 参数类型 | 必填 | 说明 |
| -------------------- | ------- | ---- | ------------------- |
| isAccessibilityFocus | boolean | 否 | 获取的是否是无障碍焦点元素,默认为否。 |
**返回值:**
| 类型 | 说明 |
| -------------------------------- | --------------------------------------- |
| 类型 | 说明 |
| ----------------------------------- | ---------------------- |
| Promise&lt;AccessibilityElement&gt; | Promise对象。返回当前对应的焦点元素。 |
**示例:**
......@@ -157,14 +157,14 @@ getWindowRootElement(windowId?: number): Promise\<AccessibilityElement>;
**参数:**
| 参数名 | 参数类型 | 必填 | 说明 |
| ----- | ------ | ------ | ------ |
| windowId | number | 否 | 指定获取根节点元素的窗口,未指定则从当前活跃窗口获取。 |
| 参数名 | 参数类型 | 必填 | 说明 |
| -------- | ------ | ---- | --------------------------- |
| windowId | number | 否 | 指定获取根节点元素的窗口,未指定则从当前活跃窗口获取。 |
**返回值:**
| 类型 | 说明 |
| -------------------------------- | --------------------------------------- |
| 类型 | 说明 |
| ----------------------------------- | ----------------------- |
| Promise&lt;AccessibilityElement&gt; | Promise对象。返回当前对应的根节点元素。 |
**示例:**
......@@ -185,14 +185,14 @@ getWindows(displayId?: number): Promise<Array\<AccessibilityElement>>;
**参数:**
| 参数名 | 参数类型 | 必填 | 说明 |
| ----- | ------ | ------ | ------ |
| displayId | number | 否 | 指定获取窗口信息的屏幕,未指定则从默认主屏幕获取。 |
| 参数名 | 参数类型 | 必填 | 说明 |
| --------- | ------ | ---- | ------------------------- |
| displayId | number | 否 | 指定获取窗口信息的屏幕,未指定则从默认主屏幕获取。 |
**返回值:**
| 类型 | 说明 |
| -------------------------------- | --------------------------------------- |
| 类型 | 说明 |
| ---------------------------------------- | ------------------------ |
| Promise&lt;Array&lt;AccessibilityElement&gt;&gt; | Promise对象。返回当前对应的窗口列表信息。 |
**示例:**
......@@ -213,15 +213,15 @@ gestureInject(gesturePath: GesturePath, listener: Callback\<boolean>): Promise\<
**参数:**
| 参数名 | 参数类型 | 必填 | 说明 |
| ----- | ------ | ------ | ------ |
| gesturePath | [GesturePath](js-apis-application-AccessibilityExtensionAbility.md#GesturePath) | 是 | 表示手势的路径信息。 |
| listener | Callback&lt;boolean&gt; | 是 | 表示注入手势执行结果的回调。 |
| 参数名 | 参数类型 | 必填 | 说明 |
| ----------- | ---------------------------------------- | ---- | -------------- |
| gesturePath | [GesturePath](js-apis-application-AccessibilityExtensionAbility.md#GesturePath) | 是 | 表示手势的路径信息。 |
| listener | Callback&lt;boolean&gt; | 是 | 表示注入手势执行结果的回调。 |
**返回值:**
| 类型 | 说明 |
| -------------------------------- | --------------------------------------- |
| 类型 | 说明 |
| ---------------------- | ---------------------- |
| Promise&lt;boolean&gt; | Promise对象。返回注入手势的调用结果。 |
**示例:**
......
......@@ -3,13 +3,13 @@
本模块提供组件动画效果,包括定义动画、启动动画和以相反的顺序播放动画等。
> **说明:**
>
>
> 本模块首批接口从API version 6开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
## 导入模块
```
```js
import animator from '@ohos.animator';
```
......@@ -23,18 +23,18 @@ createAnimator(options: AnimatorOptions): AnimatorResult
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| options | [AnimatorOptions](#animatoroptions) | 是 | 定义动画选项。|
| 参数名 | 类型 | 必填 | 说明 |
| ------- | ----------------------------------- | ---- | ------- |
| options | [AnimatorOptions](#animatoroptions) | 是 | 定义动画选项。 |
**返回值:**
| 类型 | 说明 |
| -------- | -------- |
| 类型 | 说明 |
| --------------------------------- | ------------- |
| [AnimatorResult](#animatorresult) | Animator结果接口。 |
**示例:**
```
```html
<!-- hml -->
<div class="container">
<div class="Animation" style="height: {{divHeight}}px; width: {{divWidth}}px; background-color: red;" onclick="Show">
......@@ -42,7 +42,7 @@ createAnimator(options: AnimatorOptions): AnimatorResult
</div>
```
```
```js
// js
export default {
data : {
......@@ -94,12 +94,12 @@ update(options: AnimatorOptions): void
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| options | [AnimatorOptions](#animatoroptions) | 是 | 定义动画选项。|
| 参数名 | 类型 | 必填 | 说明 |
| ------- | ----------------------------------- | ---- | ------- |
| options | [AnimatorOptions](#animatoroptions) | 是 | 定义动画选项。 |
**示例:**
```
```js
animator.update(options);
```
......@@ -112,7 +112,7 @@ play(): void
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**示例:**
```
```js
animator.play();
```
......@@ -125,7 +125,7 @@ finish(): void
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**示例:**
```
```js
animator.finish();
```
......@@ -138,7 +138,7 @@ pause(): void
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**示例:**
```
```js
animator.pause();
```
......@@ -151,7 +151,7 @@ cancel(): void
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**示例:**
```
```js
animator.cancel();
```
......@@ -164,7 +164,7 @@ reverse(): void
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**示例:**
```
```js
animator.reverse();
```
......@@ -177,12 +177,12 @@ onframe: (progress: number) => void
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| progress | number | 是 | 动画的当前进度。|
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ------ | ---- | -------- |
| progress | number | 是 | 动画的当前进度。 |
**示例:**
```
```js
animator.onframe();
```
......@@ -195,7 +195,7 @@ onfinish: () => void
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**示例:**
```
```js
animator.onfinish();
```
......@@ -208,7 +208,7 @@ oncancel: () => void
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**示例:**
```
```js
animator.oncancel();
```
......@@ -221,7 +221,7 @@ onrepeat: () => void
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**示例:**
```
```js
animator.onrepeat();
```
......@@ -231,13 +231,13 @@ animator.onrepeat();
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
| 名称 | 参数类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| duration | number | 是 | 动画播放的时长,单位毫秒,默认为0。 |
| easing | string | 是 | 动画插值曲线,默认为'ease'。 |
| delay | number | 是 | 动画延时播放时长,单位毫秒,默认为0,即不延时。 |
| fill | "none" \| "forwards" \| "backwards" \| "both" | 是 | 动画执行后是否恢复到初始状态,默认值为"none"。动画执行后,动画结束时的状态(在最后一个关键帧中定义)将保留。 |
| direction | "normal" \| "reverse" \| "alternate" \| "alternate-reverse" | 是 | 动画播放模式,默认值"normal"。|
| iterations | number | 是 | 动画播放次数,默认值1。设置为0时不播放,设置为-1时无限次播放。 |
| begin | number | 是 | 动画插值起点,默认为0。 |
| end | number | 是 | 动画插值终点,默认为1。 |
| 名称 | 参数类型 | 必填 | 说明 |
| ---------- | ---------------------------------------- | ---- | ---------------------------------------- |
| duration | number | 是 | 动画播放的时长,单位毫秒,默认为0。 |
| easing | string | 是 | 动画插值曲线,默认为'ease'。 |
| delay | number | 是 | 动画延时播放时长,单位毫秒,默认为0,即不延时。 |
| fill | "none" \| "forwards" \| "backwards" \| "both" | 是 | 动画执行后是否恢复到初始状态,默认值为"none"。动画执行后,动画结束时的状态(在最后一个关键帧中定义)将保留。 |
| direction | "normal" \| "reverse" \| "alternate" \| "alternate-reverse" | 是 | 动画播放模式,默认值"normal"。 |
| iterations | number | 是 | 动画播放次数,默认值1。设置为0时不播放,设置为-1时无限次播放。 |
| begin | number | 是 | 动画插值起点,默认为0。 |
| end | number | 是 | 动画插值终点,默认为1。 |
......@@ -11,7 +11,7 @@
## 导入模块
```ts
import AccessibilityExtensionAbility from './@ohos.application.AccessibilityExtensionAbility'
import AccessibilityExtensionAbility from '@ohos.application.AccessibilityExtensionAbility'
```
## AccessibilityEvent
......@@ -22,11 +22,11 @@ import AccessibilityExtensionAbility from './@ohos.application.AccessibilityExte
### 属性
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| -------- | -------- | -------- | -------- | -------- |
| eventType | [EventType](js-apis-accessibility.md#EventType) \| [WindowUpdateType](js-apis-accessibility.md#WindowUpdateType) \| [TouchGuideType](touchguidetype) \| [GestureType](gesturetype) \| [PageUpdateType](pageupdatetype) | 是 | 否 | 具体事件类型。 |
| target | AccessibilityElement | 是 | 否 | 发生事件的目标组件。 |
| timeStamp | number | 是 | 否 | 事件时间戳。 |
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| --------- | ---------------------------------------- | ---- | ---- | ---------- |
| eventType | [EventType](js-apis-accessibility.md#EventType) \| [WindowUpdateType](js-apis-accessibility.md#WindowUpdateType) \| [TouchGuideType](touchguidetype) \| [GestureType](gesturetype) \| [PageUpdateType](pageupdatetype) | 是 | 否 | 具体事件类型。 |
| target | AccessibilityElement | 是 | 否 | 发生事件的目标组件。 |
| timeStamp | number | 是 | 否 | 事件时间戳。 |
## GesturePath
......@@ -36,10 +36,10 @@ import AccessibilityExtensionAbility from './@ohos.application.AccessibilityExte
### 属性
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| -------- | -------- | -------- | -------- | -------- |
| points | Array&lt;[GesturePoint](gesturepoint)&gt; | 是 | 是 | 手势。 |
| durationTime | number | 是 | 是 | 手势总耗时。 |
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| ------------ | ---------------------------------------- | ---- | ---- | ------ |
| points | Array&lt;[GesturePoint](gesturepoint)&gt; | 是 | 是 | 手势。 |
| durationTime | number | 是 | 是 | 手势总耗时。 |
### 方法
......@@ -51,9 +51,9 @@ constructor(durationTime: number)
- 参数:
| 参数名 | 参数类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| durationTime | number | 是 | 手势总耗时。 |
| 参数名 | 参数类型 | 必填 | 说明 |
| ------------ | ------ | ---- | ------ |
| durationTime | number | 是 | 手势总耗时。 |
- 示例
......@@ -69,10 +69,10 @@ constructor(durationTime: number)
### 属性
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| -------- | -------- | -------- | -------- | -------- |
| positionX | number | 是 | 是 | 触摸点X坐标。 |
| positionY | number | 是 | 是 | 触摸点Y坐标。 |
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| --------- | ------ | ---- | ---- | ------- |
| positionX | number | 是 | 是 | 触摸点X坐标。 |
| positionY | number | 是 | 是 | 触摸点Y坐标。 |
### 方法
......@@ -84,10 +84,10 @@ constructor(positionX: number, positionY: number)
- 参数:
| 参数名 | 参数类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| positionX | number | 是 | 触摸点X坐标。 |
| positionY | number | 是 | 触摸点Y坐标。 |
| 参数名 | 参数类型 | 必填 | 说明 |
| --------- | ------ | ---- | ------- |
| positionX | number | 是 | 触摸点X坐标。 |
| positionY | number | 是 | 触摸点Y坐标。 |
- 示例
......@@ -101,24 +101,24 @@ constructor(positionX: number, positionY: number)
**系统能力**:以下各项对应的系统能力均为 SystemCapability.Barrierfree.Accessibility.Core
| 名称 | 描述 |
| -------- | -------- |
| left | 表示向左的手势。 |
| 名称 | 描述 |
| ------------- | ------------ |
| left | 表示向左的手势。 |
| leftThenRight | 表示先向左再向右的手势。 |
| leftThenUp | 表示先向左再向上的手势。 |
| leftThenDown | 表示先向左再向下的手势。 |
| right | 表示向右的手势。 |
| leftThenUp | 表示先向左再向上的手势。 |
| leftThenDown | 表示先向左再向下的手势。 |
| right | 表示向右的手势。 |
| rightThenLeft | 表示先向右再向左的手势。 |
| rightThenUp | 表示先向右再向上的手势。 |
| rightThenUp | 表示先向右再向上的手势。 |
| rightThenDown | 表示先向右再向下的手势。 |
| up | 表示向上的手势。 |
| upThenLeft | 表示先向上再向左的手势。 |
| upThenRight | 表示先向上再向右的手势。 |
| upThenDown | 表示先向上再向下的手势。 |
| down | 表示向下的手势。 |
| downThenLeft | 表示先向下再向左的手势。 |
| up | 表示向上的手势。 |
| upThenLeft | 表示先向上再向左的手势。 |
| upThenRight | 表示先向上再向右的手势。 |
| upThenDown | 表示先向上再向下的手势。 |
| down | 表示向下的手势。 |
| downThenLeft | 表示先向下再向左的手势。 |
| downThenRight | 表示先向下再向右的手势。 |
| downThenUp | 表示先向下再向上的手势。 |
| downThenUp | 表示先向下再向上的手势。 |
## PageUpdateType
......@@ -126,10 +126,10 @@ constructor(positionX: number, positionY: number)
**系统能力**:以下各项对应的系统能力均为 SystemCapability.Barrierfree.Accessibility.Core
| 名称 | 描述 |
| -------- | -------- |
| 名称 | 描述 |
| ----------------- | --------- |
| pageContentUpdate | 表示页面内容刷新。 |
| pageStateUpdate | 表示页面状态刷新。 |
| pageStateUpdate | 表示页面状态刷新。 |
## TouchGuideType
......@@ -137,10 +137,10 @@ constructor(positionX: number, positionY: number)
**系统能力**:以下各项对应的系统能力均为 SystemCapability.Barrierfree.Accessibility.Core
| 名称 | 描述 |
| -------- | -------- |
| 名称 | 描述 |
| ---------- | ------------ |
| touchBegin | 表示触摸浏览时开始触摸。 |
| touchEnd | 表示触摸浏览时结束触摸。 |
| touchEnd | 表示触摸浏览时结束触摸。 |
## AccessibilityExtensionAbility.onConnect
......@@ -192,9 +192,9 @@ onAccessibilityEvent(event: AccessibilityEvent): void;
**参数:**
| 参数名 | 参数类型 | 必填 | 说明 |
| ----- | ------ | ------ | ------ |
| event | [AccessibilityEvent](accessibilityevent) | 是 | 无障碍事件回调函数。无返回值。 |
| 参数名 | 参数类型 | 必填 | 说明 |
| ----- | ---------------------------------------- | ---- | --------------- |
| event | [AccessibilityEvent](accessibilityevent) | 是 | 无障碍事件回调函数。无返回值。 |
**示例:**
......@@ -217,9 +217,9 @@ onKeyEvent(keyEvent: inputEventClient.KeyEvent): boolean;
**参数:**
| 参数名 | 参数类型 | 必填 | 说明 |
| ----- | ------ | ------ | ------ |
| keyEvent | [KeyEvent](js-apis-inputeventclient.md#KeyEvent) | 是 | 按键事件回调函数。返回true表示拦截此按键。 |
| 参数名 | 参数类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | ----------------------- |
| keyEvent | [KeyEvent](js-apis-inputeventclient.md#KeyEvent) | 是 | 按键事件回调函数。返回true表示拦截此按键。 |
**示例:**
......
......@@ -8,13 +8,13 @@
应用中存在用户能够直观感受到的且需要一直在后台运行的业务时(如,后台播放音乐),可以使用长时任务机制。
> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:**
> **说明:**
> 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
## 导入模块
```
```js
import backgroundTaskManager from '@ohos.backgroundTaskManager';
```
......@@ -143,12 +143,12 @@ startBackgroundRunning(context: Context, bgMode: BackgroundMode, wantAgent: Want
**系统能力:** SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| --------- | ---------------------------------- | ---- | ------------------------ |
| context | Context | 是 | 应用运行的上下文。<br>FA模型的应用Context定义见[Context](js-apis-Context.md)<br>Stage模型的应用Context定义见[Context](js-apis-ability-context.md) |
| bgMode | [BackgroundMode](#backgroundmode8) | 是 | 向系统申请的后台模式。 |
| wantAgent | [WantAgent](js-apis-wantAgent.md) | 是 | 通知参数,用于指定长时任务通知点击后跳转的界面。 |
| callback | AsyncCallback&lt;void&gt; | 是 | callback形式返回启动长时任务的结果。 |
| 参数名 | 类型 | 必填 | 说明 |
| --------- | ---------------------------------- | ---- | ---------------------------------------- |
| context | Context | 是 | 应用运行的上下文。<br>FA模型的应用Context定义见[Context](js-apis-Context.md)<br>Stage模型的应用Context定义见[Context](js-apis-ability-context.md) |
| bgMode | [BackgroundMode](#backgroundmode8) | 是 | 向系统申请的后台模式。 |
| wantAgent | [WantAgent](js-apis-wantAgent.md) | 是 | 通知参数,用于指定长时任务通知点击后跳转的界面。 |
| callback | AsyncCallback&lt;void&gt; | 是 | callback形式返回启动长时任务的结果。 |
**示例**
```js
......@@ -195,11 +195,11 @@ startBackgroundRunning(context: Context, bgMode: BackgroundMode, wantAgent: Want
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| --------- | ---------------------------------- | ---- | ----------------------- |
| context | Context | 是 | 应用运行的上下文。<br>FA模型的应用Context定义见[Context](js-apis-Context.md)<br>Stage模型的应用Context定义见[Context](js-apis-ability-context.md) |
| bgMode | [BackgroundMode](#backgroundmode8) | 是 | 向系统申请的后台模式。 |
| wantAgent | [WantAgent](js-apis-wantAgent.md) | 是 | 通知参数,用于指定长时任务通知点击跳转的界面。 |
| 参数名 | 类型 | 必填 | 说明 |
| --------- | ---------------------------------- | ---- | ---------------------------------------- |
| context | Context | 是 | 应用运行的上下文。<br>FA模型的应用Context定义见[Context](js-apis-Context.md)<br>Stage模型的应用Context定义见[Context](js-apis-ability-context.md) |
| bgMode | [BackgroundMode](#backgroundmode8) | 是 | 向系统申请的后台模式。 |
| wantAgent | [WantAgent](js-apis-wantAgent.md) | 是 | 通知参数,用于指定长时任务通知点击跳转的界面。 |
**返回值**
| 类型 | 说明 |
......@@ -244,10 +244,10 @@ stopBackgroundRunning(context: Context, callback: AsyncCallback&lt;void&gt;): vo
**系统能力:** SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ----------------------------- | ---- | ---------------------- |
| context | Context | 是 | 应用运行的上下文。<br>FA模型的应用Context定义见[Context](js-apis-Context.md)<br>Stage模型的应用Context定义见[Context](js-apis-ability-context.md) |
| callback | AsyncCallback&lt;void&gt; | 是 | callback形式返回启动长时任务的结果。 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ------------------------- | ---- | ---------------------------------------- |
| context | Context | 是 | 应用运行的上下文。<br>FA模型的应用Context定义见[Context](js-apis-Context.md)<br>Stage模型的应用Context定义见[Context](js-apis-ability-context.md) |
| callback | AsyncCallback&lt;void&gt; | 是 | callback形式返回启动长时任务的结果。 |
**示例**
```js
......@@ -275,8 +275,8 @@ stopBackgroundRunning(context: Context): Promise&lt;void&gt;
**系统能力:** SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| ------- | ----------------------------- | ---- | --------- |
| 参数名 | 类型 | 必填 | 说明 |
| ------- | ------- | ---- | ---------------------------------------- |
| context | Context | 是 | 应用运行的上下文。<br>FA模型的应用Context定义见[Context](js-apis-Context.md)<br>Stage模型的应用Context定义见[Context](js-apis-ability-context.md)。 |
**返回值**
......@@ -301,7 +301,7 @@ backgroundTaskManager.stopBackgroundRunning(featureAbility.getContext()).then(()
延迟挂起信息。
**系统能力:** 以下各项对应的系统能力均为SystemCapability.ResourceSchedule.BackgroundTaskManager.TransientTask
**系统能力:** SystemCapability.ResourceSchedule.BackgroundTaskManager.TransientTask
| 参数名 | 类型 | 必填 | 说明 |
| --------------- | ------ | ---- | ---------------------------------------- |
......@@ -311,16 +311,16 @@ backgroundTaskManager.stopBackgroundRunning(featureAbility.getContext()).then(()
## BackgroundMode<sup>8+</sup>
**系统能力:** 以下各项对应的系统能力均为SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask
| 参数名 | 参数值 | 描述 |
| ----------------------- | ------ | ------------------------------------------------------------ |
| DATA_TRANSFER | 1 | 数据传输 |
| AUDIO_PLAYBACK | 2 | 音频播放 |
| AUDIO_RECORDING | 3 | 录音 |
| LOCATION | 4 | 定位导航 |
| BLUETOOTH_INTERACTION | 5 | 蓝牙相关 |
| MULTI_DEVICE_CONNECTION | 6 | 多设备互联 |
| WIFI_INTERACTION | 7 | WLAN相关<br />**系统API**:此接口为系统接口,三方应用不支持调用。 |
| VOIP | 8 | 音视频通话<br />**系统API**:此接口为系统接口,三方应用不支持调用。 |
| TASK_KEEPING | 9 | 计算任务(仅在特定设备生效) |
\ No newline at end of file
**系统能力:** SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask
| 参数名 | 参数值 | 描述 |
| ----------------------- | ---- | --------------------- |
| DATA_TRANSFER | 1 | 数据传输 |
| AUDIO_PLAYBACK | 2 | 音频播放 |
| AUDIO_RECORDING | 3 | 录音 |
| LOCATION | 4 | 定位导航 |
| BLUETOOTH_INTERACTION | 5 | 蓝牙相关 |
| MULTI_DEVICE_CONNECTION | 6 | 多设备互联 |
| WIFI_INTERACTION | 7 | WLAN相关<br />此接口为系统接口。 |
| VOIP | 8 | 音视频通话<br />此接口为系统接口。 |
| TASK_KEEPING | 9 | 计算任务(仅在特定设备生效) |
\ No newline at end of file
......@@ -6,7 +6,7 @@
>
> 本模块首批接口从API version 8开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
>
> 本模块接口均为系统接口,三方应用不支持调用
> 本模块接口均为系统接口。
## 导入模块
......
......@@ -3,14 +3,14 @@
分布式任务管理模块提供跨设备系统任务管理能力,包括注册系统任务状态监听、取消系统任务状态监听、开始同步远端任务列表、停止同步远端任务列表操作。
> **说明:**
>
>
> 本模块首批接口从API version 9开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
>
> 本模块接口为系统接口。
## 导入模块
```
```js
import distributedMissionManager from '@ohos.distributedMissionManager'
```
......@@ -27,11 +27,11 @@ registerMissionListener(parameter: MissionDeviceInfo, options: MissionCallback,
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| parameter | [MissionDeviceInfo](#missiondeviceinfo) | 是 | 注册监听设备信息。 |
| options | [MissionCallback](#missioncallback) | 是 | 注册的回调方法。 |
| callback | AsyncCallback&lt;void&gt; | 是 | 执行结果回调函数。 |
| 参数名 | 类型 | 必填 | 说明 |
| --------- | --------------------------------------- | ---- | --------- |
| parameter | [MissionDeviceInfo](#missiondeviceinfo) | 是 | 注册监听设备信息。 |
| options | [MissionCallback](#missioncallback) | 是 | 注册的回调方法。 |
| callback | AsyncCallback&lt;void&gt; | 是 | 执行结果回调函数。 |
**示例:**
......@@ -71,16 +71,16 @@ registerMissionListener(parameter: MissionDeviceInfo, options: MissionCallback):
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| parameter | [MissionDeviceInfo](#missiondeviceinfo) | 是 | 设备信息。 |
| options | <a href="#missioncallback">MissionCallback</a> | 是 | 注册的回调方法。 |
| 参数名 | 类型 | 必填 | 说明 |
| --------- | ---------------------------------------- | ---- | -------- |
| parameter | [MissionDeviceInfo](#missiondeviceinfo) | 是 | 设备信息。 |
| options | <a href="#missioncallback">MissionCallback</a> | 是 | 注册的回调方法。 |
**返回值:**
| 类型 | 说明 |
| -------- | -------- |
| Promise&lt;void&gt; | promise方式返回执行结果。 |
| 类型 | 说明 |
| ------------------- | ---------------- |
| Promise&lt;void&gt; | promise方式返回执行结果。 |
**示例:**
......@@ -125,10 +125,10 @@ unregisterMissionListener(parameter: MissionDeviceInfo, callback: AsyncCallback&
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| parameter | [MissionDeviceInfo](#missiondeviceinfo) | 是 | 设备信息。 |
| callback | AsyncCallback&lt;void&gt; | 是 | 执行结果回调函数。 |
| 参数名 | 类型 | 必填 | 说明 |
| --------- | --------------------------------------- | ---- | --------- |
| parameter | [MissionDeviceInfo](#missiondeviceinfo) | 是 | 设备信息。 |
| callback | AsyncCallback&lt;void&gt; | 是 | 执行结果回调函数。 |
**示例:**
......@@ -154,15 +154,15 @@ unregisterMissionListener(parameter: MissionDeviceInfo): Promise&lt;void&gt;
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| parameter | [MissionDeviceInfo](#missiondeviceinfo) | 是 | 设备信息。 |
| 参数名 | 类型 | 必填 | 说明 |
| --------- | --------------------------------------- | ---- | ----- |
| parameter | [MissionDeviceInfo](#missiondeviceinfo) | 是 | 设备信息。 |
**返回值:**
| 类型 | 说明 |
| -------- | -------- |
| Promise&lt;void&gt; | promise方式返回执行结果。 |
| 类型 | 说明 |
| ------------------- | ---------------- |
| Promise&lt;void&gt; | promise方式返回执行结果。 |
**示例:**
......@@ -190,10 +190,10 @@ startSyncRemoteMissions(parameter: MissionParameter, callback: AsyncCallback&lt;
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| parameter | [MissionParameter](#missionparameter) | 是 | 同步信息。 |
| callback | AsyncCallback&lt;void&gt; | 是 | 执行结果回调函数。 |
| 参数名 | 类型 | 必填 | 说明 |
| --------- | ------------------------------------- | ---- | --------- |
| parameter | [MissionParameter](#missionparameter) | 是 | 同步信息。 |
| callback | AsyncCallback&lt;void&gt; | 是 | 执行结果回调函数。 |
**示例:**
......@@ -220,15 +220,15 @@ startSyncRemoteMissions(parameter: MissionParameter): Promise&lt;void&gt;
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| parameter | [MissionParameter](#missionparameter) | 是 | 同步信息。 |
| 参数名 | 类型 | 必填 | 说明 |
| --------- | ------------------------------------- | ---- | ----- |
| parameter | [MissionParameter](#missionparameter) | 是 | 同步信息。 |
**返回值:**
| 类型 | 说明 |
| -------- | -------- |
| Promise&lt;void&gt; | promise方式返回执行结果。 |
| 类型 | 说明 |
| ------------------- | ---------------- |
| Promise&lt;void&gt; | promise方式返回执行结果。 |
**示例:**
......@@ -258,10 +258,10 @@ stopSyncRemoteMissions(parameter: MissionDeviceInfo, callback: AsyncCallback&lt;
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| parameter | [MissionDeviceInfo](#missiondeviceinfo) | 是 | 同步信息。 |
| callback | AsyncCallback&lt;void&gt; | 是 | 执行结果回调函数。 |
| 参数名 | 类型 | 必填 | 说明 |
| --------- | --------------------------------------- | ---- | --------- |
| parameter | [MissionDeviceInfo](#missiondeviceinfo) | 是 | 同步信息。 |
| callback | AsyncCallback&lt;void&gt; | 是 | 执行结果回调函数。 |
**示例:**
......@@ -286,15 +286,15 @@ stopSyncRemoteMissions(parameter: MissionDeviceInfo): Promise&lt;void&gt;
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| parameter | [MissionDeviceInfo](#missiondeviceinfo) | 是 | 同步信息。 |
| 参数名 | 类型 | 必填 | 说明 |
| --------- | --------------------------------------- | ---- | ----- |
| parameter | [MissionDeviceInfo](#missiondeviceinfo) | 是 | 同步信息。 |
**返回值:**
| 类型 | 说明 |
| -------- | -------- |
| Promise&lt;void&gt; | promise方式返回执行结果。 |
| 类型 | 说明 |
| ------------------- | ---------------- |
| Promise&lt;void&gt; | promise方式返回执行结果。 |
**示例:**
......@@ -314,32 +314,32 @@ stopSyncRemoteMissions(parameter: MissionDeviceInfo): Promise&lt;void&gt;
表示开始同步后,建立的回调函数。
**系统能力**以下各项对应的系统能力均为SystemCapability.Ability.AbilityRuntime.Mission
**系统能力**:SystemCapability.Ability.AbilityRuntime.Mission
| 名称 | 类型 | 可读 | 可写 | 说明 |
| -------- | -------- | -------- | -------- | -------- |
| notifyMissionsChanged | function | 是 | 否 | 通知任务变化,返回设备ID。|
| notifySnapshot | function | 是 | 否 | 通知快照变化,返回设备ID,任务ID |
| notifyNetDisconnect | function | 是 | 否 | 通知断开连接,返回设备ID,网络状态 |
| 名称 | 类型 | 可读 | 可写 | 说明 |
| --------------------- | -------- | ---- | ---- | ------------------ |
| notifyMissionsChanged | function | 是 | 否 | 通知任务变化,返回设备ID。 |
| notifySnapshot | function | 是 | 否 | 通知快照变化,返回设备ID,任务ID |
| notifyNetDisconnect | function | 是 | 否 | 通知断开连接,返回设备ID,网络状态 |
## MissionParameter
表示同步时所需参数的枚举。
**系统能力**以下各项对应的系统能力均为SystemCapability.Ability.AbilityRuntime.Mission
**系统能力**:SystemCapability.Ability.AbilityRuntime.Mission
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| -------- | -------- | -------- | -------- | -------- |
| deviceId | string | 是 | 是 | 表示设备ID。|
| fixConflict | boolean | 是 | 是 | 表示是否存在版本冲突。 |
| tag | number | 是 | 是 | 表示特定的标签。 |
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| ----------- | ------- | ---- | ---- | ----------- |
| deviceId | string | 是 | 是 | 表示设备ID。 |
| fixConflict | boolean | 是 | 是 | 表示是否存在版本冲突。 |
| tag | number | 是 | 是 | 表示特定的标签。 |
## MissionDeviceInfo
表示注册监听时所需参数的枚举。
**系统能力**以下各项对应的系统能力均为SystemCapability.Ability.AbilityRuntime.Mission
**系统能力**:SystemCapability.Ability.AbilityRuntime.Mission
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| -------- | -------- | -------- | -------- | -------- |
| deviceId | string | 是 | 是 | 表示设备ID。|
\ No newline at end of file
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| -------- | ------ | ---- | ---- | ------- |
| deviceId | string | 是 | 是 | 表示设备ID。 |
\ No newline at end of file
......@@ -6,13 +6,13 @@ InputConsumer模块提供对按键事件的监听。
>
> - 本模块首批接口从API version 8开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
>
> - 本模块接口均为系统接口,三方应用不支持调用
> - 本模块接口为系统接口
## 导入模块
```
```js
import inputConsumer from '@ohos.multimodalInput.inputConsumer';
```
......@@ -23,21 +23,19 @@ on(type: "key", keyOptions: KeyOptions, callback: Callback&lt;KeyOptions&gt;): v
开始监听组合按键事件, 当满足条件的组合按键输入事件发生时,将keyOptions回调到入参callback表示的回调函数上。
此接口为系统接口。
**系统能力:** SystemCapability.MultimodalInput.Input.InputConsumer
**参数:**
| 参数 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | string | 是 | 监听输入事件类型,只支持“key”。 |
| keyOptions | [keyOptions](#keyoptions) | 是 | 组合键选项,用来指定组合键输入时应该符合的条件。 |
| callback | Callback&lt;KeyOptions&gt; | 是 | 回调函数。当满足条件的按键输入产生时,回调到此函数,以传入的KeyOptions为入参。 |
| 参数 | 类型 | 必填 | 说明 |
| ---------- | -------------------------- | ---- | ---------------------------------------- |
| type | string | 是 | 监听输入事件类型,只支持“key”。 |
| keyOptions | [keyOptions](#keyoptions) | 是 | 组合键选项,用来指定组合键输入时应该符合的条件。 |
| callback | Callback&lt;KeyOptions&gt; | 是 | 回调函数。当满足条件的按键输入产生时,回调到此函数,以传入的KeyOptions为入参。 |
**示例:**
```
```js
let keyOptions = {preKeys: [], finalKey: 3, isFinalKeyDown: true, finalKeyDownDuration: 0}
let callback = function(keyOptions) {
console.info("preKeys: " + keyOptions.preKeys, "finalKey: " + keyOptions.finalKey,
......@@ -53,21 +51,19 @@ off(type: "key", keyOptions: KeyOptions, callback?: Callback&lt;KeyOptions&gt;):
停止监听组合按键事件。
此接口为系统接口。
**系统能力:** SystemCapability.MultimodalInput.Input.InputConsumer
**参数:**
| 参数 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | string | 是 | 监听输入事件类型,只支持“key”。 |
| keyOptions | [keyOptions](#keyoptions) | 是 | 开始监听时传入的keyOptions。 |
| callback | Callback&lt;KeyOptions&gt; | 是 | 开始监听时与KeyOption一同传入的回调函数&nbsp;。 |
| 参数 | 类型 | 必填 | 说明 |
| ---------- | -------------------------- | ---- | ------------------------------- |
| type | string | 是 | 监听输入事件类型,只支持“key”。 |
| keyOptions | [keyOptions](#keyoptions) | 是 | 开始监听时传入的keyOptions。 |
| callback | Callback&lt;KeyOptions&gt; | 是 | 开始监听时与KeyOption一同传入的回调函数&nbsp;。 |
**示例:**
```
```js
let keyOptions = {preKeys: [], finalKey: 3, isFinalKeyDown: true, finalKeyDownDuration: 0}
let callback = function(keyOptions) {
console.info("preKeys: " + keyOptions.preKeys, "finalKey: " + keyOptions.finalKey,
......@@ -81,13 +77,11 @@ inputConsumer.off('key', keyOptions, callback);
组合键输入事件发生时,组合键满足的选项。
此接口为系统接口。
**系统能力:** SystemCapability.MultimodalInput.Input.InputConsumer
| 参数 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| preKeys | Array | 是 | 组合键前置按键集合,可为空,前置按键无顺序要求。 |
| finalKey | Number | 是 | 组合键最后按键,不能为空。 |
| isFinalKeyDown | boolean | 是 | 组合键最后按键是按下还是抬起,默认是按下。 |
| finalKeyDownDuration | Number | 是 | 组合键最后按键按下持续时长,默认无时长要求。 |
| 参数 | 类型 | 必填 | 说明 |
| -------------------- | ------- | ---- | ------------------------ |
| preKeys | Array | 是 | 组合键前置按键集合,可为空,前置按键无顺序要求。 |
| finalKey | Number | 是 | 组合键最后按键,不能为空。 |
| isFinalKeyDown | boolean | 是 | 组合键最后按键是按下还是抬起,默认是按下。 |
| finalKeyDownDuration | Number | 是 | 组合键最后按键按下持续时长,默认无时长要求。 |
......@@ -284,7 +284,7 @@ inputDevice.getKeyboardType(1).then((ret)=>{
输入设备的描述信息。
**系统能力**以下各项对应的系统能力均为SystemCapability.MultimodalInput.Input.InputDevice
**系统能力**:SystemCapability.MultimodalInput.Input.InputDevice
| 名称 | 参数类型 | 说明 |
| -------- | --------------------------- | --------------------------------- |
......@@ -295,7 +295,7 @@ inputDevice.getKeyboardType(1).then((ret)=>{
输入设备的描述信息。
**系统能力**以下各项对应的系统能力均为SystemCapability.MultimodalInput.Input.InputDevice
**系统能力**:SystemCapability.MultimodalInput.Input.InputDevice
| 名称 | 参数类型 | 说明 |
| -------------------- | -------------------------------------- | ---------------------------------------- |
......@@ -314,7 +314,7 @@ inputDevice.getKeyboardType(1).then((ret)=>{
输入设备的轴类型。
**系统能力**以下各项对应的系统能力均为SystemCapability.MultimodalInput.Input.InputDevice
**系统能力**:SystemCapability.MultimodalInput.Input.InputDevice
| 名称 | 参数类型 | 说明 |
| ----------- | ------ | --------------- |
......@@ -332,12 +332,12 @@ inputDevice.getKeyboardType(1).then((ret)=>{
输入设备的轴信息。
**系统能力**以下各项对应的系统能力均为SystemCapability.MultimodalInput.Input.InputDevice
**系统能力**: SystemCapability.MultimodalInput.Input.InputDevice
| 名称 | 参数类型 | 说明 |
| ----------------------- | ------------------------- | -------- |
| source | [SourceType](#sourcetype) | 轴的输入源类型。 |
| axis | [AxisType](#axistype9) | 轴的类型。 |
| axis | [AxisType](#axistype9) | 轴的类型。 |
| max | number | 轴的最大值。 |
| min | number | 轴的最小值。 |
| fuzz<sup>9+</sup> | number | 轴的模糊值。 |
......@@ -348,7 +348,7 @@ inputDevice.getKeyboardType(1).then((ret)=>{
定义这个轴的输入源类型。比如鼠标设备可上报x轴事件,则x轴的源就是鼠标。
**系统能力**以下各项对应的系统能力均为SystemCapability.MultimodalInput.Input.InputDevice
**系统能力**:SystemCapability.MultimodalInput.Input.InputDevice
| 名称 | 参数类型 | 说明 |
| ----------- | ------ | ----------- |
......@@ -363,7 +363,7 @@ inputDevice.getKeyboardType(1).then((ret)=>{
定义监听设备热插拔事件。
**系统能力**以下各项对应的系统能力均为SystemCapability.MultimodalInput.Input.InputDevice
**系统能力**:SystemCapability.MultimodalInput.Input.InputDevice
| 名称 | 参数类型 | 说明 |
| ------ | ------ | --------- |
......@@ -374,7 +374,7 @@ inputDevice.getKeyboardType(1).then((ret)=>{
定义键盘输入设备的类型。
**系统能力**以下各项对应的系统能力均为SystemCapability.MultimodalInput.Input.InputDevice
**系统能力**:SystemCapability.MultimodalInput.Input.InputDevice
| 名称 | 参数类型 | 值 | 说明 |
| ------------------- | ------ | ---- | --------- |
......
......@@ -2,7 +2,7 @@
InputEvent模块描述了设备上报的基本事件。
> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:**
> **说明:**
> 本模块首批接口从API version 9开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
## 导入模块
......@@ -13,12 +13,12 @@ import InputEvent from '@ohos.multimodalInput.inputEvent';
## InputEvent
**系统能力**以下各项对应的系统能力均为SystemCapability.MultimodalInput.Input.Core
**系统能力**:SystemCapability.MultimodalInput.Input.Core
| 名称 | 参数类型 | 可读 | 可写 | 描述 |
| -------- | -------- | -------- | -------- | -------- |
| id | number | 是 | 否 | 由服务端生成全局唯一事件id |
| deviceId | number | 是 | 否 | 上报输入事件的设备id |
| actionTime | number | 是 | 否 | 输入事件的上报时间 |
| screenId | number | 是 | 否 | 目标屏幕id |
| windowId | number | 是 | 否 | 目标窗口id |
\ No newline at end of file
| 名称 | 参数类型 | 可读 | 可写 | 描述 |
| ---------- | ------ | ---- | ---- | -------------- |
| id | number | 是 | 否 | 由服务端生成全局唯一事件id |
| deviceId | number | 是 | 否 | 上报输入事件的设备id |
| actionTime | number | 是 | 否 | 输入事件的上报时间 |
| screenId | number | 是 | 否 | 目标屏幕id |
| windowId | number | 是 | 否 | 目标窗口id |
\ No newline at end of file
......@@ -6,7 +6,7 @@ InputEventClient模块提供了注入按键能力。
>
> - 本模块首批接口从API version 8开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
>
> - 本模块接口均为系统接口,三方应用不支持调用
> - 本模块接口为系统接口
## 导入模块
......@@ -23,8 +23,6 @@ injectEvent({KeyEvent: KeyEvent}): void
注入按键,KeyEvent为注入按键的描述信息。
此接口为系统接口。
**系统能力:** SystemCapability.MultimodalInput.Input.InputSimulator
**参数:**
......@@ -48,15 +46,13 @@ let res = inputEventClient.injectEvent({KeyEvent: keyEvent});
## KeyEvent
注入按键的描述信息
此接口为系统接口。
注入按键的描述信息。
**系统能力:** 以下各项对应的系统能力均为SystemCapability.MultimodalInput.Input.InputSimulator
**系统能力:** SystemCapability.MultimodalInput.Input.InputSimulator
| 参数 | 类型 | 必填 | 说明 |
| --------------- | ------- | ---- | --------- |
| isPressed | boolean | 是 | 按键是否按下 |
| keyCode | number | 是 | 按键键值 |
| keyDownDuration | number | 是 | 按键按下持续时间 |
| isIntercepted | boolean | 是 | 按键是否可以被拦截 |
| keyDownDuration | number | 是 | 按键按下持续时间 |
| isIntercepted | boolean | 是 | 按键是否可以被拦截 |
......@@ -2,10 +2,10 @@
InputMonitor模块提供了监听全局触摸事件的功能。
> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:**
> **说明:**
> - 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
>
> - 本模块接口均为系统接口,三方应用不支持调用
> - 本模块接口均为系统接口。
## 导入模块
......@@ -16,28 +16,21 @@ import inputMonitor from '@ohos.multimodalInput.inputMonitor';
```
## 权限
ohos.permission.INPUT_MONITORING
## inputMonitor.on
on(type: "touch", receiver: TouchEventReceiver): void
开始监听全局触屏事件。
此接口为系统接口。
**需要权限:** ohos.permission.INPUT_MONITORING
**系统能力:** SystemCapability.MultimodalInput.Input.InputMonitor
**参数:**
| 参数 | 类型 | 必填 | 说明 |
| -------- | ----------------------------------------- | ---- | ------------------------------- |
| type | string | 是 | 监听输入事件类型,取值“touch”。 |
| receiver | [TouchEventReceiver](#toucheventreceiver) | 是 | 触摸输入事件回调函数。 |
| 参数 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | ------------------- |
| type | string | 是 | 监听输入事件类型,取值“touch”。 |
| receiver | [TouchEventReceiver](#toucheventreceiver) | 是 | 触摸输入事件回调函数。 |
**示例:**
......@@ -53,18 +46,16 @@ on(type: "mouse", receiver: Callback&lt;MouseEvent&gt;): void
开始监听全局鼠标事件。
此接口为系统接口。
**需要权限:** ohos.permission.INPUT_MONITORING
**系统能力:** SystemCapability.MultimodalInput.Input.InputMonitor
**参数:**
| 参数 | 类型 | 必填 | 说明 |
| -------- | -------------------------- | ---- | ------------------------------- |
| type | string | 是 | 监听输入事件类型,取值“mouse”。 |
| receiver | Callback&lt;MouseEvent&gt; | 是 | 鼠标输入事件回调函数。 |
| 参数 | 类型 | 必填 | 说明 |
| -------- | -------------------------- | ---- | ------------------- |
| type | string | 是 | 监听输入事件类型,取值“mouse”。 |
| receiver | Callback&lt;MouseEvent&gt; | 是 | 鼠标输入事件回调函数。 |
**示例:**
......@@ -82,17 +73,15 @@ off(type: "touch", receiver?: TouchEventReceiver): void
停止监听全局触屏事件。
此接口为系统接口。
**需要权限:** ohos.permission.INPUT_MONITORING
**系统能力:** SystemCapability.MultimodalInput.Input.InputMonitor
**参数:**
| 参数 | 类型 | 必填 | 说明 |
| -------- | ----------------------------------------- | ---- | ------------------------------- |
| type | string | 是 | 监听输入事件类型,取值“touch”。 |
| receiver | [TouchEventReceiver](#toucheventreceiver) | 否 | 触摸输入事件回调函数。 |
| 参数 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | ------------------- |
| type | string | 是 | 监听输入事件类型,取值“touch”。 |
| receiver | [TouchEventReceiver](#toucheventreceiver) | 否 | 触摸输入事件回调函数。 |
**示例:**
......@@ -104,18 +93,16 @@ off(type: "mouse", receiver?: Callback&lt;MouseEvent&gt;): void
停止监听全局鼠标事件。
此接口为系统接口。
**需要权限:** ohos.permission.INPUT_MONITORING
**系统能力:** SystemCapability.MultimodalInput.Input.InputMonitor
**参数:**
| 参数 | 类型 | 必填 | 说明 |
| -------- | -------------------------- | ---- | ------------------------------- |
| type | string | 是 | 监听输入事件类型,取值“mouse”。 |
| receiver | Callback&lt;MouseEvent&gt; | 否 | 鼠标输入事件回调函数。 |
| 参数 | 类型 | 必填 | 说明 |
| -------- | -------------------------- | ---- | ------------------- |
| type | string | 是 | 监听输入事件类型,取值“mouse”。 |
| receiver | Callback&lt;MouseEvent&gt; | 否 | 鼠标输入事件回调函数。 |
**示例:**
......@@ -129,7 +116,7 @@ inputMonitor.off("mouse");
触摸输入事件的回调函数。如果返回true,则触摸输入被监听器消耗,系统将执行关闭动作。
此接口为系统接口。
**需要权限:** ohos.permission.INPUT_MONITORING
**系统能力:** SystemCapability.MultimodalInput.Input.InputMonitor
......@@ -139,8 +126,8 @@ inputMonitor.off("mouse");
| touchEvent | [TouchEvent](../arkui-js/js-components-common-events.md) | 是 | 触摸输入事件回调函数,返回true表示输触事件被监听器消费,false表示输触事件未被监听器消费。 |
**返回值:**
| 类型 | 说明 |
| ------- | -------------------------------------- |
| 类型 | 说明 |
| ------- | ---------------------------------------- |
| Boolean | 返回true表示触摸输入事件被监听器消费,false表示触摸输入事件未被监听器消费。 |
**示例:**
......
......@@ -3,7 +3,7 @@
本模块提供提供基础的应用国际化能力,包括时间日期格式化、数字格式化、排序等,相关接口在ECMA 402标准中定义。
[I18N模块](js-apis-i18n.md)提供其他非ECMA 402定义的国际化接口,与本模块共同使用可提供完整地国际化支持能力。
> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:**
> **说明:**
> - 本模块首批接口从API version 6开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
>
> - Intl模块包含国际化能力基础接口(在ECMA 402中定义),包括时间日期格式化、数字格式化、排序等,国际化增强能力请参考[I18N模块](js-apis-i18n.md)。
......@@ -11,7 +11,7 @@
## 导入模块
```
```js
import Intl from '@ohos.intl';
```
......@@ -46,7 +46,7 @@ constructor()
**系统能力**:SystemCapability.Global.I18n
**示例:**
```
```js
var locale = new Intl.Locale();
```
......@@ -66,7 +66,7 @@ constructor(locale: string, options?: LocaleOptions)
| options | LocaleOptions | 否 | 用于创建区域对象的选项。 |
**示例:**
```
```js
var locale = new Intl.Locale("zh-CN");
```
......@@ -85,7 +85,7 @@ toString(): string
| string | 字符串形式的区域信息。 |
**示例:**
```
```js
var locale = new Intl.Locale("zh-CN");
locale.toString();
```
......@@ -105,7 +105,7 @@ maximize(): Locale
| [Locale](#locale) | 最大化后的区域对象。 |
**示例:**
```
```js
var locale = new Intl.Locale("zh-CN");
locale.maximize();
```
......@@ -125,7 +125,7 @@ minimize(): Locale
| [Locale](#locale) | 最小化后的区域对象。 |
**示例:**
```
```js
var locale = new Intl.Locale("zh-CN");
locale.minimize();
```
......@@ -135,7 +135,7 @@ minimize(): Locale
表示区域初始化选项。
**系统能力**以下各项对应的系统能力均为SystemCapability.Global.I18n
**系统能力**:SystemCapability.Global.I18n
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| --------------- | ------- | ---- | ---- | ---------------------------------------- |
......@@ -159,7 +159,7 @@ constructor()
**系统能力**:SystemCapability.Global.I18n
**示例:**
```
```js
var datefmt= new Intl.DateTimeFormat();
```
......@@ -179,13 +179,13 @@ constructor(locale: string | Array&lt;string&gt;, options?: DateTimeOptions)
| options | [DateTimeOptions](#datetimeoptions) | 否 | 用于创建时间日期格式化的选项。 |
**示例:**
```
```js
var datefmt= new Intl.DateTimeFormat("zh-CN", { dateStyle: 'full', timeStyle: 'medium' });
```
**示例:**
```
```js
var datefmt= new Intl.DateTimeFormat(["ban", "zh"], { dateStyle: 'full', timeStyle: 'medium' });
```
......@@ -209,7 +209,7 @@ format(date: Date): string
| string | 格式化后的时间日期字符串 |
**示例:**
```
```js
var date = new Date(2021, 11, 17, 3, 24, 0);
var datefmt = new Intl.DateTimeFormat("en-GB");
datefmt.format(date);
......@@ -236,7 +236,7 @@ formatRange(startDate: Date, endDate: Date): string
| string | 格式化后的时间日期段字符串。 |
**示例:**
```
```js
var startDate = new Date(2021, 11, 17, 3, 24, 0);
var endDate = new Date(2021, 11, 18, 3, 24, 0);
var datefmt = new Intl.DateTimeFormat("en-GB");
......@@ -258,7 +258,7 @@ resolvedOptions(): DateTimeOptions
| [DateTimeOptions](#datetimeoptions) | DateTimeFormat&nbsp;对象的格式化选项。 |
**示例:**
```
```js
var datefmt = new Intl.DateTimeFormat("en-GB");
datefmt.resolvedOptions();
```
......@@ -268,7 +268,7 @@ resolvedOptions(): DateTimeOptions
表示时间日期格式化选项。
**系统能力**以下各项对应的系统能力均为SystemCapability.Global.I18n
**系统能力**:SystemCapability.Global.I18n
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| --------------- | ------- | ---- | ---- | ---------------------------------------- |
......@@ -305,7 +305,7 @@ constructor()
**系统能力**:SystemCapability.Global.I18n
**示例:**
```
```js
var numfmt = new Intl.NumberFormat();
```
......@@ -325,7 +325,7 @@ constructor(locale: string | Array&lt;string&gt;, options?: NumberOptions)
| options | [NumberOptions](#numberoptions) | 否 | 用于创建数字格式化的选项。 |
**示例:**
```
```js
var numfmt = new Intl.NumberFormat("en-GB", {style:'decimal', notation:"scientific"});
```
......@@ -350,7 +350,7 @@ format(number: number): string;
**示例:**
```
```js
var numfmt = new Intl.NumberFormat(["en-GB", "zh"], {style:'decimal', notation:"scientific"});
numfmt.format(1223);
```
......@@ -371,7 +371,7 @@ resolvedOptions(): NumberOptions
**示例:**
```
```js
var numfmt = new Intl.NumberFormat(["en-GB", "zh"], {style:'decimal', notation:"scientific"});
numfmt.resolvedOptions();
```
......@@ -391,7 +391,7 @@ resolvedOptions(): NumberOptions
| currencyDisplay | string | 是 | 是 | 货币的显示方式,取值包括:"symbol",&nbsp;"narrowSymbol",&nbsp;"code",&nbsp;"name"。 |
| unit | string | 是 | 是 | 单位名称,如:"meter","inch",“hectare”等。 |
| unitDisplay | string | 是 | 是 | 单位的显示格式,取值包括:"long",&nbsp;"short",&nbsp;"narrow"。 |
| unitUsage<sup>8+</sup> | string | 是 | 是 | 单位的使用场景,取值包括:"default",&nbsp;"area-land-agricult",&nbsp;"area-land-commercl",&nbsp;"area-land-residntl",&nbsp;"length-person",&nbsp;"length-person-small",&nbsp;"length-rainfall",&nbsp;"length-road",&nbsp;"length-road-small",&nbsp;"length-snowfall",&nbsp;"length-vehicle",&nbsp;"length-visiblty",&nbsp;"length-visiblty-small",&nbsp;"length-person-informal",&nbsp;"length-person-small-informal",&nbsp;"length-road-informal",&nbsp;"speed-road-travel",&nbsp;"speed-wind",&nbsp;"temperature-person",&nbsp;"temperature-weather",&nbsp;"volume-vehicle-fuel"。 |
| unitUsage<sup>8+</sup> | string | 是 | 是 | 单位的使用场景,取值包括:"default",&nbsp;"area-land-agricult",&nbsp;"area-land-commercl",&nbsp;"area-land-residntl",&nbsp;"length-person",&nbsp;"length-person-small",&nbsp;"length-rainfall",&nbsp;"length-road",&nbsp;"length-road-small",&nbsp;"length-snowfall",&nbsp;"length-vehicle",&nbsp;"length-visiblty",&nbsp;"length-visiblty-small",&nbsp;"length-person-informal",&nbsp;"length-person-small-informal",&nbsp;"length-road-informal",&nbsp;"speed-road-travel",&nbsp;"speed-wind",&nbsp;"temperature-person",&nbsp;"temperature-weather",&nbsp;"volume-vehicle-fuel"。 |
| signDisplay | string | 是 | 是 | 数字符号的显示格式,取值包括:"auto",&nbsp;"never",&nbsp;"always",&nbsp;"expectZero"。 |
| compactDisplay | string | 是 | 是 | 紧凑型的显示格式,取值包括:"long",&nbsp;"short"。 |
| notation | string | 是 | 是 | 数字的格式化规格,取值包括:"standard",&nbsp;"scientific",&nbsp;"engineering",&nbsp;"compact"。 |
......@@ -418,7 +418,7 @@ constructor()
**系统能力**:SystemCapability.Global.I18n
**示例:**
```
```js
var collator = new Intl.Collator();
```
......@@ -439,7 +439,7 @@ constructor(locale: string | Array&lt;string&gt;, options?: CollatorOptions)
| options | [CollatorOptions](#collatoroptions) | 否 | 用于创建排序对象的选项。 |
**示例:**
```
```js
var collator = new Intl.Collator("zh-CN", {localeMatcher: "lookup", usage: "sort"});
```
......@@ -464,7 +464,7 @@ compare(first: string, second: string): number
| number | 比较结果。当number为负数,表示first排序在second之前;当number为0,表示first与second排序相同;当number为正数,表示first排序在second之后。 |
**示例:**
```
```js
var collator = new Intl.Collator("zh-Hans");
collator.compare("first", "second");
```
......@@ -484,17 +484,17 @@ resolvedOptions(): CollatorOptions
| [CollatorOptions](#collatoroptions) | 返回的Collator对象的属性。 |
**示例:**
```
```js
var collator = new Intl.Collator("zh-Hans");
var options = collator.resolvedOptions();
```
## CollatorOptions<sup>8+</sup><a name=collatoroptions></a>
## CollatorOptions<sup>8+</sup>
表示Collator可设置的属性。
**系统能力**以下各项对应的系统能力均为SystemCapability.Global.I18n
**系统能力**:SystemCapability.Global.I18n
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| ----------------- | ------- | ---- | ---- | ---------------------------------------- |
......@@ -519,7 +519,7 @@ constructor()
**系统能力**:SystemCapability.Global.I18n
**示例:**
```
```js
var pluralRules = new Intl.PluralRules();
```
......@@ -539,7 +539,7 @@ constructor(locale: string | Array&lt;string&gt;, options?: PluralRulesOptions)
| options | [PluralRulesOptions](#pluralrulesoptions) | 否 | 用于创建单复数对象的选项。 |
**示例:**
```
```js
var pluralRules= new Intl.PluraRules("zh-CN", {"localeMatcher": "lookup", "type": "cardinal"});
```
......@@ -563,17 +563,17 @@ select(n: number): string
| string | 单复数类别,取值包括:"zero","one","two",&nbsp;"few",&nbsp;"many",&nbsp;"others"。 |
**示例:**
```
```js
var pluralRules = new Intl.PluralRules("zh-Hans");
pluralRules.select(1);
```
## PluralRulesOptions<sup>8+</sup><a name=pluralrulesoptions></a>
## PluralRulesOptions<sup>8+</sup>
表示PluralRules对象可设置的属性。
**系统能力**以下各项对应的系统能力均为SystemCapability.Global.I18n
**系统能力**:SystemCapability.Global.I18n
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| ------------------------ | ------ | ---- | ---- | ---------------------------------------- |
......@@ -598,7 +598,7 @@ constructor()
**系统能力**:SystemCapability.Global.I18n
**示例:**
```
```js
var relativetimefmt = new Intl.RelativeTimeFormat();
```
......@@ -618,7 +618,7 @@ constructor(locale: string | Array&lt;string&gt;, options?: RelativeTimeFormatIn
| options | [RelativeTimeFormatInputOptions](#relativetimeformatinputoptions) | 否 | 用于创建相对时间格式化对象的选项。 |
**示例:**
```
```js
var relativeTimeFormat = new Intl.RelativeTimeFormat("zh-CN", {"localeMatcher": "lookup", "numeric": "always", "style": "long"});
```
......@@ -643,7 +643,7 @@ format(value: number, unit: string): string
| string | 格式化后的相对时间。 |
**示例:**
```
```js
var relativetimefmt = new Intl.RelativeTimeFormat("zh-CN");
relativetimefmt.format(3, "quarter")
```
......@@ -669,7 +669,7 @@ formatToParts(value: number, unit: string): Array&lt;object&gt;
| Array&lt;object&gt; | 返回可用于自定义区域设置格式的相对时间格式的对象数组。 |
**示例:**
```
```js
var relativetimefmt = new Intl.RelativeTimeFormat("en", {"numeric": "auto"});
var parts = relativetimefmt.format(10, "seconds");
```
......@@ -689,17 +689,17 @@ resolvedOptions(): RelativeTimeFormatResolvedOptions
| [RelativeTimeFormatResolvedOptions](#relativetimeformatresolvedoptions) | RelativeTimeFormat&nbsp;对象的格式化选项。 |
**示例:**
```
```js
var relativetimefmt= new Intl.RelativeTimeFormat("en-GB");
relativetimefmt.resolvedOptions();
```
## RelativeTimeFormatInputOptions<sup>8+</sup><a name=relativetimeformatinputoptions></a>
## RelativeTimeFormatInputOptions<sup>8+</sup>
表示RelativeTimeFormat对象可设置的属性。
**系统能力**以下各项对应的系统能力均为SystemCapability.Global.I18n
**系统能力**:SystemCapability.Global.I18n
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| ------------- | ------ | ---- | ---- | ---------------------------------------- |
......@@ -708,11 +708,11 @@ resolvedOptions(): RelativeTimeFormatResolvedOptions
| style | string | 是 | 是 | 国际化消息的长度,取值包括:"long",&nbsp;"short",&nbsp;"narrow"。 |
## RelativeTimeFormatResolvedOptions<sup>8+</sup><a name=relativetimeformatresolvedoptions></a>
## RelativeTimeFormatResolvedOptions<sup>8+</sup>
表示RelativeTimeFormat对象可设置的属性。
**系统能力**以下各项对应的系统能力均为SystemCapability.Global.I18n
**系统能力**:SystemCapability.Global.I18n
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| --------------- | ------ | ---- | ---- | ---------------------------------------- |
......
......@@ -2,7 +2,8 @@
KeyEvent模块提供了设备可以上报的按键事件。
> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:**
> **说明:**
>
> 本模块首批接口从API version 9开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
## 导入模块
......@@ -13,39 +14,39 @@ import {Action,Key,KeyEvent} from '@ohos.multimodalInput.keyEvent';
## Action
**系统能力**以下各项对应的系统能力均为SystemCapability.MultimodalInput.Input.Core
**系统能力**:SystemCapability.MultimodalInput.Input.Core
| 名称 | 参数类型 | 可读 | 可写 | 描述 |
| -------- | -------- | -------- | -------- | -------- |
| CANCEL | number | 是 | 否 | 取消 |
| DOWN | number | 是 | 否 | 按下按钮 |
| UP | number | 是 | 否 | 抬起按钮 |
| 名称 | 参数类型 | 可读 | 可写 | 描述 |
| ------ | ------ | ---- | ---- | ---- |
| CANCEL | number | 是 | 否 | 取消 |
| DOWN | number | 是 | 否 | 按下按钮 |
| UP | number | 是 | 否 | 抬起按钮 |
## Key
**系统能力**以下各项对应的系统能力均为SystemCapability.MultimodalInput.Input.Core
**系统能力**:SystemCapability.MultimodalInput.Input.Core
| 名称 | 参数类型 | 可读 | 可写 | 描述 |
| -------- | -------- | -------- | -------- | -------- |
| code | KeyCode | 是 | 否 | 按键码 |
| pressedTime | number | 是 | 否 | 按下时间 |
| deviceId | number | 是 | 否 | 按键所属设备 |
| 名称 | 参数类型 | 可读 | 可写 | 描述 |
| ----------- | ------- | ---- | ---- | ------ |
| code | KeyCode | 是 | 否 | 按键码 |
| pressedTime | number | 是 | 否 | 按下时间 |
| deviceId | number | 是 | 否 | 按键所属设备 |
## KeyEvent
**系统能力**:以下各项对应的系统能力均为SystemCapability.MultimodalInput.Input.Core
| 名称 | 参数类型 | 可读 | 可写 | 描述 |
| -------- | -------- | -------- | -------- | -------- |
| action | Action | 是 | 否 | 按键动作 |
| key | Key | 是 | 否 | 当前发生变化的按键 |
| unicodeChar | number | 是 | 否 | 按键对应的uniCode字符 |
| keys | Key[] | 是 | 否 | 当前处于按下状态的按键列表 |
| ctrlKey | boolean | 是 | 否 | 当前ctrlKey是否处于按下状态 |
| altKey | boolean | 是 | 否 | 当前altKey是否处于按下状态 |
| shiftKey | boolean | 是 | 否 | 当前shiftKey是否处于按下状态 |
| logoKey | boolean | 是 | 否 | 当前logoKey是否处于按下状态 |
| fnKey | boolean | 是 | 否 | 当前fnKey是否处于按下状态 |
| capsLock | boolean | 是 | 否 | 当前capsLock是否处于激活状态 |
| numLock | boolean | 是 | 否 | 当前numLock是否处于激活状态 |
| scrollLock | boolean | 是 | 否 | 当前scrollLock是否处于激活状态 |
\ No newline at end of file
**系统能力**:SystemCapability.MultimodalInput.Input.Core
| 名称 | 参数类型 | 可读 | 可写 | 描述 |
| ----------- | ------- | ---- | ---- | -------------------- |
| action | Action | 是 | 否 | 按键动作 |
| key | Key | 是 | 否 | 当前发生变化的按键 |
| unicodeChar | number | 是 | 否 | 按键对应的uniCode字符 |
| keys | Key[] | 是 | 否 | 当前处于按下状态的按键列表 |
| ctrlKey | boolean | 是 | 否 | 当前ctrlKey是否处于按下状态 |
| altKey | boolean | 是 | 否 | 当前altKey是否处于按下状态 |
| shiftKey | boolean | 是 | 否 | 当前shiftKey是否处于按下状态 |
| logoKey | boolean | 是 | 否 | 当前logoKey是否处于按下状态 |
| fnKey | boolean | 是 | 否 | 当前fnKey是否处于按下状态 |
| capsLock | boolean | 是 | 否 | 当前capsLock是否处于激活状态 |
| numLock | boolean | 是 | 否 | 当前numLock是否处于激活状态 |
| scrollLock | boolean | 是 | 否 | 当前scrollLock是否处于激活状态 |
\ No newline at end of file
......@@ -3,6 +3,7 @@
提供根据不同媒体类型定义不同的样式。
> **说明:**
>
> 从API Version 7开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。
......@@ -118,7 +119,7 @@ off(type: 'change', callback?: Callback&lt;MediaQueryResult&gt;): void
### 示例
```js
```ts
import mediaquery from '@ohos.mediaquery'
let portraitFunc = null
......
......@@ -2,7 +2,7 @@
设备上报的鼠标事件。
> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:**
> **说明:**
> 本模块首批接口从API version 9开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
## 导入模块
......@@ -13,77 +13,77 @@ import {Action,Button,Axis,AxisValue,MouseEvent} from '@ohos.multimodalInput.mou
## Action
**系统能力**以下各项对应的系统能力均为SystemCapability.MultimodalInput.Input.Core
**系统能力**:SystemCapability.MultimodalInput.Input.Core
| 名称 | 参数类型 | 可读 | 可写 | 描述 |
| -------- | -------- | -------- | -------- | -------- |
| CANCEL | number | 是 | 否 | 取消 |
| MOVE | number | 是 | 否 | 鼠标移动 |
| BUTTON_DOWN | number | 是 | 否 | 鼠标按钮按下 |
| BUTTON_UP | number | 是 | 否 | 鼠标按钮抬起 |
| AXIS_BEGIN | number | 是 | 否 | 鼠标关联的轴事件开始 |
| AXIS_UPDATE | number | 是 | 否 | 鼠标关联的轴事件更新 |
| AXIS_END | number | 是 | 否 | 鼠标关联的轴事件结束 |
| 名称 | 参数类型 | 可读 | 可写 | 描述 |
| ----------- | ------ | ---- | ---- | ---------- |
| CANCEL | number | 是 | 否 | 取消 |
| MOVE | number | 是 | 否 | 鼠标移动 |
| BUTTON_DOWN | number | 是 | 否 | 鼠标按钮按下 |
| BUTTON_UP | number | 是 | 否 | 鼠标按钮抬起 |
| AXIS_BEGIN | number | 是 | 否 | 鼠标关联的轴事件开始 |
| AXIS_UPDATE | number | 是 | 否 | 鼠标关联的轴事件更新 |
| AXIS_END | number | 是 | 否 | 鼠标关联的轴事件结束 |
## Button
**系统能力**以下各项对应的系统能力均为SystemCapability.MultimodalInput.Input.Core
**系统能力**:SystemCapability.MultimodalInput.Input.Core
| 名称 | 参数类型 | 可读 | 可写 | 描述 |
| -------- | -------- | -------- | -------- | -------- |
| LEFT | number | 是 | 否 | 鼠标左键 |
| MIDDLE | number | 是 | 否 | 鼠标中键 |
| RIGHT | number | 是 | 否 | 鼠标右键 |
| SIDE | number | 是 | 否 | 鼠标侧边键 |
| EXTRA | number | 是 | 否 | 鼠标扩展键 |
| FORWARD | number | 是 | 否 | 鼠标前进键 |
| BACK | number | 是 | 否 | 鼠标后退键 |
| TASK | number | 是 | 否 | 鼠标任务键 |
| 名称 | 参数类型 | 可读 | 可写 | 描述 |
| ------- | ------ | ---- | ---- | ----- |
| LEFT | number | 是 | 否 | 鼠标左键 |
| MIDDLE | number | 是 | 否 | 鼠标中键 |
| RIGHT | number | 是 | 否 | 鼠标右键 |
| SIDE | number | 是 | 否 | 鼠标侧边键 |
| EXTRA | number | 是 | 否 | 鼠标扩展键 |
| FORWARD | number | 是 | 否 | 鼠标前进键 |
| BACK | number | 是 | 否 | 鼠标后退键 |
| TASK | number | 是 | 否 | 鼠标任务键 |
## Axis
**系统能力**以下各项对应的系统能力均为SystemCapability.MultimodalInput.Input.Core
**系统能力**:SystemCapability.MultimodalInput.Input.Core
| 名称 | 参数类型 | 可读 | 可写 | 描述 |
| -------- | -------- | -------- | -------- | -------- |
| SCROLL_VERTICAL | number | 是 | 否 | 垂直滚动轴 |
| SCROLL_HORIZONTAL | number | 是 | 否 | 水平滚动轴 |
| PINCH | number | 是 | 否 | 捏合轴 |
| 名称 | 参数类型 | 可读 | 可写 | 描述 |
| ----------------- | ------ | ---- | ---- | ----- |
| SCROLL_VERTICAL | number | 是 | 否 | 垂直滚动轴 |
| SCROLL_HORIZONTAL | number | 是 | 否 | 水平滚动轴 |
| PINCH | number | 是 | 否 | 捏合轴 |
## AxisValue
**系统能力**以下各项对应的系统能力均为SystemCapability.MultimodalInput.Input.Core
**系统能力**:SystemCapability.MultimodalInput.Input.Core
| 名称 | 参数类型 | 可读 | 可写 | 描述 |
| -------- | -------- | -------- | -------- | -------- |
| axis | Axis | 是 | 否 | 轴类型 |
| value | number | 是 | 否 | 轴的值 |
| 名称 | 参数类型 | 可读 | 可写 | 描述 |
| ----- | ------ | ---- | ---- | ---- |
| axis | Axis | 是 | 否 | 轴类型 |
| value | number | 是 | 否 | 轴的值 |
## MouseEvent
**系统能力**以下各项对应的系统能力均为SystemCapability.MultimodalInput.Input.Core
| 名称 | 参数类型 | 可读 | 可写 | 描述 |
| -------- | -------- | -------- | -------- | -------- |
| action | Action | 是 | 否 | 鼠标事件动作 |
| screenX | number | 是 | 否 | 鼠标光标在屏幕中的x坐标 |
| screenY | number | 是 | 否 | 鼠标光标在屏幕中的y坐标 |
| windowX | number | 是 | 否 | 鼠标归属窗口的x坐标 |
| windowY | number | 是 | 否 | 鼠标归属窗口的y坐标 |
| rawDeltaX | number | 是 | 否 | X轴相对上次上报鼠标位置的偏移,在屏幕边缘位置时,该值可能小于两次鼠标上报的坐标差 |
| rawDeltaY | number | 是 | 否 | Y轴相对上次上报鼠标位置的偏移 |
| button | Button | 是 | 否 | 当前按下/抬起的按钮 |
| pressedButtons | Button[] | 是 | 否 | 当前处于按下状态的按钮 |
| axes | AxisValue[] | 是 | 否 | 事件包含的所有轴数据 |
| pressedKeys | KeyCode[] | 是 | 否 | 当前处于按下状态的按键列表 |
| ctrlKey | boolean | 是 | 否 | 当前ctrlKey是否处于按下状态 |
| altKey | boolean | 是 | 否 | 当前altKey是否处于按下状态 |
| shiftKey | boolean | 是 | 否 | 当前shiftKey是否处于按下状态 |
| logoKey | boolean | 是 | 否 | 当前logoKey是否处于按下状态 |
| fnKey | boolean | 是 | 否 | 当前fnKey是否处于按下状态 |
| capsLock | boolean | 是 | 否 | 当前capsLock是否处于激活状态 |
| numLock | boolean | 是 | 否 | 当前numLock是否处于激活状态 |
| scrollLock | boolean | 是 | 否 | 当前scrollLock是否处于激活状态 |
**系统能力**:SystemCapability.MultimodalInput.Input.Core
| 名称 | 参数类型 | 可读 | 可写 | 描述 |
| -------------- | ----------- | ---- | ---- | ---------------------------------------- |
| action | Action | 是 | 否 | 鼠标事件动作 |
| screenX | number | 是 | 否 | 鼠标光标在屏幕中的x坐标 |
| screenY | number | 是 | 否 | 鼠标光标在屏幕中的y坐标 |
| windowX | number | 是 | 否 | 鼠标归属窗口的x坐标 |
| windowY | number | 是 | 否 | 鼠标归属窗口的y坐标 |
| rawDeltaX | number | 是 | 否 | X轴相对上次上报鼠标位置的偏移,在屏幕边缘位置时,该值可能小于两次鼠标上报的坐标差 |
| rawDeltaY | number | 是 | 否 | Y轴相对上次上报鼠标位置的偏移 |
| button | Button | 是 | 否 | 当前按下/抬起的按钮 |
| pressedButtons | Button[] | 是 | 否 | 当前处于按下状态的按钮 |
| axes | AxisValue[] | 是 | 否 | 事件包含的所有轴数据 |
| pressedKeys | KeyCode[] | 是 | 否 | 当前处于按下状态的按键列表 |
| ctrlKey | boolean | 是 | 否 | 当前ctrlKey是否处于按下状态 |
| altKey | boolean | 是 | 否 | 当前altKey是否处于按下状态 |
| shiftKey | boolean | 是 | 否 | 当前shiftKey是否处于按下状态 |
| logoKey | boolean | 是 | 否 | 当前logoKey是否处于按下状态 |
| fnKey | boolean | 是 | 否 | 当前fnKey是否处于按下状态 |
| capsLock | boolean | 是 | 否 | 当前capsLock是否处于激活状态 |
| numLock | boolean | 是 | 否 | 当前numLock是否处于激活状态 |
| scrollLock | boolean | 是 | 否 | 当前scrollLock是否处于激活状态 |
......@@ -2,7 +2,8 @@
设备上报的触屏事件。
> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:**
> **说明:**
>
> 本模块首批接口从API version 9开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
## 导入模块
......@@ -13,72 +14,72 @@ import {Action,ToolType,SourceType,Touch,TouchEvent} from '@ohos.multimodalInput
## Action
**系统能力**以下各项对应的系统能力均为SystemCapability.MultimodalInput.Input.Core
**系统能力**:SystemCapability.MultimodalInput.Input.Core
| 名称 | 参数类型 | 可读 | 可写 | 描述 |
| -------- | -------- | -------- | -------- | -------- |
| CANCEL | number | 是 | 否 | 触摸取消 |
| DOWN | number | 是 | 否 | 触摸按下 |
| MOVE | number | 是 | 否 | 触摸移动 |
| UP | number | 是 | 否 | 触摸抬起 |
| 名称 | 参数类型 | 可读 | 可写 | 描述 |
| ------ | ------ | ---- | ---- | ---- |
| CANCEL | number | 是 | 否 | 触摸取消 |
| DOWN | number | 是 | 否 | 触摸按下 |
| MOVE | number | 是 | 否 | 触摸移动 |
| UP | number | 是 | 否 | 触摸抬起 |
## ToolType
**系统能力**以下各项对应的系统能力均为SystemCapability.MultimodalInput.Input.Core
**系统能力**:SystemCapability.MultimodalInput.Input.Core
| 名称 | 参数类型 | 可读 | 可写 | 描述 |
| -------- | -------- | -------- | -------- | -------- |
| FINGER | number | 是 | 否 | 手指 |
| PEN | number | 是 | 否 | 笔 |
| RUBBER | number | 是 | 否 | 橡皮擦 |
| BRUSH | number | 是 | 否 | 笔刷 |
| PENCIL | number | 是 | 否 | 铅笔 |
| AIRBRUSH | number | 是 | 否 | 气笔 |
| MOUSE | number | 是 | 否 | 鼠标 |
| LENS | number | 是 | 否 | 透镜 |
| 名称 | 参数类型 | 可读 | 可写 | 描述 |
| -------- | ------ | ---- | ---- | ---- |
| FINGER | number | 是 | 否 | 手指 |
| PEN | number | 是 | 否 | 笔 |
| RUBBER | number | 是 | 否 | 橡皮擦 |
| BRUSH | number | 是 | 否 | 笔刷 |
| PENCIL | number | 是 | 否 | 铅笔 |
| AIRBRUSH | number | 是 | 否 | 气笔 |
| MOUSE | number | 是 | 否 | 鼠标 |
| LENS | number | 是 | 否 | 透镜 |
## SourceType
**系统能力**以下各项对应的系统能力均为SystemCapability.MultimodalInput.Input.Core
**系统能力**:SystemCapability.MultimodalInput.Input.Core
| 名称 | 参数类型 | 可读 | 可写 | 描述 |
| -------- | -------- | -------- | -------- | -------- |
| TOUCH_SCREEN | number | 是 | 否 | 触摸屏 |
| PEN | number | 是 | 否 | 手写笔 |
| TOUCH_PAD | number | 是 | 否 | 触摸板 |
| 名称 | 参数类型 | 可读 | 可写 | 描述 |
| ------------ | ------ | ---- | ---- | ---- |
| TOUCH_SCREEN | number | 是 | 否 | 触摸屏 |
| PEN | number | 是 | 否 | 手写笔 |
| TOUCH_PAD | number | 是 | 否 | 触摸板 |
## Touch
**系统能力**以下各项对应的系统能力均为SystemCapability.MultimodalInput.Input.Core
| 名称 | 参数类型 | 可读 | 可写 | 描述 |
| -------- | -------- | -------- | -------- | -------- |
| id | number | 是 | 否 | 指针标识 |
| pressedTime | number | 是 | 否 | 按下时的时间戳 |
| screenX | number | 是 | 否 | 触摸位置所属的屏幕x坐标 |
| screenY | number | 是 | 否 | 触摸位置所属的屏幕y坐标 |
| windowX | number | 是 | 否 | 触摸位置在窗口中的x坐标 |
| windowY | number | 是 | 否 | 触摸位置在窗口中的y坐标 |
| pressure | number | 是 | 否 | 压力值,取值范围是[0.0, 1.0], 0.0表示不支持 |
| width | number | 是 | 否 | 按下接触区域的宽度 |
| height | number | 是 | 否 | 按下接触区域的高度 |
| tiltX | number | 是 | 否 | 相对YZ平面的角度,取值的范围[-90, 90],其中正值是向右倾斜。 |
| tiltY | number | 是 | 否 | 相对XZ平面的角度,值的范围[-90, 90],其中正值是向下倾斜。 |
| toolX | number | 是 | 否 | 工具区域的中心点X |
| toolY | number | 是 | 否 | 工具区域的中心点Y |
| toolWidth | number | 是 | 否 | 工具区域宽度 |
| toolHeight | number | 是 | 否 | 工具区域高度 |
| rawX | number | 是 | 否 | 输入设备上的x坐标 |
| rawY | number | 是 | 否 | 输入设备上的y坐标 |
| toolType | number | 是 | 否 | 工具类型 |
**系统能力**:SystemCapability.MultimodalInput.Input.Core
| 名称 | 参数类型 | 可读 | 可写 | 描述 |
| ----------- | ------ | ---- | ---- | ----------------------------------- |
| id | number | 是 | 否 | 指针标识 |
| pressedTime | number | 是 | 否 | 按下时的时间戳 |
| screenX | number | 是 | 否 | 触摸位置所属的屏幕x坐标 |
| screenY | number | 是 | 否 | 触摸位置所属的屏幕y坐标 |
| windowX | number | 是 | 否 | 触摸位置在窗口中的x坐标 |
| windowY | number | 是 | 否 | 触摸位置在窗口中的y坐标 |
| pressure | number | 是 | 否 | 压力值,取值范围是[0.0, 1.0], 0.0表示不支持 |
| width | number | 是 | 否 | 按下接触区域的宽度 |
| height | number | 是 | 否 | 按下接触区域的高度 |
| tiltX | number | 是 | 否 | 相对YZ平面的角度,取值的范围[-90, 90],其中正值是向右倾斜。 |
| tiltY | number | 是 | 否 | 相对XZ平面的角度,值的范围[-90, 90],其中正值是向下倾斜。 |
| toolX | number | 是 | 否 | 工具区域的中心点X |
| toolY | number | 是 | 否 | 工具区域的中心点Y |
| toolWidth | number | 是 | 否 | 工具区域宽度 |
| toolHeight | number | 是 | 否 | 工具区域高度 |
| rawX | number | 是 | 否 | 输入设备上的x坐标 |
| rawY | number | 是 | 否 | 输入设备上的y坐标 |
| toolType | number | 是 | 否 | 工具类型 |
## TouchEvent
**系统能力**以下各项对应的系统能力均为SystemCapability.MultimodalInput.Input.Core
**系统能力**:SystemCapability.MultimodalInput.Input.Core
| 名称 | 参数类型 | 可读 | 可写 | 描述 |
| -------- | -------- | -------- | -------- | -------- |
| action | Action | 是 | 否 | 触摸动作 |
| touch | Touch | 是 | 否 | 当前触摸点 |
| touches | Touch[] | 是 | 否 | 所有触摸点 |
| sourceType | SourceType | 是 | 否 | 触摸来源的设备类型 |
| 名称 | 参数类型 | 可读 | 可写 | 描述 |
| ---------- | ---------- | ---- | ---- | --------- |
| action | Action | 是 | 否 | 触摸动作 |
| touch | Touch | 是 | 否 | 当前触摸点 |
| touches | Touch[] | 是 | 否 | 所有触摸点 |
| sourceType | SourceType | 是 | 否 | 触摸来源的设备类型 |
......@@ -26,12 +26,12 @@
- 平台API通道:方舟开发框架提供了API扩展机制,平台能力通过此种机制进行封装,提供风格统一的JS接口。
- 两种开发范式:方舟开发框架针对不同目的和技术背景的开发者提供了两种开发范式,分别是基于JS扩展的类Web开发范式(简称“类Web开发范式”)和基于TS扩展的声明式开发范式(简称“声明式开发范式”)。
- 两种开发范式:方舟开发框架针对不同目的和技术背景的开发者提供了两种开发范式,分别是基于TS扩展的声明式开发范式(简称“声明式开发范式”)和基于JS扩展的类Web开发范式(简称“类Web开发范式”)。
| 开发范式名称 | 简介 | 适用场景 | 适用人群 |
| -------- | ---------------------------------------- | ---------------- | ------------------- |
| 类Web开发范式 | 采用经典的HML、CSS、JavaScript三段式开发方式。使用HML标签文件进行布局搭建,使用CSS文件进行样式描述,使用JavaScript文件进行逻辑处理。UI组件与数据之间通过单向数据绑定的方式建立关联,当数据发生变化时,UI界面自动触发更新。此种开发方式,更接近Web前端开发者的使用习惯,快速将已有的Web应用改造成方舟开发框架应用。 | 界面较为简单的中小型应用和卡片 | Web前端开发人员 |
| 声明式开发范式 | 采用TS语言并进行声明式UI语法扩展,从组件、动效和状态管理三个维度提供了UI绘制能力。UI开发更接近自然语义的编程方式,让开发者直观地描述UI界面,不必关心框架如何实现UI绘制和渲染,实现极简高效开发。同时,选用有类型标注的TS语言,引入编译期的类型校验。 | 复杂度较大、团队合作度较高的程序 | 移动系统应用开发人员、系统应用开发人员 |
| 类Web开发范式 | 采用经典的HML、CSS、JavaScript三段式开发方式。使用HML标签文件进行布局搭建,使用CSS文件进行样式描述,使用JavaScript文件进行逻辑处理。UI组件与数据之间通过单向数据绑定的方式建立关联,当数据发生变化时,UI界面自动触发更新。此种开发方式,更接近Web前端开发者的使用习惯,快速将已有的Web应用改造成方舟开发框架应用。 | 界面较为简单的中小型应用和卡片 | Web前端开发人员 |
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册