diff --git a/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-container-embedded-component.md b/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-container-embedded-component.md index 3e5d608b1b3402383ce6bde1546508f8d688e701..d0ca00a191dbd6784624b1b20bab202a64f5385c 100644 --- a/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-container-embedded-component.md +++ b/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-container-embedded-component.md @@ -158,23 +158,23 @@ onError(callback: ErrorCallback) export default class ExampleEmbeddedAbility extends EmbeddedUIExtensionAbility { onCreate() { - console.log(TAG, `onCreate`); + console.info(TAG, `onCreate`); } onForeground() { - console.log(TAG, `onForeground`); + console.info(TAG, `onForeground`); } onBackground() { - console.log(TAG, `onBackground`); + console.info(TAG, `onBackground`); } onDestroy() { - console.log(TAG, `onDestroy`); + console.info(TAG, `onDestroy`); } onSessionCreate(want: Want, session: UIExtensionContentSession) { - console.log(TAG, `onSessionCreate, want: ${JSON.stringify(want)}`); + console.info(TAG, `onSessionCreate, want: ${JSON.stringify(want)}`); let param: Record = { 'session': session }; @@ -184,7 +184,7 @@ onError(callback: ErrorCallback) } onSessionDestroy(session: UIExtensionContentSession) { - console.log(TAG, `onSessionDestroy`); + console.info(TAG, `onSessionDestroy`); } } ``` diff --git a/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-container-isolated-component-sys.md b/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-container-isolated-component-sys.md index 4b54e3b529d33cc1b03c9c70ffa5097dbf42860b..1f2a8def50c4cbe2186859b5abf619472593388c 100644 --- a/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-container-isolated-component-sys.md +++ b/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-container-isolated-component-sys.md @@ -155,7 +155,7 @@ onError(callback:ErrorCallback) // 1.调用verifyAbc接口校验abc文件 Button("verifyAbc").onClick(() => { let abcFilePath = `${this.context.filesDir}/${this.fileName}.abc`; - console.log("abcFilePath: " + abcFilePath); + console.info("abcFilePath: " + abcFilePath); VerifyAbc([abcFilePath], false); }).height(100).width(100) diff --git a/zh-cn/application-dev/reference/apis-arkui/js-apis-arkui-inspector.md b/zh-cn/application-dev/reference/apis-arkui/js-apis-arkui-inspector.md index 08057bb1d74f5f251d9aedccef4c4feeb045b2b7..98b3ce13de68b71025f025fa65a50f1f545261be 100644 --- a/zh-cn/application-dev/reference/apis-arkui/js-apis-arkui-inspector.md +++ b/zh-cn/application-dev/reference/apis-arkui/js-apis-arkui-inspector.md @@ -51,7 +51,7 @@ let listener:inspector.ComponentObserver = inspector.createComponentObserver('CO 组件布局和组件绘制送显完成回调的句柄,包含了申请句柄时的首次查询结果。 -### on +### on('layout') on(type: 'layout', callback: () => void): void @@ -65,10 +65,10 @@ on(type: 'layout', callback: () => void): void | 参数名 | 类型 | 必填 | 说明| | -------- | ------ | ---- | -------------------------------------| -| type | string | 是 | 必须填写字符串'layout'、'draw'或'drawChildren'。
layout: 组件布局完成。
draw: 组件绘制送显完成。
drawChildren: 子组件绘制送显完成。| -| callback | () => void | 是 | 监听layout、draw或drawChildren的回调。| +| type | string | 是 | 必须填写字符串'layout'。
layout: 组件布局完成。| +| callback | () => void | 是 | 监听layout的回调。| -### off +### off('layout') off(type: 'layout', callback?: () => void): void @@ -82,10 +82,10 @@ off(type: 'layout', callback?: () => void): void | 参数名 | 类型 | 必填 | 说明 | | -------- | ------ | ---- | -------------------------------------------- | -| type | string | 是 | 必须填写字符串'layout'、'draw'或'drawChildren'。
layout: 组件布局完成。
draw: 组件绘制送显完成。
drawChildren: 子组件绘制送显完成。| +| type | string | 是 | 必须填写字符串'layout'。
layout: 组件布局完成。| | callback | () => void | 否 | 需要取消注册的回调,如果参数缺省则取消注册该句柄下所有的回调。callback需要和[on](#on)方法中的callback为相同对象时才能取消回调成功。| -### on +### on('draw') on(type: 'draw', callback: () => void): void @@ -99,10 +99,10 @@ on(type: 'draw', callback: () => void): void | 参数名 | 类型 | 必填 | 说明 | | -------- | ------ | ---- | ------------------------------------------------------------ | -| type | string | 是 | 必须填写字符串'layout'、'draw'或'drawChildren'。
layout: 组件布局完成。
draw: 组件绘制送显完成。
drawChildren: 子组件绘制送显完成。| -| callback | () => void | 是 | 监听layout、draw或drawChildren的回调。 | +| type | string | 是 | 必须填写字符串'draw'。
draw: 组件绘制送显完成。| +| callback | () => void | 是 | 监听draw的回调。 | -### off +### off('draw') off(type: 'draw', callback?: () => void): void @@ -116,10 +116,10 @@ off(type: 'draw', callback?: () => void): void | 参数名 | 类型 | 必填 | 说明 | | -------- | ------ | ---- | ------------------------------------------------------------ | -| type | string | 是 | 必须填写字符串'layout'、'draw'或'drawChildren'。
layout: 组件布局完成。
draw: 组件绘制送显完成。
drawChildren: 子组件绘制送显完成。| +| type | string | 是 | 必须填写字符串'draw'。
draw: 组件绘制送显完成。| | callback | () => void | 否 | 需要取消注册的回调,如果参数缺省则取消注册该句柄下所有的回调。callback需要和[on](#on-1)方法中的callback为相同对象时才能取消回调成功。 | -### on20 +### on('drawChildren')20 on(type: 'drawChildren', callback: Callback\): void @@ -133,12 +133,12 @@ on(type: 'drawChildren', callback: Callback\): void | 参数名 | 类型 | 必填 | 说明 | | -------- | ------ | ---- | ------------------------------------------------------------ | -| type | string | 是 | 必须填写字符串'layout'、'draw'或'drawChildren'。
layout: 组件布局完成。
draw: 组件绘制送显完成。
drawChildren: 子组件绘制送显完成。| -| callback | [Callback\](js-apis-arkui-inspector.md#) | 是 | 监听layout、draw或drawChildren的回调。 | +| type | string | 是 | 必须填写字符串'drawChildren'。
drawChildren: 子组件绘制送显完成。| +| callback | [Callback\](js-apis-arkui-inspector.md#) | 是 | 监听drawChildren的回调。 | -### off20 +### off('drawChildren')20 -off(type: 'drawChildren', callback: Callback\): void +off(type: 'drawChildren', callback?: Callback\): void 通过句柄向对应的查询条件取消注册回调,当组件绘制送显完成时不再触发指定的回调。 @@ -150,7 +150,7 @@ off(type: 'drawChildren', callback: Callback\): void | 参数名 | 类型 | 必填 | 说明 | | -------- | ------ | ---- | ------------------------------------------------------------ | -| type | string | 是 | 必须填写字符串'layout'、'draw'或'drawChildren'。
layout: 组件布局完成。
draw: 组件绘制送显完成。
drawChildren: 子组件绘制送显完成。| +| type | string | 是 | 必须填写字符串'drawChildren'。
drawChildren: 子组件绘制送显完成。| | callback | Callback\ | 否 | 需要取消注册的回调,如果参数缺省则取消注册该句柄下所有的回调。callback需要和[on](#on20)方法中的callback为相同对象时才能取消回调成功。 | **示例:** diff --git a/zh-cn/application-dev/reference/apis-arkui/js-apis-plugincomponent.md b/zh-cn/application-dev/reference/apis-arkui/js-apis-plugincomponent.md index 3c5804d8627ca9ae1c2f95b1bdb49a2ca94beffd..f1b733bd7e985c3728f5594bb610b06acbfc9a28 100755 --- a/zh-cn/application-dev/reference/apis-arkui/js-apis-plugincomponent.md +++ b/zh-cn/application-dev/reference/apis-arkui/js-apis-plugincomponent.md @@ -130,11 +130,11 @@ import { pluginComponentManager, PluginComponentTemplate } from '@kit.ArkUI'; import { Want } from '@kit.AbilityKit'; function onPushListener(source: Want, template: PluginComponentTemplate, data: pluginComponentManager.KVObject, extraData: pluginComponentManager.KVObject) { - console.log("onPushListener template.source=" + template.source); - console.log("onPushListener source=" + JSON.stringify(source)); - console.log("onPushListener template=" + JSON.stringify(template)); - console.log("onPushListener data=" + JSON.stringify(data)); - console.log("onPushListener extraData=" + JSON.stringify(extraData)); + console.info("onPushListener template.source=" + template.source); + console.info("onPushListener source=" + JSON.stringify(source)); + console.info("onPushListener template=" + JSON.stringify(template)); + console.info("onPushListener data=" + JSON.stringify(data)); + console.info("onPushListener extraData=" + JSON.stringify(extraData)); } ``` @@ -171,9 +171,9 @@ import { Want } from '@kit.AbilityKit'; function onRequestListener(source: Want, name: string, data: pluginComponentManager.KVObject) { console.error("onRequestListener"); - console.log("onRequestListener source=" + JSON.stringify(source)); - console.log("onRequestListener name=" + name); - console.log("onRequestListener data=" + JSON.stringify(data)); + console.info("onRequestListener source=" + JSON.stringify(source)); + console.info("onRequestListener name=" + name); + console.info("onRequestListener data=" + JSON.stringify(data)); let RtnData: Record = { 'template': "ets/pages/plugin.js", 'data': data, @@ -219,7 +219,7 @@ pluginComponentManager.push( jsonPath: "", }, (err, data) => { - console.log("push_callback: push ok!"); + console.info("push_callback: push ok!"); } ) ``` @@ -260,10 +260,10 @@ pluginComponentManager.request( jsonPath: "", }, (err, data) => { - console.log("request_callback: componentTemplate.ability=" + data.componentTemplate.ability); - console.log("request_callback: componentTemplate.source=" + data.componentTemplate.source); - console.log("request_callback: data=" + JSON.stringify(data.data)); - console.log("request_callback: extraData=" + JSON.stringify(data.extraData)); + console.info("request_callback: componentTemplate.ability=" + data.componentTemplate.ability); + console.info("request_callback: componentTemplate.source=" + data.componentTemplate.source); + console.info("request_callback: data=" + JSON.stringify(data.data)); + console.info("request_callback: extraData=" + JSON.stringify(data.extraData)); } ) ``` @@ -291,17 +291,17 @@ on(eventType: string, callback: OnPushEventCallback | OnRequestEventCallback ): import { pluginComponentManager, PluginComponentTemplate } from '@kit.ArkUI'; import { Want } from '@kit.AbilityKit'; function onPushListener(source:Want, template:PluginComponentTemplate, data:pluginComponentManager.KVObject, extraData:pluginComponentManager.KVObject) { - console.log("onPushListener template.source=" + template.source); - console.log("onPushListener source=" + JSON.stringify(source)); - console.log("onPushListener template=" + JSON.stringify(template)); - console.log("onPushListener data=" + JSON.stringify(data)); - console.log("onPushListener extraData=" + JSON.stringify(extraData)); + console.info("onPushListener template.source=" + template.source); + console.info("onPushListener source=" + JSON.stringify(source)); + console.info("onPushListener template=" + JSON.stringify(template)); + console.info("onPushListener data=" + JSON.stringify(data)); + console.info("onPushListener extraData=" + JSON.stringify(extraData)); } function onRequestListener(source:Want, name:string, data:pluginComponentManager.KVObject) { console.error("onRequestListener"); - console.log("onRequestListener source=" + JSON.stringify(source)); - console.log("onRequestListener name=" + name); - console.log("onRequestListener data=" + JSON.stringify(data)); + console.info("onRequestListener source=" + JSON.stringify(source)); + console.info("onRequestListener name=" + name); + console.info("onRequestListener data=" + JSON.stringify(data)); let RtnData:Record = { 'template': "ets/pages/plugin.js", 'data': data }; return RtnData; } diff --git a/zh-cn/application-dev/ui/arkts-embedded-components.md b/zh-cn/application-dev/ui/arkts-embedded-components.md index 015223519596f0a83fba37b450a96d169c79eada..25ea007744ada2633ceffc1784e292b2dc16fc54 100644 --- a/zh-cn/application-dev/ui/arkts-embedded-components.md +++ b/zh-cn/application-dev/ui/arkts-embedded-components.md @@ -113,23 +113,23 @@ const TAG: string = '[ExampleEmbeddedAbility]' export default class ExampleEmbeddedAbility extends EmbeddedUIExtensionAbility { onCreate() { - console.log(TAG, `onCreate`); + console.info(TAG, `onCreate`); } onForeground() { - console.log(TAG, `onForeground`); + console.info(TAG, `onForeground`); } onBackground() { - console.log(TAG, `onBackground`); + console.info(TAG, `onBackground`); } onDestroy() { - console.log(TAG, `onDestroy`); + console.info(TAG, `onDestroy`); } onSessionCreate(want: Want, session: UIExtensionContentSession) { - console.log(TAG, `onSessionCreate, want: ${JSON.stringify(want)}`); + console.info(TAG, `onSessionCreate, want: ${JSON.stringify(want)}`); let param: Record = { 'session': session }; @@ -139,7 +139,7 @@ export default class ExampleEmbeddedAbility extends EmbeddedUIExtensionAbility { } onSessionDestroy(session: UIExtensionContentSession) { - console.log(TAG, `onSessionDestroy`); + console.info(TAG, `onSessionDestroy`); } } ``` diff --git a/zh-cn/application-dev/ui/arkts-isolated-components.md b/zh-cn/application-dev/ui/arkts-isolated-components.md index 15be0872bdf908409208ab0c7ef6d5f29feb4b7a..9c454936525a4dc7a6a83765b7a3ae4b278b017d 100644 --- a/zh-cn/application-dev/ui/arkts-isolated-components.md +++ b/zh-cn/application-dev/ui/arkts-isolated-components.md @@ -178,7 +178,7 @@ struct Index { // 1.调用verifyAbc接口校验Abc文件 Button("verifyAbc").onClick(() => { let abcFilePath = `${this.context.filesDir}/${this.fileName}.abc`; - console.log("abcFilePath: " + abcFilePath); + console.info("abcFilePath: " + abcFilePath); VerifyAbc([abcFilePath], false); }).height(100).width(200)