From 6165d96fbd8a6776e62c7e6993a94e2f919e2632 Mon Sep 17 00:00:00 2001 From: liuyongkai2 Date: Fri, 5 Sep 2025 19:53:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E6=9C=AC=E8=BE=93=E5=85=A5=E6=A1=86?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E8=87=AA=E5=AE=9A=E4=B9=89=E9=94=AE=E7=9B=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liuyongkai2 --- api/@internal/component/ets/search.d.ts | 27 +++++++++++++++++++-- api/@internal/component/ets/text_area.d.ts | 27 +++++++++++++++++++-- api/@internal/component/ets/text_input.d.ts | 25 ++++++++++++++++++- 3 files changed, 74 insertions(+), 5 deletions(-) diff --git a/api/@internal/component/ets/search.d.ts b/api/@internal/component/ets/search.d.ts index 7ce15eae7e..f6d9dac4ca 100644 --- a/api/@internal/component/ets/search.d.ts +++ b/api/@internal/component/ets/search.d.ts @@ -1882,7 +1882,7 @@ declare class SearchAttribute extends CommonMethod { */ /** * Define custom keyboard. - * + * *

NOTE: *
When a custom keyboard is set, activating the text box opens the specified custom component, * instead of the system input method. @@ -1906,7 +1906,30 @@ declare class SearchAttribute extends CommonMethod { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - customKeyboard(value: CustomBuilder, options?: KeyboardOptions): SearchAttribute; + /** + * Define custom keyboard. + * + *

NOTE: + *
When a custom keyboard is set, activating the text box opens the specified custom component, + * instead of the system input method. + *
The custom keyboard's height can be set through the height attribute of the custom component's root node, + * and its width is fixed at the default value. + *
The custom keyboard is presented by overlaying the original screen. + *
It is not compressed or lifted if avoid mode is not enabled or avoidance is not needed for the text box. + *
The custom keyboard cannot obtain the focus, but it blocks gesture events. + *
By default, the custom keyboard is closed when the input component loses the focus. + *
You can also use the stopEditing API to close the keyboard. + *
When a custom keyboard is set, the text box does not support camera input, even when the device supports. + *
When setting a custom keyboard, you can bind the onKeyPrelme event to prevent input from the physical keyboard. + *

+ * + * @param { CustomBuilder | ComponentContent | undefined } value - Set up a custom keyboard of Search + * @param { KeyboardOptions | undefined } [options] - Indicates the custom keyboard options of Search + * @returns { SearchAttribute } returns the instance of the SearchAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 21 + */ + default customKeyboard(value: CustomBuilder | ComponentContent | undefined, options?: KeyboardOptions | undefined): this; /** * Called when the text decoration of the text is set. diff --git a/api/@internal/component/ets/text_area.d.ts b/api/@internal/component/ets/text_area.d.ts index 5367dcb957..e71d52009d 100644 --- a/api/@internal/component/ets/text_area.d.ts +++ b/api/@internal/component/ets/text_area.d.ts @@ -1674,7 +1674,7 @@ declare class TextAreaAttribute extends CommonMethod { */ /** * Define custom keyboard of the text area. - * + * *

NOTE: *
When a custom keyboard is set, activating the text box opens the specified custom component, * instead of the system input method. @@ -1698,7 +1698,30 @@ declare class TextAreaAttribute extends CommonMethod { * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - customKeyboard(value: CustomBuilder, options?: KeyboardOptions): TextAreaAttribute; + /** + * Define custom keyboard of the text area. + * + *

NOTE: + *
When a custom keyboard is set, activating the text box opens the specified custom component, + * instead of the system input method. + *
The custom keyboard's height can be set through the height attribute of the custom component's root node, + * and its width is fixed at the default value. + *
The custom keyboard is presented by overlaying the original screen, + * which is not compressed or lifted if avoid mode is not enabled or avoidance is not needed for the text box. + *
The custom keyboard cannot obtain the focus, but it blocks gesture events. + *
By default, the custom keyboard is closed when the input component loses the focus. + *
You can also use the TextAreaController.stopEditing API to close the keyboard. + *
When a custom keyboard is set, the text box does not support camera input, even when the device supports. + *
When setting a custom keyboard, you can bind the onKeyPrelme event to prevent input from the physical keyboard. + *

+ * + * @param { CustomBuilder | ComponentContent | undefined } value - Set up a custom keyboard of TextArea + * @param { KeyboardOptions | undefined } [options] - Indicates the custom keyboard options of TextArea + * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 21 + */ + default customKeyboard(value: CustomBuilder | ComponentContent | undefined, options?: KeyboardOptions | undefined): this; /** * Called when the text decoration of the text is set. diff --git a/api/@internal/component/ets/text_input.d.ts b/api/@internal/component/ets/text_input.d.ts index a4a7cf14ad..05f229b3fd 100644 --- a/api/@internal/component/ets/text_input.d.ts +++ b/api/@internal/component/ets/text_input.d.ts @@ -2920,7 +2920,30 @@ declare class TextInputAttribute extends CommonMethod { * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - customKeyboard(value: CustomBuilder, options?: KeyboardOptions): TextInputAttribute; + /** + * Define custom keyboard of the text input. + * + * *

NOTE: + *
When a custom keyboard is set, activating the text box opens the specified custom component, + * instead of the system input method. + *
The custom keyboard's height can be set through the height attribute of the custom component's root node, + * and its width is fixed at the default value. + *
The custom keyboard is presented by overlaying the original screen, + * which is not compressed or lifted if avoid mode is not enabled or avoidance is not needed for the text box. + *
The custom keyboard cannot obtain the focus, but it blocks gesture events. + *
By default, the custom keyboard is closed when the input component loses the focus. + *
You can also use the TextInputController.stopEditing API to close the keyboard. + *
When a custom keyboard is set, the text box does not support camera input, even when the device supports. + *
When setting a custom keyboard, you can bind the onKeyPrelme event to prevent input from the physical keyboard. + *

+ * + * @param { CustomBuilder | ComponentContent | undefined } value - Set up a custom keyboard of TextInput + * @param { KeyboardOptions | undefined } [options] - Indicates the custom keyboard options of TextInput + * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 21 + */ + default customKeyboard(value: CustomBuilder | ComponentContent | undefined, options?: KeyboardOptions | undefined): this; /** * Show the counter when the number of characters entered exceeds the threshold through InputCounterOptions. -- Gitee