From a25004b6d0afc62420ebb0c37beaeb9ce9f0e92b Mon Sep 17 00:00:00 2001 From: yaoyuchi Date: Thu, 17 Feb 2022 14:45:49 +0800 Subject: [PATCH] add_textclock_controller Signed-off-by: yaoyuchi --- api/@internal/component/ets/text_clock.d.ts | 36 ++++++++++++++------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/api/@internal/component/ets/text_clock.d.ts b/api/@internal/component/ets/text_clock.d.ts index 5094b8a955..76f417bf90 100644 --- a/api/@internal/component/ets/text_clock.d.ts +++ b/api/@internal/component/ets/text_clock.d.ts @@ -13,6 +13,28 @@ * limitations under the License. */ +/** + * Provides a way to control the textclock status. + * @since 8 + */ +export declare class TextClockController { + /** + * constructor. + * @since 8 + */ + constructor(); + /** + * Provides a start event for textclock. + * @since 8 + */ + start(); + /** + * Provides a stop event for textclock. + * @since 8 + */ + stop(); +} + /** * TextClock component, which provides the text clock capability. * @since 8 @@ -25,7 +47,7 @@ interface TextClockInterface { * Where a negative value indicates the eastern time zone, for example, -8. * @since 8 */ - (options?: {hourswest?: number}): TextClockAttribute; + (options?: {timeZoneOffset?: number, controller?: TextClockController}): TextClockAttribute; } declare class TextClockAttribute extends CommonMethod { @@ -48,21 +70,13 @@ declare class TextClockAttribute extends CommonMethod { debugLine(value: string): TextClockAttribute; /** - * set display time format,such as "yyyy/mm/dd"、“yyyy-mm-dd". + * set display time format,such as "yyyy/mm/dd","yyyy-mm-dd". * support time format:yyyy,mm,mmm(English month abbreviation),mmmm(Full name of the month in English), * dd,ddd(English Week abbreviation),dddd(Full name of the week in English), - * HH/hh(24-hour clock/12-hour clock),MM/mm(minute),SS/ss(second) + * HH/hh(24-hour clock/12-hour clock),MM/mm(minute),SS/ss(second). * @since 8 */ format(value: string): TextClockAttribute; - /** - * sets the start and stop of the text clock. You can customize the start and stop of the text clock. - * when the value is true, the time of the current custom style is displayed. - * the time is recalled every second. - * if the value is false, the clock stops updating the time and stops updating the callback. - * @since 8 - */ - status(value: boolean): TextClockAttribute; /** * Provides a date change callback. * The callback parameter is Unix Time Stamp, -- Gitee