From 074344de02d434e24fdab82d182d216862762521 Mon Sep 17 00:00:00 2001 From: "ester.zhou" Date: Sat, 25 Feb 2023 08:50:00 +0800 Subject: [PATCH] Update docs (14484) Signed-off-by: ester.zhou --- .../arkui-ts/ts-basic-components-stepper.md | 8 ++++---- .../arkui-ts/ts-basic-components-stepperitem.md | 6 +++--- .../reference/arkui-ts/ts-basic-components-text.md | 14 +++++++------- .../arkui-ts/ts-universal-attributes-text-style.md | 4 ++-- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/en/application-dev/reference/arkui-ts/ts-basic-components-stepper.md b/en/application-dev/reference/arkui-ts/ts-basic-components-stepper.md index 99562b3a4e..abbe6e2433 100644 --- a/en/application-dev/reference/arkui-ts/ts-basic-components-stepper.md +++ b/en/application-dev/reference/arkui-ts/ts-basic-components-stepper.md @@ -34,11 +34,11 @@ None | Name| Description| | -------- | -------- | -| onFinish(callback: () => void) | Invoked when the **nextLabel** of the last **\** in the **\** is clicked.| +| onFinish(callback: () => void) | Invoked when the **nextLabel** of the last **\** in the **\** is clicked and the **ItemState** attribute is set to **Normal**.| | onSkip(callback: () => void) | Invoked when the current **\** is **ItemState.Skip** and the **nextLabel** is clicked.| -| onChange(callback: (prevIndex?: number, index?: number) => void) | Invoked when the user switches to the previous or next step.
- **prevIndex**: index of the step page before the switching.
- **index**: index of the step page after the switching, that is, index of the previous or next page.| -| onNext(callback: (index?: number, pendingIndex?: number) => void) | Invoked when a user switches to the next step.
- **index**: index of the current step page.
- **pendingIndex**: index of the next page.| -| onPrevious(callback: (index?: number, pendingIndex?: number) => void) | Invoked when a user switches to the previous step.
- **index**: index of the current step page.
- **pendingIndex**: index of the previous page.| +| onChange(callback: (prevIndex?: number, index?: number) => void) | Invoked when the **prevLabel** of the current **\** is clicked to switch to the previous step page; or when the **nextLabel** of the current (not the last) **\** is clicked to switch to the next step page and the **ItemState** attribute is set to **Normal**.
- **prevIndex**: index of the step page before the switching.
- **index**: index of the step page after the switching, that is, index of the previous or next step page.| +| onNext(callback: (index?: number, pendingIndex?: number) => void) | Invoked when the **nextLabel** of the current (not the last) **\** is clicked and the **ItemState** attribute is set to **Normal**.
- **index**: index of the current step page.
- **pendingIndex**: index of the next step page.| +| onPrevious(callback: (index?: number, pendingIndex?: number) => void) | Invoked when the **prevLabel** of the current **\** is clicked to switch to the previous step page.
- **index**: index of the current step page.
- **pendingIndex**: index of the previous step page.| ## Example diff --git a/en/application-dev/reference/arkui-ts/ts-basic-components-stepperitem.md b/en/application-dev/reference/arkui-ts/ts-basic-components-stepperitem.md index bef2f11922..809b3f114f 100644 --- a/en/application-dev/reference/arkui-ts/ts-basic-components-stepperitem.md +++ b/en/application-dev/reference/arkui-ts/ts-basic-components-stepperitem.md @@ -22,7 +22,7 @@ StepperItem() | Name| Type| Description| | -------- | -------- | -------- | -| prevLabel | string | Text label of the button on the left. When the **\** contains more than one page, the default value for all pages except the first page is **Back**.| +| prevLabel | string | Text label of the button on the left, which is not displayed on the first page. When the **\** contains more than one page, the default value for all pages except the first page is **Back**.| | nextLabel | string | Text label of the button on the right. The default value is **Start** for the last page and **Next** for the other pages.| | status | ItemState | Display status of **nextLabel** in the stepper.
Default value: **ItemState.Normal**| @@ -31,9 +31,9 @@ StepperItem() | Name | Value | Description| | -------- | -------- |-------- | | Normal | 0 |The button on the right is clickable and can navigate users to the next **\** when it is clicked.| -| Disabled | 1 |The button on the right is grayed out and unavailable.| +| Disabled | 1 |The button on the right is disabled.| | Waiting | 2 | The button on the right is not displayed, and a progress bar is displayed instead.| -| Skip | 3 |The button on the right reads "Skip". You can define the processing logic for this state in the **onSkip** callback of the stepper.| +| Skip | 3 |The button on the right reads "Skip" by default. You can define the processing logic for this state in the **onSkip** callback of the stepper.| ## Example diff --git a/en/application-dev/reference/arkui-ts/ts-basic-components-text.md b/en/application-dev/reference/arkui-ts/ts-basic-components-text.md index 354cd00042..67eedfeb76 100644 --- a/en/application-dev/reference/arkui-ts/ts-basic-components-text.md +++ b/en/application-dev/reference/arkui-ts/ts-basic-components-text.md @@ -28,19 +28,19 @@ In addition to the [universal attributes](ts-universal-attributes-size.md), the | Name | Type | Description | | ----------------------- | ----------------------------------- | ------------------------------------------- | -| textAlign | [TextAlign](ts-appendix-enums.md#textalign) | Horizontal alignment mode of the text.
Default value: **TextAlign.Start**| -| textOverflow | {overflow: [TextOverflow](ts-appendix-enums.md#textoverflow)} | Display mode when the text is too long.
Default value: **{overflow: TextOverflow.Clip}**
**NOTE**
Text is clipped at the transition between words. To clip text in the middle of a word, add **\u200B** between characters.
This attribute must be used with `maxLines` to take effect.| -| maxLines | number | Maximum number of lines in the text.
Default value: **Infinity**
**NOTE**
By default, text is automatically folded. If this attribute is specified, the text will not exceed the specified number of lines. If there is extra text, you can use **textOverflow** to specify how it is displayed.| +| textAlign | [TextAlign](ts-appendix-enums.md#textalign) | Horizontal alignment mode of the text.
Default value: **TextAlign.Start**
**NOTE**
The text takes up the full width of the **\** component. To set the vertical alignment for the text, use the [align](ts-universal-attributes-location.md) attribute.| +| textOverflow | {overflow: [TextOverflow](ts-appendix-enums.md#textoverflow)} | Display mode when the text is too long.
Default value: **{overflow: TextOverflow.Clip}**
**NOTE**
Text is clipped at the transition between words. To clip text in the middle of a word, add **\u200B** between characters.
This attribute must be used with `maxLines` to take effect. | +| maxLines | number | Maximum number of lines in the text.
Default value: **Infinity**
**NOTE**
By default, text is automatically folded. If this attribute is specified, the text will not exceed the specified number of lines. If there is extra text, you can use **textOverflow** to specify how it is displayed. | | lineHeight | string \| number \| [Resource](ts-types.md#resource) | Text line height. If the value is less than or equal to **0**, the line height is not limited and the font size is adaptive. If the value of the number type, the unit fp is used.| -| decoration | {
type: [TextDecorationType](ts-appendix-enums.md#textdecorationtype),
color?: [ResourceColor](ts-types.md#resourcecolor)
} | Style and color of the text decorative line.
Default value: **{
type: TextDecorationType.None,
color: Color.Black
}** | +| decoration | {
type: [TextDecorationType](ts-appendix-enums.md#textdecorationtype),
color?: [ResourceColor](ts-types.md#resourcecolor)
} | Style and color of the text decorative line.
Default value: {
type: TextDecorationType.None,
color: Color.Black
} | | baselineOffset | number \| string | Baseline offset of the text. The default value is **0**. | | letterSpacing | number \| string | Letter spacing. | -| minFontSize | number \| string \| [Resource](ts-types.md#resource) | Minimum font size. | -| maxFontSize | number \| string \| [Resource](ts-types.md#resource) | Maximum font size. | +| minFontSize | number \| string \| [Resource](ts-types.md#resource) | Minimum font size.
For the setting to take effect, this attribute must be used together with **maxFontSize**, **maxline**, or a layout size constraint. | +| maxFontSize | number \| string \| [Resource](ts-types.md#resource) | Maximum font size.
For the setting to take effect, this attribute must be used together with **minFontSize**, **maxline**, or a layout size constraint. | | textCase | [TextCase](ts-appendix-enums.md#textcase) | Text case.
Default value: **TextCase.Normal**| | copyOption9+ | [CopyOptions](ts-appendix-enums.md#copyoptions9) | Whether copy and paste is allowed.
Default value: **CopyOptions.None**| -> **NOTE**
+> **NOTE** > > The **\** component cannot contain both the text and the child component **\**. If both of them exist, only the content in **\** is displayed. diff --git a/en/application-dev/reference/arkui-ts/ts-universal-attributes-text-style.md b/en/application-dev/reference/arkui-ts/ts-universal-attributes-text-style.md index 8330e79474..6a379ca332 100644 --- a/en/application-dev/reference/arkui-ts/ts-universal-attributes-text-style.md +++ b/en/application-dev/reference/arkui-ts/ts-universal-attributes-text-style.md @@ -14,9 +14,9 @@ The text style attributes set the style for text in a component. | Name | Type | Description | | -----------| ---------------------------------------- | ------------------------------------ | | fontColor | [ResourceColor](ts-types.md#resourcecolor) | Font color. | -| fontSize | [Length](ts-types.md#length) | Font size. If the value is of the number type, the unit fp is used. The default font size is 10. This attribute cannot be set in percentage. | +| fontSize | [Length](ts-types.md#length) | Font size. If the value is of the number type, the unit fp is used. The default font size is 16. This attribute cannot be set in percentage. | | fontStyle | [FontStyle](ts-appendix-enums.md#fontstyle) | Font style.
Default value: **FontStyle.Normal** | -| fontWeight | number \| [FontWeight](ts-appendix-enums.md#fontweight) \| string | Font weight. For the number type, the value ranges from 100 to 900, at an interval of 100. The default value is **400**. A larger value indicates a larger font weight. The string type supports only the string of the number type, for example, **400**, **"bold"**, **"bolder"**, **"lighter"**, **"regular"**, and **"medium"**, which correspond to the enumerated values in FontWeight.
Default value: **FontWeight.Normal** | +| fontWeight | number \| [FontWeight](ts-appendix-enums.md#fontweight) \| string | Font weight. For the number type, the value ranges from 100 to 900, at an interval of 100. The default value is **400**. A larger value indicates a larger font weight. The string type supports only the string of the number type, for example, **400**, **"bold"**, **"bolder"**, **"lighter"**, **"regular"**, and **"medium"**, which correspond to the enumerated values in **FontWeight**.
Default value: **FontWeight.Normal** | | fontFamily | string \| [Resource](ts-types.md#resource) | Font family.
Default value: **'HarmonyOS Sans'**
Currently, only the default font is supported. | -- GitLab