| timeZoneOffset | number | No | Time zone offset| Sets the time zone offset. The value range is [-14, 12], indicating UTC+12 to UTC-12. A negative value indicates Eastern Standard Time, and a positive value indicates Western Standard Time. For example, **-8** indicates UTC+8. For countries or regions crossing the International Date Line, use -13 (UTC+13) and -14 (UTC+14) to ensure consistent time within the entire country or region. |
| timeZoneOffset | number | No | Time zone offset| Sets the time zone offset. The value range is [-14, 12], indicating UTC+12 to UTC-12. A negative value indicates Eastern Standard Time, and a positive value indicates Western Standard Time. For example, **-8** indicates UTC+8. For countries or regions crossing the International Date Line, use -13 (UTC+13) and -14 (UTC+14) to ensure consistent time within the entire country or region. |
| contorller | [TextClockContorller](#TextClockController) | No| null | Binds a controller to control the status of the **<TextClock\>** component. |
| contorller | [TextClockContorller](#textclockcontroller) | No| null | Binds a controller to control the status of the **<TextClock\>** component. |
## Attributes
## Attributes
In addition to the [universal attributes](ts-universal-attributes-size.md), the following attributes are supported.
| format | string | 'hhmmss' | Time format, for example, **yyyy/mm/dd** or **yyyy-mm-dd**. Supported time format strings: <ul><li>yyyy (year)</li><li>mm (two-letter abbreviated month name)</li><li>mmm (three-letter abbreviated month name)</li><li>mmmm (full month name)</li><li>dd (two-letter abbreviated day of the week)</li><li>ddd (three-letter abbreviated day of the week)</li><li>dddd (full day of the week)</li><li>HH (24-hour format)</li><li>hh (12-hour format)</li><li>MM/mm (minute)</li><li>SS/ss (second)</li></ul>|
| format | string | 'hhmmss' | Time format, for example, **yyyy/mm/dd** or **yyyy-mm-dd**. Supported time format strings: <ul><li>yyyy (year)</li><li>mm (two-letter abbreviated month name)</li><li>mmm (three-letter abbreviated month name)</li><li>mmmm (full month name)</li><li>dd (two-letter abbreviated day of the week)</li><li>ddd (three-letter abbreviated day of the week)</li><li>dddd (full day of the week)</li><li>HH (24-hour format)</li><li>hh (12-hour format)</li><li>MM/mm (minute)</li><li>SS/ss (second)</li></ul>|
## Events
## Events
In addition to the [universal events](ts-universal-events-click.md), the following attributes are supported.
| onDateChange(event: (value: number) => void) | Triggered when the time changes in seconds at minimum.<br>**value**: Unix time stamp, which is the number of milliseconds that have elapsed since the Unix epoch. |
| onDateChange(event: (value: number) => void) | Triggered when the time changes in seconds at minimum.<br>**value**: Unix time stamp, which is the number of milliseconds that have elapsed since the Unix epoch. |
...
@@ -42,7 +46,7 @@ Controller of the **<TextClock\>** component, which can be bound to the componen
...
@@ -42,7 +46,7 @@ Controller of the **<TextClock\>** component, which can be bound to the componen
@@ -30,7 +30,7 @@ Use the following attributes to bind gesture recognition to a component. When a
...
@@ -30,7 +30,7 @@ Use the following attributes to bind gesture recognition to a component. When a
| IgnoreInternal | The gestures of child components are masked. Only the gestures of the current component are recognized.<br/>> ![icon-note.gif](public_sys-resources/icon-note.gif)**NOTE**<br/>> However, the built-in gestures of the child components are not masked. For example, when the child component is a **<List>** component, the built-in sliding gestures can still be triggered. |
| IgnoreInternal | The gestures of child components are masked. Only the gestures of the current component are recognized.<br/>> ![icon-note.gif](public_sys-resources/icon-note.gif)**NOTE**<br/>> However, the built-in gestures of the child components are not masked. For example, when the child component is a **<List>** component, the built-in sliding gestures can still be triggered. |
- Gesture types
- GestureType enums
| Name | Description |
| Name | Description |
| -------- | -------- |
| -------- | -------- |
| TapGesture | Tap gesture, which can be a single-tap or multi-tap gesture. |
| TapGesture | Tap gesture, which can be a single-tap or multi-tap gesture. |
...
@@ -61,6 +61,7 @@ The component uses the **gesture** method to bind the gesture object and uses th
...
@@ -61,6 +61,7 @@ The component uses the **gesture** method to bind the gesture object and uses th
You can use @Preview to decorate a custom component so that it can be previewed in DevEco Studio. This component is created and displayed when the page where it is located is loaded.
You can use @Preview to decorate a custom component so that it can be previewed in DevEco Studio. This component is created and displayed when the page where it is located is loaded.