diff --git a/zh-cn/application-dev/reference/apis/js-apis-arkui-componentSnapshot.md b/zh-cn/application-dev/reference/apis/js-apis-arkui-componentSnapshot.md index 21405345d8ab12d7c6ad25f60f2ccf40eddb5b80..6ecb84591cbac73b117281e5b9638be0b10034f5 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-arkui-componentSnapshot.md +++ b/zh-cn/application-dev/reference/apis/js-apis-arkui-componentSnapshot.md @@ -34,6 +34,12 @@ get(id: string, callback: AsyncCallback): void | id | string | 是 | 目标组件的[组件标识](../arkui-ts/ts-universal-attributes-component-id.md#组件标识) | | callback | AsyncCallback<image.PixelMap> | 是 | 截图返回结果的回调。 | +**错误码:** + +| 错误码ID | 错误信息 | +| -------- | ------------------- | +| 100001 | if id is not valid. | + **示例:** ```js @@ -159,6 +165,12 @@ createFromBuilder(builder: CustomBuilder, callback: AsyncCallback10+ getSystemFontList(): Array\ @@ -82,7 +84,7 @@ getSystemFontList(): Array\ | -------------------- | ----------------- | | Array\ | 系统的字体名列表。 | -## 示例 +**示例:** ```ts // xxx.ets @@ -105,7 +107,7 @@ struct FontExample { } ``` -## font.getFontByName +## font.getFontByName10+ getFontByName(fontName: string): FontInfo; @@ -127,18 +129,22 @@ getFontByName(fontName: string): FontInfo; ## FontInfo -| 名称 | 类型 | 说明 | -| -------------- | ------- | ------------------------- | -| path | string | 系统字体的文件路径。 | -| postScriptName | string | 系统字体的postScript名称。 | -| fullName | string | 系统字体的名称。 | -| family | string | 系统字体的字体家族。 | -| subfamily | string | 系统字体的子字体家族。 | -| weight | number | 系统字体的粗细程度。 | -| width | number | 系统字体的宽窄风格属性。 | -| italic | boolean | 系统字体是否倾斜。 | -| monoSpace | boolean | 系统字体是否紧凑。 | -| symbolic | boolean | 系统字体是否支持符号字体。 | +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +| 名称 | 类型 | 必填 | 说明 | +| -------------- | ------- | ------------------------- | ------------------------- | +| path | string | 是 | 系统字体的文件路径。 | +| postScriptName | string | 是 | 系统字体的postScript名称。 | +| fullName | string | 是 | 系统字体的名称。 | +| family | string | 是 | 系统字体的字体家族。 | +| subfamily | string | 是 | 系统字体的子字体家族。 | +| weight | number | 是 | 系统字体的粗细程度。 | +| width | number | 是 | 系统字体的宽窄风格属性。 | +| italic | boolean | 是 | 系统字体是否倾斜。 | +| monoSpace | boolean | 是 | 系统字体是否紧凑。 | +| symbolic | boolean | 是 | 系统字体是否支持符号字体。 | + +**示例:** ```ts // xxx.ets diff --git a/zh-cn/application-dev/reference/apis/js-apis-matrix4.md b/zh-cn/application-dev/reference/apis/js-apis-matrix4.md index 26e6d31ce8b2c5e982ea3222f6bea9e1a0a19c0c..3945062df5b6f40b0bf7cb9a39f7501b10f8d6d0 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-matrix4.md +++ b/zh-cn/application-dev/reference/apis/js-apis-matrix4.md @@ -16,7 +16,7 @@ import matrix4 from '@ohos.matrix4' ## matrix4.init -init(option: [number,number,number,number,number,number,number,number,number,number,number,number,number,number,number,number]): Matrix4Transit +init(options: [number,number,number,number,number,number,number,number,number,number,number,number,number,number,number,number]): Matrix4Transit Matrix的构造函数,可以通过传入的参数创建一个四阶矩阵,矩阵为列优先。 @@ -176,7 +176,7 @@ struct Test { ### combine -combine(option: Matrix4Transit): Matrix4Transit +combine(options: Matrix4Transit): Matrix4Transit Matrix的叠加函数,可以将两个矩阵的效果叠加起来生成一个新的矩阵对象。 @@ -273,7 +273,7 @@ struct Tests { ### translate -translate(option: TranslateOption): Matrix4Transit +translate(options: TranslateOption): Matrix4Transit Matrix的平移函数,可以为当前矩阵增加x轴/y轴/z轴平移效果。 @@ -317,7 +317,7 @@ struct Test { ### scale -scale(option: ScaleOption): Matrix4Transit +scale(options: ScaleOption): Matrix4Transit Matrix的缩放函数,可以为当前矩阵增加x轴/y轴/z轴缩放效果。 @@ -362,7 +362,7 @@ struct Test { ### rotate -rotate(option: RotateOption): Matrix4Transit +rotate(options: RotateOption): Matrix4Transit Matrix的旋转函数,可以为当前矩阵增加x轴/y轴/z轴旋转效果。 @@ -408,7 +408,7 @@ struct Test { ### transformPoint -transformPoint(option: [number, number]): [number, number] +transformPoint(options: [number, number]): [number, number] Matrix的坐标点转换函数,可以将当前的变换效果作用到一个坐标点上。 @@ -466,15 +466,15 @@ struct Test { ## TranslateOption -| 参数名 | 类型 | 必填 | 说明 | -| ------ | ------ | ---- | ----------------------------------------------------------- | -| x | number | 否 | x轴的平移距离,单位px。
默认值:0
取值范围 (-∞, +∞) | -| y | number | 否 | y轴的平移距离,单位px。
默认值:0
取值范围 (-∞, +∞) | -| z | number | 否 | z轴的平移距离,单位px。
默认值:0
取值范围 (-∞, +∞) | +| 名称 | 类型 | 必填 | 说明 | +| ---- | ------ | ---- | ----------------------------------------------------------- | +| x | number | 否 | x轴的平移距离,单位px。
默认值:0
取值范围 (-∞, +∞) | +| y | number | 否 | y轴的平移距离,单位px。
默认值:0
取值范围 (-∞, +∞) | +| z | number | 否 | z轴的平移距离,单位px。
默认值:0
取值范围 (-∞, +∞) | ## ScaleOption -| 参数名 | 类型 | 必填 | 说明 | +| 名称 | 类型 | 必填 | 说明 | | ------- | ------ | ---- | ------------------------------------------------------------ | | x | number | 否 | x轴的缩放倍数。x>1时以x轴方向放大,x<1时以x轴方向缩小。
默认值:1
取值范围 [0, +∞)
**说明:**
设置小于0的值时,按照默认值处理。 | | y | number | 否 | y轴的缩放倍数。y>1时以y轴方向放大,y<1时以y轴方向缩小。
默认值:1
取值范围 [0, +∞)
**说明:**
设置小于0的值时,按照默认值处理。 | @@ -484,7 +484,7 @@ struct Test { ## RotateOption -| 参数名 | 类型 | 必填 | 说明 | +| 名称 | 类型 | 必填 | 说明 | | ------- | ------ | ---- | ------------------------------------------------------- | | x | number | 否 | 旋转轴向量x坐标。
默认值:1。
取值范围 (-∞, +∞) | | y | number | 否 | 旋转轴向量y坐标。
默认值:1。
取值范围 (-∞, +∞) | diff --git a/zh-cn/application-dev/reference/apis/js-apis-plugincomponent.md b/zh-cn/application-dev/reference/apis/js-apis-plugincomponent.md index 76ec3862c61789a3e8f9d4b94b959edb819fd891..ae558d1202c4563a7a021b5425e304f1d95688b6 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-plugincomponent.md +++ b/zh-cn/application-dev/reference/apis/js-apis-plugincomponent.md @@ -262,7 +262,7 @@ pluginComponentManager.push( name: "ets/pages/plugin2.js", data: { "js": "ets/pages/plugin.js", - "key_1": 1111, , + "key_1": 1111, }, extraData: { "extra_str": "this is push event" diff --git a/zh-cn/application-dev/reference/apis/js-apis-router.md b/zh-cn/application-dev/reference/apis/js-apis-router.md index 35f3f4c1e73c7b4bb0ebd1f8e764dbafd8f4aa38..6e695436e1cc0e61c9dcc4cd8a7ea3f0b8519f80 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-router.md +++ b/zh-cn/application-dev/reference/apis/js-apis-router.md @@ -604,7 +604,7 @@ replaceNamedRoute(options: NamedRouterOptions): Promise<void> | 错误码ID | 错误信息 | | --------- | ------- | -| 100001 | if UI execution context not found. | +| 100001 | if UI execution context not found, only throw in standard system. | | 100004 | if the named route is not exist. | **示例:** @@ -645,7 +645,7 @@ replaceNamedRoute(options: NamedRouterOptions, callback: AsyncCallback<void&g | 错误码ID | 错误信息 | | --------- | ------- | -| 100001 | if UI execution context not found. | +| 100001 | if UI execution context not found, only throw in standard system. | | 100004 | if the named route is not exist. | **示例:** @@ -693,7 +693,7 @@ replaceNamedRoute(options: NamedRouterOptions, mode: RouterMode): Promise<voi | 错误码ID | 错误信息 | | --------- | ------- | -| 100001 | if can not get the delegate. | +| 100001 | if UI execution context not found, only throw in standard system. | | 100004 | if the named route is not exist. | **示例:** @@ -735,7 +735,7 @@ replaceNamedRoute(options: NamedRouterOptions, mode: RouterMode, callback: Async | 错误码ID | 错误信息 | | --------- | ------- | -| 100001 | if UI execution context not found. | +| 100001 | if UI execution context not found, only throw in standard system. | | 100004 | if the named route is not exist. | **示例:** @@ -1054,7 +1054,7 @@ struct Second { Text(this.text) .fontSize(30) .onClick(() => { - this.secondData = (this.data.['array'][1]).toString() + this.secondData = (this.data['array'][1]).toString() }) .margin({ top: 20 }) Text(`第一页传来的数值:${this.secondData}`)