From ecf0a6d9feb563385cd779cb178526553918b9ac Mon Sep 17 00:00:00 2001 From: liuyongkai2 Date: Thu, 4 Sep 2025 17:54:47 +0800 Subject: [PATCH] =?UTF-8?q?showCounter=E8=BE=93=E5=85=A5=E6=A1=86=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E6=94=AF=E6=8C=81=E8=AE=BE=E7=BD=AE=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liuyongkai2 --- api/@internal/component/ets/text_area.d.ts | 70 +++++++++++++++++++++- 1 file changed, 69 insertions(+), 1 deletion(-) diff --git a/api/@internal/component/ets/text_area.d.ts b/api/@internal/component/ets/text_area.d.ts index 5367dcb957..ec7fe495a7 100644 --- a/api/@internal/component/ets/text_area.d.ts +++ b/api/@internal/component/ets/text_area.d.ts @@ -1699,7 +1699,7 @@ declare class TextAreaAttribute extends CommonMethod { * @arkts 1.1&1.2 */ customKeyboard(value: CustomBuilder, options?: KeyboardOptions): TextAreaAttribute; - + /** * Called when the text decoration of the text is set. * @@ -2121,6 +2121,74 @@ declare class TextAreaAttribute extends CommonMethod { */ declare const TextArea: TextAreaInterface; +/** + * Define the ratio of characters entered by the the percentage of InputCounterOptions. + * + * @interface InputCounterOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ +declare interface InputCounterOptions { + /** + * It is the numerator bit of the percentage and used as a threshold. If the number of characters input + * reaches the maximum number of characters multiplied by this threshold, the counter is displayed. + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * It is the numerator bit of the percentage and used as a threshold. If the number of characters input + * reaches the maximum number of characters multiplied by this threshold, the counter is displayed. + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + thresholdPercentage?: number; + /** + * If the current input character count reaches the maximum character count and users want to exceed the + * normal input, the border will turn red. If this parameter is true, the red border displayed. + * @type { ?boolean } + * @default true + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * If the current input character count reaches the maximum character count and users want to exceed the + * normal input, the border will turn red. If this parameter is true, the red border displayed. + * @type { ?boolean } + * @default true + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + highlightBorder?: boolean; + /** + * It is the color of counter when textField hasn't wanted to exceed the maximum character count. + * @type { ?Color } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 21 + */ + counterTextColor?: Color + /** + * It is the color of counter when textField wants to exceed the maximum character count. + * @type { ?Color } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 21 + */ + counterTextOverflowColor?: Color +} + /** * Defines TextArea Component instance. * -- Gitee