From 1cc221cf860330e0e45a6cdeb0f419814e2a440e Mon Sep 17 00:00:00 2001 From: liuyongkai2 Date: Sat, 6 Sep 2025 16:55:09 +0800 Subject: [PATCH] =?UTF-8?q?AI=E5=88=86=E8=AF=8D=E9=AB=98=E4=BA=AE=E5=92=8C?= =?UTF-8?q?AI=E8=8F=9C=E5=8D=95=E8=A7=A3=E8=80=A6?= 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 | 11 +++++++++++ api/@internal/component/ets/text.d.ts | 11 +++++++++++ api/@internal/component/ets/text_area.d.ts | 11 +++++++++++ api/@internal/component/ets/text_common.d.ts | 20 ++++++++++++++++++++ api/@internal/component/ets/text_input.d.ts | 11 +++++++++++ 5 files changed, 64 insertions(+) diff --git a/api/@internal/component/ets/search.d.ts b/api/@internal/component/ets/search.d.ts index 7ce15eae7e..0d4d102025 100644 --- a/api/@internal/component/ets/search.d.ts +++ b/api/@internal/component/ets/search.d.ts @@ -2115,6 +2115,17 @@ declare class SearchAttribute extends CommonMethod { */ enablePreviewText(enable: boolean): SearchAttribute; + /** + * Enable selected data detector. + * + * @param { SelectDataDetectorConfig | boolean } + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 21 + */ + enableSelectedDataDetector(config: SelectDataDetectorConfig | boolean): SearchAttribute + /** * Enable or disable haptic feedback. * diff --git a/api/@internal/component/ets/text.d.ts b/api/@internal/component/ets/text.d.ts index 7f498aacce..c3681497f1 100644 --- a/api/@internal/component/ets/text.d.ts +++ b/api/@internal/component/ets/text.d.ts @@ -1027,6 +1027,17 @@ declare class TextAttribute extends CommonMethod { * @arkts 1.1&1.2 */ decoration(value: DecorationStyleInterface): TextAttribute; + + /** + * Enable selected data detector. + * + * @param { SelectDataDetectorConfig | boolean } + * @returns { TextAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 21 + */ + enableSelectedDataDetector(config: SelectDataDetectorConfig | boolean): TextAttribute /** * Called when the distance between text fonts is set. diff --git a/api/@internal/component/ets/text_area.d.ts b/api/@internal/component/ets/text_area.d.ts index 5367dcb957..4035e44de2 100644 --- a/api/@internal/component/ets/text_area.d.ts +++ b/api/@internal/component/ets/text_area.d.ts @@ -960,6 +960,17 @@ declare class TextAreaAttribute extends CommonMethod { */ selectedBackgroundColor(value: ResourceColor): TextAreaAttribute; + /** + * Enable selected data detector. + * + * @param { SelectDataDetectorConfig | boolean } + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 21 + */ + enableSelectedDataDetector(config: SelectDataDetectorConfig | boolean): TextAreaAttribute + /** * Called when submitted. * diff --git a/api/@internal/component/ets/text_common.d.ts b/api/@internal/component/ets/text_common.d.ts index 2f6b2461ae..726abccc51 100644 --- a/api/@internal/component/ets/text_common.d.ts +++ b/api/@internal/component/ets/text_common.d.ts @@ -818,6 +818,26 @@ interface StyledStringChangeValue { previewText?: StyledString; } +/** + * Text selected data detector config. + * + * @interface SelectDataDetectorConfig + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 21 + */ +declare interface SelectDataDetectorConfig { + /** + * Text data detector types. + * + * @type { TextDataDetectorType[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 21 + */ + types: TextDataDetectorType[]; +} + /** * Define the LayoutManager for querying layout information. * diff --git a/api/@internal/component/ets/text_input.d.ts b/api/@internal/component/ets/text_input.d.ts index a4a7cf14ad..c838941dff 100644 --- a/api/@internal/component/ets/text_input.d.ts +++ b/api/@internal/component/ets/text_input.d.ts @@ -2814,6 +2814,17 @@ declare class TextInputAttribute extends CommonMethod { */ barState(value: BarState): TextInputAttribute; + /** + * Enable selected data detector. + * + * @param { SelectDataDetectorConfig | boolean } + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 21 + */ + enableSelectedDataDetector(config: SelectDataDetectorConfig | boolean): TextInputAttribute + /** * Define max lines of the text input. * -- Gitee