From 185786b4acd1d2e3d7985f4ea30dc7be06e9d184 Mon Sep 17 00:00:00 2001 From: xia-bubai Date: Fri, 11 Jul 2025 18:32:23 +0800 Subject: [PATCH] sync from 0328 to 0702 Signed-off-by: xia-bubai --- api/@internal/component/ets/paste_button.d.ts | 70 ++++--- api/@internal/component/ets/save_button.d.ts | 120 ++++++++---- .../component/ets/security_component.d.ts | 181 ++++++++++++------ 3 files changed, 251 insertions(+), 120 deletions(-) diff --git a/api/@internal/component/ets/paste_button.d.ts b/api/@internal/component/ets/paste_button.d.ts index e50c0fdb65..97927fefc0 100644 --- a/api/@internal/component/ets/paste_button.d.ts +++ b/api/@internal/component/ets/paste_button.d.ts @@ -18,20 +18,28 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ButtonType } from './button'; +import { ClickEvent } from './common'; +import { SecurityComponentMethod } from './securityComponent'; +import { BusinessError } from '../../@ohos.base' +/*** endif */ + /** * Enumerates the icon styles. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ /** * Enumerates the icon styles. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum PasteIconStyle { /** @@ -45,7 +53,8 @@ declare enum PasteIconStyle { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ LINES = 0 } @@ -53,17 +62,18 @@ declare enum PasteIconStyle { /** * Enumerates the text that can be displayed on the paste button. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ /** * Enumerates the text that can be displayed on the paste button. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum PasteDescription { /** @@ -77,7 +87,8 @@ declare enum PasteDescription { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ PASTE = 0 } @@ -95,7 +106,8 @@ declare enum PasteDescription { * @interface PasteButtonOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PasteButtonOptions { /** @@ -111,7 +123,8 @@ declare interface PasteButtonOptions { * @type { ?PasteIconStyle } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ icon?: PasteIconStyle; @@ -128,7 +141,8 @@ declare interface PasteButtonOptions { * @type { ?PasteDescription } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ text?: PasteDescription; @@ -145,7 +159,8 @@ declare interface PasteButtonOptions { * @type { ?ButtonType } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ buttonType?: ButtonType; } @@ -153,17 +168,18 @@ declare interface PasteButtonOptions { /** * Enumerates the click event results of the paste button. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ /** * Enumerates the click event results of the paste button. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum PasteButtonOnClickResult { /** @@ -177,7 +193,8 @@ declare enum PasteButtonOnClickResult { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ SUCCESS = 0, @@ -192,7 +209,8 @@ declare enum PasteButtonOnClickResult { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ TEMPORARY_AUTHORIZATION_FAILED = 1 } @@ -210,7 +228,8 @@ declare enum PasteButtonOnClickResult { * @interface PasteButtonInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface PasteButtonInterface { /** @@ -226,7 +245,8 @@ interface PasteButtonInterface { * @returns { PasteButtonAttribute } Returns the attribute of the paste button. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ (): PasteButtonAttribute; @@ -247,7 +267,8 @@ interface PasteButtonInterface { * @returns { PasteButtonAttribute } Returns the attribute of the paste button. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ (options: PasteButtonOptions): PasteButtonAttribute; } @@ -261,7 +282,8 @@ interface PasteButtonInterface { * @param { BusinessError } [error] - The error code and message of click event. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ type PasteButtonCallback = (event: ClickEvent, result: PasteButtonOnClickResult, error?: BusinessError) => void; @@ -278,7 +300,8 @@ type PasteButtonCallback = (event: ClickEvent, result: PasteButtonOnClickResult, * @extends SecurityComponentMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class PasteButtonAttribute extends SecurityComponentMethod { /** @@ -305,7 +328,8 @@ declare class PasteButtonAttribute extends SecurityComponentMethod } [error] - The error code and message of click event. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ type SaveButtonCallback = (event: ClickEvent, result: SaveButtonOnClickResult, error?: BusinessError) => void; @@ -452,7 +488,8 @@ type SaveButtonCallback = (event: ClickEvent, result: SaveButtonOnClickResult, e * @extends SecurityComponentMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class SaveButtonAttribute extends SecurityComponentMethod { /** @@ -479,7 +516,8 @@ declare class SaveButtonAttribute extends SecurityComponentMethod { /** @@ -94,7 +105,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ iconSize(value: Dimension): T; @@ -113,7 +125,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ layoutDirection(value: SecurityComponentLayoutDirection): T; @@ -132,7 +145,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ position(value: Position): T; @@ -153,7 +167,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ markAnchor(value: Position): T; @@ -187,7 +202,8 @@ declare class SecurityComponentMethod { * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ offset(value: Position | Edges | LocalizedEdges): T; @@ -206,7 +222,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ fontSize(value: Dimension): T; @@ -225,14 +242,15 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ fontStyle(value: FontStyle): T; /** * Font weight of the inner text. * - * @param { number | FontWeight | string } value - Indicates the font weight of the text in the security component. + * @param { int | FontWeight | string } value - Indicates the font weight of the text in the security component. * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 @@ -240,7 +258,7 @@ declare class SecurityComponentMethod { /** * Font weight of the inner text. * - * @param { number | FontWeight | string } value - Indicates the font weight of the text in the security component. + * @param { int | FontWeight | string } value - Indicates the font weight of the text in the security component. * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice @@ -249,13 +267,25 @@ declare class SecurityComponentMethod { /** * Font weight of the inner text. * - * @param { number | FontWeight | string | Resource } value - Indicates the font weight of the text in the security component. + * @param { int | FontWeight | string | Resource } value - Indicates the font weight of the text in the security component. + * @returns { T } Returns the attribute of the security component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + fontWeight(value: int | FontWeight | string | Resource): T; + + /** + * Font weight of the inner text. + * + * @param { int | FontWeight | string } value - Indicates the font weight of the text in the security component. * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 20 + * @arkts 1.2 */ - fontWeight(value: number | FontWeight | string | Resource): T; + fontWeight(value: int | FontWeight | string): T; /** * Font family of the inner text. @@ -272,7 +302,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ fontFamily(value: string | Resource): T; @@ -291,7 +322,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ fontColor(value: ResourceColor): T; @@ -310,7 +342,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ iconColor(value: ResourceColor): T; @@ -329,7 +362,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor(value: ResourceColor): T; @@ -348,7 +382,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ borderStyle(value: BorderStyle): T; @@ -367,7 +402,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ borderWidth(value: Dimension): T; @@ -386,7 +422,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ borderColor(value: ResourceColor): T; @@ -405,7 +442,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ borderRadius(value: Dimension): T; @@ -416,7 +454,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ borderRadius(radius: Dimension | BorderRadiuses): T; @@ -435,7 +474,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ padding(value: Padding | Dimension): T; @@ -454,7 +494,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ textIconSpace(value: Dimension): T; @@ -465,7 +506,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 * @test */ key(value: string): T; @@ -485,7 +527,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ width(value: Length): T; @@ -504,7 +547,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ height(value: Length): T; @@ -523,7 +567,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ size(value: SizeOptions): T; @@ -544,7 +589,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ constraintSize(value: ConstraintSizeOptions): T; @@ -555,7 +601,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ align(alignType: Alignment): T; @@ -566,7 +613,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ alignRules(alignRule: AlignRuleOption): T; @@ -577,7 +625,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ alignRules(alignRule: LocalizedAlignRuleOptions): T; @@ -588,7 +637,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ id(description: string): T; @@ -600,36 +650,39 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ chainMode(direction: Axis, style: ChainStyle): T; /** * Sets the minimum font scale factor for text. * - * @param { number | Resource } scale Minimum font scale factor to set. + * @param { double | Resource } scale Minimum font scale factor to set. * @returns { T } Returns the attributes of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - minFontScale(scale: number | Resource): T; + minFontScale(scale: double | Resource): T; /** * Sets the maximum font scale factor for text. * - * @param { number | Resource } scale Maximum font scale factor to set. + * @param { double | Resource } scale Maximum font scale factor to set. * @returns { T } Returns the attributes of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - maxFontScale(scale: number | Resource): T; + maxFontScale(scale: double | Resource): T; - /** + /** * Called when the maximum number of lines of text is set. * - * @param { number } line + * @param { int } line * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice @@ -638,35 +691,49 @@ declare class SecurityComponentMethod { /** * Called when the maximum number of lines of text is set. * - * @param { number | Resource } line + * @param { int | Resource } line + * @returns { T } Returns the attribute of the security component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + maxLines(line: int | Resource): T; + + /** + * Called when the maximum number of lines of text is set. + * + * @param { int } line * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 20 + * @arkts 1.2 */ - maxLines(line: number | Resource): T; + maxLines(line: int): T; /** * Called when the minimum font size of the font is set. * - * @param { number | string | Resource } minSize + * @param { double | string | Resource } minSize * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - minFontSize(minSize: number | string | Resource): T; + minFontSize(minSize: double | string | Resource): T; /** * Called when the maximum font size of the font is set. * - * @param { number | string | Resource } maxSize + * @param { double | string | Resource } maxSize * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - maxFontSize(maxSize: number | string | Resource): T; + maxFontSize(maxSize: double | string | Resource): T; /** * Called when the height adaptive policy is set. @@ -675,7 +742,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ heightAdaptivePolicy(policy: TextHeightAdaptivePolicy): T; @@ -687,7 +755,8 @@ declare class SecurityComponentMethod { * @returns { T } Returns the attribute of the security component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ enabled(respond: boolean): T; } -- Gitee