From 8d44154c6c491dd69ee5e3687655a5f1ecf9a6e0 Mon Sep 17 00:00:00 2001 From: luoying_ace_admin Date: Mon, 8 Aug 2022 14:59:23 +0800 Subject: [PATCH] revise api Signed-off-by: luoying_ace_admin Change-Id: I4903503a5ede70144c1cfce78b6fd3a6c3c485a5 --- api/@internal/component/ets/enums.d.ts | 14 ++++++++++---- api/@internal/component/ets/image.d.ts | 6 ++++++ api/@internal/component/ets/search.d.ts | 2 +- api/@internal/component/ets/text.d.ts | 2 +- api/@internal/component/ets/text_area.d.ts | 2 +- api/@internal/component/ets/text_input.d.ts | 2 +- 6 files changed, 20 insertions(+), 8 deletions(-) diff --git a/api/@internal/component/ets/enums.d.ts b/api/@internal/component/ets/enums.d.ts index 461e6ff5a7..ad99b0f8c3 100644 --- a/api/@internal/component/ets/enums.d.ts +++ b/api/@internal/component/ets/enums.d.ts @@ -1445,22 +1445,28 @@ declare enum Placement { * * @since 9 */ -declare enum CopyOption { +declare enum CopyOptions { + /** + * Not allow share. + * @since 9 + */ + None = 0, + /** * Share in app. * @since 9 */ - InApp = 0, + InApp = 1, /** * Share in local device. * @since 9 */ - LocalDevice = 1, + LocalDevice = 2, /** * Share cross device. * @since 9 */ - CrossDevice = 2, + CrossDevice = 3, } diff --git a/api/@internal/component/ets/image.d.ts b/api/@internal/component/ets/image.d.ts index 49465ff58c..79c52f1847 100644 --- a/api/@internal/component/ets/image.d.ts +++ b/api/@internal/component/ets/image.d.ts @@ -142,6 +142,12 @@ declare class ImageAttribute extends CommonMethod { */ syncLoad(value: boolean): ImageAttribute; + /** + * Allow replication. + * @since 9 + */ + copyOption(value: CopyOptions): ImageAttribute; + /** * This callback is triggered when an image is successfully loaded. * The size of the image source that is successfully loaded is returned, in pixels. diff --git a/api/@internal/component/ets/search.d.ts b/api/@internal/component/ets/search.d.ts index e9ebc0e017..2713900664 100644 --- a/api/@internal/component/ets/search.d.ts +++ b/api/@internal/component/ets/search.d.ts @@ -105,7 +105,7 @@ declare class SearchAttribute extends CommonMethod { * Called when the copy option is set. * @since 9 */ - copyOption(value: boolean | CopyOption): SearchAttribute; + copyOption(value: CopyOptions): SearchAttribute; /** * Called when the text align is set. diff --git a/api/@internal/component/ets/text.d.ts b/api/@internal/component/ets/text.d.ts index 9bc74a09c3..9296f3f19b 100644 --- a/api/@internal/component/ets/text.d.ts +++ b/api/@internal/component/ets/text.d.ts @@ -123,7 +123,7 @@ declare class TextAttribute extends CommonMethod { * Allow replication. * @since 9 */ - copyOption(value: boolean | CopyOption): TextAttribute; + copyOption(value: CopyOptions): TextAttribute; } declare const TextInstance: TextAttribute; diff --git a/api/@internal/component/ets/text_area.d.ts b/api/@internal/component/ets/text_area.d.ts index 9fb110f19f..ea6f4b5de3 100644 --- a/api/@internal/component/ets/text_area.d.ts +++ b/api/@internal/component/ets/text_area.d.ts @@ -159,7 +159,7 @@ declare class TextAreaAttribute extends CommonMethod { * Called when the copy option is set. * @since 9 */ - copyOption(value: boolean | CopyOption): TextAreaAttribute; + copyOption(value: CopyOptions): TextAreaAttribute; } declare const TextArea: TextAreaInterface; diff --git a/api/@internal/component/ets/text_input.d.ts b/api/@internal/component/ets/text_input.d.ts index c8501c2c14..03ec1200f5 100644 --- a/api/@internal/component/ets/text_input.d.ts +++ b/api/@internal/component/ets/text_input.d.ts @@ -262,7 +262,7 @@ declare class TextInputAttribute extends CommonMethod { * Called when the copy option is set. * @since 9 */ - copyOption(value: boolean | CopyOption): TextInputAttribute; + copyOption(value: CopyOptions): TextInputAttribute; /** * Called when the password show/hide icon is set. -- Gitee