提交 53f136b4 编写于 作者: C chenyuyan

Merge branch 'master1' into onoff

Change-Id: Ia1e714d58128a1057bfa54c3d85e35b48ed49c0a
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
音频打断策略预设了两种焦点模式([InterruptMode](../reference/apis/js-apis-audio.md#interruptmode9)): 音频打断策略预设了两种焦点模式([InterruptMode](../reference/apis/js-apis-audio.md#interruptmode9)):
- 共享焦点模式(SHARED_MODE):由同一应用创建的多个音频流,共享一个音频焦点。这些音频流之间的并发规则由应用自主决定,音频打断策略不会介入。当其他应用创建的音频流与该应用的音频流并发播放时,才会触发音频打断策略的管控。 - 共享焦点模式(SHARE_MODE):由同一应用创建的多个音频流,共享一个音频焦点。这些音频流之间的并发规则由应用自主决定,音频打断策略不会介入。当其他应用创建的音频流与该应用的音频流并发播放时,才会触发音频打断策略的管控。
- 独立焦点模式(INDEPENDENT_MODE):应用创建的每一个音频流均会独立拥有一个音频焦点,当多个音频流并发播放时,会触发音频打断策略的管控。 - 独立焦点模式(INDEPENDENT_MODE):应用创建的每一个音频流均会独立拥有一个音频焦点,当多个音频流并发播放时,会触发音频打断策略的管控。
......
...@@ -308,4 +308,43 @@ export default class MyFormExtensionAbility extends FormExtensionAbility { ...@@ -308,4 +308,43 @@ export default class MyFormExtensionAbility extends FormExtensionAbility {
return wantParams; return wantParams;
} }
}; };
```
## onAcquireFormData<sup>10+</sup>
onAcquireFormData?(formId: string): { [key: string]: Object }
卡片提供方接收卡片请求自定义数据的通知接口。
**系统接口**: 此接口为系统接口。
**系统能力**:SystemCapability.Ability.Form
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| formId | string | 是 | 卡片标识。 |
**返回值:**
| 类型 | 说明 |
| ------------------------------------------------------------ | ----------------------------------------------------------- |
| {[key: string]: any} | 卡片的自定义数据,由开发者自行决定传入的键值对。 |
**示例:**
```ts
import FormExtensionAbility from '@ohos.app.form.FormExtensionAbility';
export default class MyFormExtensionAbility extends FormExtensionAbility {
onAcquireFormData(formId) {
console.log('FormExtensionAbility onAcquireFormData, formId: ${formId}');
let wantParams = {
'temperature': '20',
'time': '2022-8-8 09:59',
};
return wantParams;
}
};
``` ```
\ No newline at end of file
...@@ -1565,6 +1565,8 @@ formHost.off('formUninstall', callback); ...@@ -1565,6 +1565,8 @@ formHost.off('formUninstall', callback);
订阅卡片新增事件。使用callback异步回调,返回当前新增卡片的[RunningFormInfo](js-apis-app-form-formInfo.md) 订阅卡片新增事件。使用callback异步回调,返回当前新增卡片的[RunningFormInfo](js-apis-app-form-formInfo.md)
**需要权限**:ohos.permission.REQUIRE_FORM
**系统能力**:SystemCapability.Ability.Form **系统能力**:SystemCapability.Ability.Form
**参数:** **参数:**
...@@ -1602,6 +1604,8 @@ formHost.on('formAdd', callback, bundleName); ...@@ -1602,6 +1604,8 @@ formHost.on('formAdd', callback, bundleName);
取消订阅卡片新增事件。使用callback异步回调,返回当前新增卡片的[RunningFormInfo](js-apis-app-form-formInfo.md) 取消订阅卡片新增事件。使用callback异步回调,返回当前新增卡片的[RunningFormInfo](js-apis-app-form-formInfo.md)
**需要权限**:ohos.permission.REQUIRE_FORM
**系统能力**:SystemCapability.Ability.Form **系统能力**:SystemCapability.Ability.Form
**参数:** **参数:**
...@@ -1643,6 +1647,8 @@ formHost.off('formAdd', callback, bundleName); ...@@ -1643,6 +1647,8 @@ formHost.off('formAdd', callback, bundleName);
订阅卡片删除事件。使用callback异步回调,返回当前删除卡片的[RunningFormInfo](js-apis-app-form-formInfo.md) 订阅卡片删除事件。使用callback异步回调,返回当前删除卡片的[RunningFormInfo](js-apis-app-form-formInfo.md)
**需要权限**:ohos.permission.REQUIRE_FORM
**系统能力**:SystemCapability.Ability.Form **系统能力**:SystemCapability.Ability.Form
**参数:** **参数:**
...@@ -1680,6 +1686,8 @@ formHost.on('formRemove', callback, bundleName); ...@@ -1680,6 +1686,8 @@ formHost.on('formRemove', callback, bundleName);
取消订阅卡片删除事件。使用callback异步回调,返回当前删除卡片的[RunningFormInfo](js-apis-app-form-formInfo.md) 取消订阅卡片删除事件。使用callback异步回调,返回当前删除卡片的[RunningFormInfo](js-apis-app-form-formInfo.md)
**需要权限**:ohos.permission.REQUIRE_FORM
**系统能力**:SystemCapability.Ability.Form **系统能力**:SystemCapability.Ability.Form
**参数:** **参数:**
...@@ -2116,3 +2124,95 @@ try { ...@@ -2116,3 +2124,95 @@ try {
} }
``` ```
## acquireFormData<sup>10+</sup>
acquireFormData(formId: string, callback: AsyncCallback\<void>): void
请求卡片提供方数据。使用callback异步回调。
**需要权限**:ohos.permission.REQUIRE_FORM
**系统能力**:SystemCapability.Ability.Form
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ------ | ------ | ---- | ------- |
| formId | string | 是 | 卡片标识。 |
**错误码:**
以下错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 错误码ID | 错误信息 |
| -------- | -------- |
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16500100 | Failed to obtain the configuration information. |
| 16501000 | An internal functional error occurred. |
**示例:**
```ts
import formHost from '@ohos.app.form.formHost';
let formId = '12400633174999288';
try {
formHost.acquireFormData(formId, (error) => {
if (error) {
console.error(`error, code: ${error.code}, message: ${error.message}`);
}
});
} catch(error) {
console.error(`catch error, code: ${error.code}, message: ${error.message}`);
}
```
## acquireFormData<sup>10+</sup>
function acquireFormData(formId: string): Promise\<void\>;
请求卡片提供方数据。使用Promise异步回调。
**需要权限**:ohos.permission.REQUIRE_FORM
**系统能力**:SystemCapability.Ability.Form
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ----------- | --------------- | ---- | -------------------------------- |
| formId | string | 是 | 卡片标识。 |
**返回值:**
| 类型 | 说明 |
| ------------------- | ------------------------- |
| Promise&lt;void&gt; | 无返回结果的Promise对象。 |
**错误码:**
以下错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)
| 错误码ID | 错误信息 |
| -------- | -------- |
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16500100 | Failed to obtain the configuration information. |
| 16501000 | An internal functional error occurred. |
```ts
import formHost from '@ohos.app.form.formHost';
let formId = '12400633174999288';
try {
formHost.acquireFormData(formId).then(() => {
console.log('formHost acquireFormData success');
}).catch((error) => {
console.error(`error, code: ${error.code}, message: ${error.message}`);
});
} catch(error) {
console.error(`catch error, code: ${error.code}, message: ${error.message}`);
}
```
...@@ -102,6 +102,8 @@ import formInfo from '@ohos.app.form.formInfo'; ...@@ -102,6 +102,8 @@ import formInfo from '@ohos.app.form.formInfo';
| ABILITY_NAME_KEY | 'ohos.extra.param.key.ability_name' | ability名称。 | | ABILITY_NAME_KEY | 'ohos.extra.param.key.ability_name' | ability名称。 |
| DEVICE_ID_KEY | 'ohos.extra.param.key.device_id' | 设备标识。 | | DEVICE_ID_KEY | 'ohos.extra.param.key.device_id' | 设备标识。 |
| BUNDLE_NAME_KEY | 'ohos.extra.param.key.bundle_name' | 指示指定要获取的捆绑Bundle名称的键。 | | BUNDLE_NAME_KEY | 'ohos.extra.param.key.bundle_name' | 指示指定要获取的捆绑Bundle名称的键。 |
| LAUNCH_REASON_KEY<sup>10+</sup> | 'ohos.extra.param.key.form_launch_reason' | 卡片创建原因。 |
| PARAM_FORM_CUSTOMIZE_KEY<sup>10+</sup> | 'ohos.extra.param.key.form_customize' | 自定义数据。 |
## FormDimension ## FormDimension
...@@ -154,4 +156,14 @@ import formInfo from '@ohos.app.form.formInfo'; ...@@ -154,4 +156,14 @@ import formInfo from '@ohos.app.form.formInfo';
| moduleName | VisibilityType | 是 | 否 | 卡片所属模块的模块名称。 | | moduleName | VisibilityType | 是 | 否 | 卡片所属模块的模块名称。 |
| abilityName | string | 是 | 否 | 卡片所属的Ability名称。 | | abilityName | string | 是 | 否 | 卡片所属的Ability名称。 |
| formName | string | 是 | 否 | 卡片名称。 | | formName | string | 是 | 否 | 卡片名称。 |
| dimension | number | 是 | 否 | 卡片规格。具体可选规格参考[FormDimension](#formdimension) | | dimension | number | 是 | 否 | 卡片规格。具体可选规格参考[FormDimension](#formdimension) |
\ No newline at end of file ## LaunchReason<sup>10+</sup>
卡片创建原因枚举。
**系统能力**:SystemCapability.Ability.Form
| 名称 | 值 | 说明 |
| ----------- | ---- | ------------ |
| FORM_DEFAULT | 1 | 表示卡片创建原因为默认创建。 |
| FORM_SHARE | 2 | 表示卡片创建原因为共享创建。 |
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
该模块向云空间提供通知或更改端云服务状态的能力。 该模块向云空间提供通知或更改端云服务状态的能力。
> **说明:** > **说明:**
> 本模块首批接口从API version 10开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 > - 本模块首批接口从API version 10开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
> 本模块接口为系统接口,三方应用不支持调用。 > - 本模块接口为系统接口,三方应用不支持调用。
## 导入模块 ## 导入模块
......
# @ohos.file.picker (选择器) # @ohos.file.picker (选择器)
> **说明:** > **说明:**
> 该模块接口从API Version 9开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 >
> 该模块接口从API version 9开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。
选择器(Picker)是一个封装PhotoViewPicker、DocumentViewPicker、AudioViewPicker等系统应用选择与保存能力的模块。应用可以自行选择使用哪种picker实现文件选择和文件保存的功能。 选择器(Picker)是一个封装PhotoViewPicker、DocumentViewPicker、AudioViewPicker等系统应用选择与保存能力的模块。应用可以自行选择使用哪种picker实现文件选择和文件保存的功能。
......
...@@ -667,6 +667,8 @@ getUserStorageStats(callback: AsyncCallback&lt;StorageStats&gt;): void ...@@ -667,6 +667,8 @@ getUserStorageStats(callback: AsyncCallback&lt;StorageStats&gt;): void
}); });
``` ```
## storageStatistics.getUserStorageStats<sup>9+</sup>
getUserStorageStats(userId: number): Promise&lt;StorageStats&gt; getUserStorageStats(userId: number): Promise&lt;StorageStats&gt;
异步获取指定用户各类别存储空间大小(单位为Byte),以promise方式返回。 异步获取指定用户各类别存储空间大小(单位为Byte),以promise方式返回。
......
...@@ -234,7 +234,7 @@ postMessageEventExt(message: WebMessageExt): void ...@@ -234,7 +234,7 @@ postMessageEventExt(message: WebMessageExt): void
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| ------- | ------ | ---- | :------------- | | ------- | ------ | ---- | :------------- |
| message | [WebMessageExt](#webmessageext) | 是 | 要发送的消息。 | | message | [WebMessageExt](#webmessageext10) | 是 | 要发送的消息。 |
**错误码:** **错误码:**
...@@ -491,7 +491,7 @@ static setHttpDns(secureDnsMode:SecureDnsMode, secureDnsConfig:string): void ...@@ -491,7 +491,7 @@ static setHttpDns(secureDnsMode:SecureDnsMode, secureDnsConfig:string): void
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| ------------------ | ------- | ---- | ------------- | | ------------------ | ------- | ---- | ------------- |
| secureDnsMode | [SecureDnsMode](#securednsmode) | 是 | 使用HTTPDNS的模式。| | secureDnsMode | [SecureDnsMode](#securednsmode10) | 是 | 使用HTTPDNS的模式。|
| secureDnsConfig | string | 是 | HTTPDNS server的配置,必须是https协议并且只允许配置一个server。 | | secureDnsConfig | string | 是 | HTTPDNS server的配置,必须是https协议并且只允许配置一个server。 |
**示例:** **示例:**
...@@ -2137,24 +2137,24 @@ struct WebComponent { ...@@ -2137,24 +2137,24 @@ struct WebComponent {
this.ports = this.controller.createWebMessagePorts(); this.ports = this.controller.createWebMessagePorts();
// 2、在应用侧的消息端口(如端口1)上注册回调事件。 // 2、在应用侧的消息端口(如端口1)上注册回调事件。
this.ports[1].onMessageEvent((result: web_webview.WebMessage) => { this.ports[1].onMessageEvent((result: web_webview.WebMessage) => {
let msg = 'Got msg from HTML:'; let msg = 'Got msg from HTML:';
if (typeof(result) == "string") { if (typeof(result) == "string") {
console.log("received string message from html5, string is:" + result); console.log("received string message from html5, string is:" + result);
msg = msg + result; msg = msg + result;
} else if (typeof(result) == "object") { } else if (typeof(result) == "object") {
if (result instanceof ArrayBuffer) { if (result instanceof ArrayBuffer) {
console.log("received arraybuffer from html5, length is:" + result.byteLength); console.log("received arraybuffer from html5, length is:" + result.byteLength);
msg = msg + "lenght is " + result.byteLength; msg = msg + "lenght is " + result.byteLength;
} else {
console.log("not support");
}
} else { } else {
console.log("not support"); console.log("not support");
} }
this.receivedFromHtml = msg; } else {
}) console.log("not support");
// 3、将另一个消息端口(如端口0)发送到HTML侧,由HTML侧保存并使用。 }
this.controller.postMessage('__init_port__', [this.ports[0]], '*'); this.receivedFromHtml = msg;
})
// 3、将另一个消息端口(如端口0)发送到HTML侧,由HTML侧保存并使用。
this.controller.postMessage('__init_port__', [this.ports[0]], '*');
} catch (error) { } catch (error) {
console.error(`ErrorCode: ${error.code}, Message: ${error.message}`); console.error(`ErrorCode: ${error.code}, Message: ${error.message}`);
} }
...@@ -2523,6 +2523,37 @@ struct WebComponent { ...@@ -2523,6 +2523,37 @@ struct WebComponent {
} }
``` ```
支持开发者基于默认的UserAgent去定制UserAgent。
```ts
// xxx.ets
import web_webview from '@ohos.web.webview';
@Entry
@Component
struct WebComponent {
controller: web_webview.WebviewController = new web_webview.WebviewController();
@State ua: string = ""
aboutToAppear():void {
web_webview.once('webInited', () => {
try {
// 应用侧用法示例,定制UserAgent。
this.ua = this.controller.getUserAgent() + 'xxx';
} catch(error) {
console.error(`ErrorCode: ${error.code}, Message: ${error.message}`);
}
})
}
build() {
Column() {
Web({ src: 'www.example.com', controller: this.controller })
.userAgent(this.ua)
}
}
}
```
### getTitle ### getTitle
getTitle(): string getTitle(): string
...@@ -3191,7 +3222,7 @@ import image from "@ohos.multimedia.image" ...@@ -3191,7 +3222,7 @@ import image from "@ohos.multimedia.image"
@Component @Component
struct WebComponent { struct WebComponent {
controller: web_webview.WebviewController = new web_webview.WebviewController(); controller: web_webview.WebviewController = new web_webview.WebviewController();
@State pixelmap: image.PixelMap = undefined; @State pixelmap: image.PixelMap = undefined;
build() { build() {
Column() { Column() {
...@@ -3297,12 +3328,12 @@ struct WebComponent { ...@@ -3297,12 +3328,12 @@ struct WebComponent {
.onClick(() => { .onClick(() => {
try { try {
this.controller.hasImage((error, data) => { this.controller.hasImage((error, data) => {
if (error) { if (error) {
console.info(`hasImage error: ` + JSON.stringify(error)) console.info(`hasImage error: ` + JSON.stringify(error))
return; return;
} }
console.info("hasImage: " + data); console.info("hasImage: " + data);
}); });
} catch (error) { } catch (error) {
console.error(`ErrorCode: ${error.code}, Message: ${error.message}`); console.error(`ErrorCode: ${error.code}, Message: ${error.message}`);
} }
...@@ -3352,11 +3383,11 @@ struct WebComponent { ...@@ -3352,11 +3383,11 @@ struct WebComponent {
.onClick(() => { .onClick(() => {
try { try {
this.controller.hasImage().then((data) => { this.controller.hasImage().then((data) => {
console.info('hasImage: ' + data); console.info('hasImage: ' + data);
}) })
.catch(function (error) { .catch(function (error) {
console.error("error: " + error); console.error("error: " + error);
}) })
} catch (error) { } catch (error) {
console.error(`Errorcode: ${error.code}, Message: ${error.message}`); console.error(`Errorcode: ${error.code}, Message: ${error.message}`);
} }
...@@ -4131,7 +4162,7 @@ struct WebComponent { ...@@ -4131,7 +4162,7 @@ struct WebComponent {
通过WebCookie可以控制Web组件中的cookie的各种行为,其中每个应用中的所有web组件共享一个WebCookieManager实例。 通过WebCookie可以控制Web组件中的cookie的各种行为,其中每个应用中的所有web组件共享一个WebCookieManager实例。
### getCookie ### getCookie
static getCookie(url: string): string static getCookie(url: string): string
...@@ -4187,7 +4218,7 @@ struct WebComponent { ...@@ -4187,7 +4218,7 @@ struct WebComponent {
} }
``` ```
### setCookie ### setCookie
static setCookie(url: string, value: string): void static setCookie(url: string, value: string): void
...@@ -4238,7 +4269,7 @@ struct WebComponent { ...@@ -4238,7 +4269,7 @@ struct WebComponent {
} }
``` ```
### saveCookieAsync ### saveCookieAsync
static saveCookieAsync(callback: AsyncCallback\<void>): void static saveCookieAsync(callback: AsyncCallback\<void>): void
...@@ -4284,7 +4315,7 @@ struct WebComponent { ...@@ -4284,7 +4315,7 @@ struct WebComponent {
} }
``` ```
### saveCookieAsync ### saveCookieAsync
static saveCookieAsync(): Promise\<void> static saveCookieAsync(): Promise\<void>
...@@ -4331,7 +4362,7 @@ struct WebComponent { ...@@ -4331,7 +4362,7 @@ struct WebComponent {
} }
``` ```
### putAcceptCookieEnabled ### putAcceptCookieEnabled
static putAcceptCookieEnabled(accept: boolean): void static putAcceptCookieEnabled(accept: boolean): void
...@@ -4372,7 +4403,7 @@ struct WebComponent { ...@@ -4372,7 +4403,7 @@ struct WebComponent {
} }
``` ```
### isCookieAllowed ### isCookieAllowed
static isCookieAllowed(): boolean static isCookieAllowed(): boolean
...@@ -4410,7 +4441,7 @@ struct WebComponent { ...@@ -4410,7 +4441,7 @@ struct WebComponent {
} }
``` ```
### putAcceptThirdPartyCookieEnabled ### putAcceptThirdPartyCookieEnabled
static putAcceptThirdPartyCookieEnabled(accept: boolean): void static putAcceptThirdPartyCookieEnabled(accept: boolean): void
...@@ -4451,7 +4482,7 @@ struct WebComponent { ...@@ -4451,7 +4482,7 @@ struct WebComponent {
} }
``` ```
### isThirdPartyCookieAllowed ### isThirdPartyCookieAllowed
static isThirdPartyCookieAllowed(): boolean static isThirdPartyCookieAllowed(): boolean
...@@ -4489,7 +4520,7 @@ struct WebComponent { ...@@ -4489,7 +4520,7 @@ struct WebComponent {
} }
``` ```
### existCookie ### existCookie
static existCookie(): boolean static existCookie(): boolean
...@@ -4527,7 +4558,7 @@ struct WebComponent { ...@@ -4527,7 +4558,7 @@ struct WebComponent {
} }
``` ```
### deleteEntireCookie ### deleteEntireCookie
static deleteEntireCookie(): void static deleteEntireCookie(): void
...@@ -4558,7 +4589,7 @@ struct WebComponent { ...@@ -4558,7 +4589,7 @@ struct WebComponent {
} }
``` ```
### deleteSessionCookie ### deleteSessionCookie
static deleteSessionCookie(): void static deleteSessionCookie(): void
......
...@@ -204,7 +204,7 @@ postMessage(message: Object, options?: PostMessageOptions): void ...@@ -204,7 +204,7 @@ postMessage(message: Object, options?: PostMessageOptions): void
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| ------- | ----------------------------------------- | ---- | ------------------------------------------------------------ | | ------- | ----------------------------------------- | ---- | ------------------------------------------------------------ |
| message | Object | 是 | 发送至Worker的数据。 | | message | Object | 是 | 发送至Worker的数据。 |
| options | [PostMessageOptions](#postmessageoptions) | 否 | 可传输对象是&nbsp;ArrayBuffer&nbsp;的实例对象。若不填入该参数,默认设置为"undefined"。| | options | [PostMessageOptions](#postmessageoptions) | 否 | 可传输对象是&nbsp;ArrayBuffer&nbsp;的实例对象。若不填入该参数,默认设置为 undefined。|
**错误码:** **错误码:**
...@@ -905,7 +905,7 @@ Worker线程向宿主线程发送消息。 ...@@ -905,7 +905,7 @@ Worker线程向宿主线程发送消息。
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| ------- | ----------------------------------------- | ---- | ------------------------------------------------------------ | | ------- | ----------------------------------------- | ---- | ------------------------------------------------------------ |
| message | Object | 是 | 发送至宿主线程的数据。 | | message | Object | 是 | 发送至宿主线程的数据。 |
| options | [PostMessageOptions](#postmessageoptions) | 否 | 可传输对象是ArrayBuffer的实例对象。若不填入该参数,默认设置为"undefined"。| | options | [PostMessageOptions](#postmessageoptions) | 否 | 可传输对象是ArrayBuffer的实例对象。若不填入该参数,默认设置为 undefined。|
**错误码:** **错误码:**
...@@ -1296,7 +1296,7 @@ postMessage(message: Object, options?: PostMessageOptions): void ...@@ -1296,7 +1296,7 @@ postMessage(message: Object, options?: PostMessageOptions): void
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| ------- | ----------------------------------------- | ---- | ------------------------------------------------------------ | | ------- | ----------------------------------------- | ---- | ------------------------------------------------------------ |
| message | Object | 是 | 发送至Worker的数据。 | | message | Object | 是 | 发送至Worker的数据。 |
| options | [PostMessageOptions](#postmessageoptions) | 否 | 可传输对象是&nbsp;ArrayBuffer&nbsp;的实例对象。若不填入该参数,默认设置为"undefined"。| | options | [PostMessageOptions](#postmessageoptions) | 否 | 可传输对象是&nbsp;ArrayBuffer&nbsp;的实例对象。若不填入该参数,默认设置为 undefined。|
**示例:** **示例:**
...@@ -1766,7 +1766,7 @@ Worker线程向宿主线程发送消息。 ...@@ -1766,7 +1766,7 @@ Worker线程向宿主线程发送消息。
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| ------- | ----------------------------------------- | ---- | ------------------------------------------------------------ | | ------- | ----------------------------------------- | ---- | ------------------------------------------------------------ |
| message | Object | 是 | 发送至宿主线程的数据。 | | message | Object | 是 | 发送至宿主线程的数据。 |
| options | [PostMessageOptions](#postmessageoptions) | 否 | 可传输对象是ArrayBuffer的实例对象。若不填入该参数,默认设置为"undefined"。| | options | [PostMessageOptions](#postmessageoptions) | 否 | 可传输对象是ArrayBuffer的实例对象。若不填入该参数,默认设置为 undefined。|
**示例:** **示例:**
......
...@@ -4328,7 +4328,7 @@ resend(): void ...@@ -4328,7 +4328,7 @@ resend(): void
} }
``` ```
### cancel<sup>9+</sup> ### cancel<sup>9+</sup>
cancel(): void cancel(): void
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
- [支持的标准库介绍](third_party_libc/musl.md) - [支持的标准库介绍](third_party_libc/musl.md)
- 附录 - 附录
- [Native api中没有导出的符号列表](third_party_libc/musl-peculiar-symbol.md) - [Native api中没有导出的符号列表](third_party_libc/musl-peculiar-symbol.md)
- [Native api中由于权限管控可能调用失败的符号列表](third_party_libc/musl-permission-control-symbol.md)
- [Native api中导出的EGL符号列表](third_party_opengl/egl-symbol.md) - [Native api中导出的EGL符号列表](third_party_opengl/egl-symbol.md)
- [Native api中导出的OpenGL ES 3.0符号列表](third_party_opengl/openglesv3-symbol.md) - [Native api中导出的OpenGL ES 3.0符号列表](third_party_opengl/openglesv3-symbol.md)
- [Native api中支持的OpenSL ES接口列表](third_party_opensles/opensles.md) - [Native api中支持的OpenSL ES接口列表](third_party_opensles/opensles.md)
\ No newline at end of file
...@@ -1876,4 +1876,24 @@ ...@@ -1876,4 +1876,24 @@
**授权方式**:system_grant **授权方式**:system_grant
**ACL使能**:TRUE **ACL使能**:TRUE
\ No newline at end of file
## ohos.permission.ACCESS_CAST_ENGINE_MIRROR
允许应用使用镜像投屏能力。
**权限级别**:system_basic
**授权方式**:system_grant
**ACL使能**:TRUE
## ohos.permission.ACCESS_CAST_ENGINE_STREAM
允许应用调用系统资源投射能力。
**权限级别**:system_basic
**授权方式**:system_grant
**ACL使能**:TRUE
# 软总线子系统ChangeLog # 软总线子系统ChangeLog
## cl.softbus.1 IPC接口中unregisterDeathRecipient接口返回值变更,更改为void。 ## cl.softbus.1 IPC接口中unregisterDeathRecipient接口返回值变更,更改为void。
unregisterDeathRecipient(recipient: DeathRecipient, flags: number)方法返回值为boolean,更正为void。 unregisterDeathRecipient(recipient: DeathRecipient, flags: number)方法返回值为boolean,更正为void。
**变更影响** **变更影响**
该unregisterDeathRecipient接口如果需要继续使用,建议优先使用removeDeathRecipient(recipient: DeathRecipient, flags: number): boolean方法。 该unregisterDeathRecipient接口如果需要继续使用,建议优先使用removeDeathRecipient(recipient: DeathRecipient, flags: number): boolean方法。
**关键的接口/组件变更** **关键的接口/组件变更**
- 变更前: - 变更前:
```js ```js
unregisterDeathRecipient(recipient: DeathRecipient, flags: number): boolean unregisterDeathRecipient(recipient: DeathRecipient, flags: number): boolean
``` ```
- 变更后: - 变更后:
```js ```js
unregisterDeathRecipient(recipient: DeathRecipient, flags: number): void unregisterDeathRecipient(recipient: DeathRecipient, flags: number): void
``` ```
**适配指导** **适配指导**
该unregisterDeathRecipient接口如果需要继续使用,建议优先使用removeDeathRecipient(recipient: DeathRecipient, flags: number): boolean方法。 该unregisterDeathRecipient接口如果需要继续使用,建议优先使用removeDeathRecipient(recipient: DeathRecipient, flags: number): boolean方法。
\ No newline at end of file
# arkui子系统ChangeLog
## cl.arkui.1 List组件和Gird组件滚动条默认状态变更
List组件和Gird组件滚动条默认状态从BarState.Off变更为BarState.Auto。
**变更影响**
List组件和Gird组件,如果没有设置滚动条状态,变更前不会显示滚动条,变更以后滚动时会显示滚动条,滚动停止两秒后滚动条隐藏。
**关键接口/组件变更**
List组件和Gird组件滚动条API接口文档:
- [List组件属性](../../../application-dev/reference/arkui-ts/ts-container-list.md#属性)
- [Grid组件属性](../../../application-dev/reference/arkui-ts/ts-container-grid.md#属性)
**适配指导**
对于不需要滚动条的场景,需要将List组件或Grid组件的scrollBar属性设置为BarState.Off。
参考代码如下:
```ts
// xxx.ets
@Entry
@Component
struct ListItemExample {
private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
build() {
Column() {
List({ space: 20, initialIndex: 0 }) {
ForEach(this.arr, (item) => {
ListItem() {
Text('' + item)
.width('100%').height(100).fontSize(16)
.textAlign(TextAlign.Center).borderRadius(10).backgroundColor(0xFFFFFF)
}
}, item => item)
}
.width('90%')
.scrollBar(BarState.Off)
}.width('100%').height('100%').backgroundColor(0xDCDCDC).padding({ top: 5 })
}
}
```
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册