From 0de465ecc1c2567429fd770c243bd100aa61cac4 Mon Sep 17 00:00:00 2001 From: wushengyu Date: Tue, 17 Jun 2025 17:17:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=BB=9A=E5=8A=A8=E7=B1=BB=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=8F=8C=E5=90=91=E7=BB=91=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wushengyu Change-Id: Iaecb7a83a3d35912f845e76bb9594c113764fb34 Signed-off-by: wushengyu --- .../component/ets/alphabet_indexer.d.ts | 31 ++++++++++++++++--- api/@internal/component/ets/list_item.d.ts | 20 ++++++++++-- api/@internal/component/ets/refresh.d.ts | 17 ++++++++-- api/@internal/component/ets/swiper.d.ts | 18 +++++++++-- api/@internal/component/ets/tabs.d.ts | 16 ++++++++-- 5 files changed, 85 insertions(+), 17 deletions(-) diff --git a/api/@internal/component/ets/alphabet_indexer.d.ts b/api/@internal/component/ets/alphabet_indexer.d.ts index c8003ca0f0..1ab96b346b 100644 --- a/api/@internal/component/ets/alphabet_indexer.d.ts +++ b/api/@internal/component/ets/alphabet_indexer.d.ts @@ -19,7 +19,7 @@ */ /*** if arkts 1.2 */ -import { CommonMethod, BlurStyle } from './common' +import { CommonMethod, BlurStyle, Bindable } from './common' import { ResourceColor, Length, Position } from './units' import { Font } from './units' /*** endif */ @@ -180,10 +180,20 @@ interface AlphabetIndexerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ selected: number; + /** + * ID of the selected item. + * + * @type { number | Bindable } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + selected: number | Bindable; } /** @@ -905,10 +915,21 @@ declare class AlphabetIndexerAttribute extends CommonMethod } index + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + selected(index: number | Bindable): AlphabetIndexerAttribute; /** * Position of the pop-up windows, relative to the midpoint of the top border of the indexer bar. diff --git a/api/@internal/component/ets/list_item.d.ts b/api/@internal/component/ets/list_item.d.ts index e5149aa593..914f1fd993 100644 --- a/api/@internal/component/ets/list_item.d.ts +++ b/api/@internal/component/ets/list_item.d.ts @@ -19,7 +19,7 @@ */ /*** if arkts 1.2 */ -import { CommonMethod } from './common'; +import { CommonMethod, Bindable } from './common'; import { CustomBuilder } from './builder' import { Length } from './units'; import { ComponentContent } from '../ComponentContent' @@ -814,11 +814,25 @@ declare class ListItemAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ selected(value: boolean): ListItemAttribute; + /** + * Called when judging whether it is selected. + * This parameter supports $$ for two-way binding of variables. + * + * @param { boolean | Bindable } value - if the listItem is selected. + * @returns { ListItemAttribute } the attribute of the listItem. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + selected(value: boolean | Bindable): ListItemAttribute; + /** * Sets the action item that appears when the list item slides in the cross axis direction of the list. * diff --git a/api/@internal/component/ets/refresh.d.ts b/api/@internal/component/ets/refresh.d.ts index 8cb9cfd8df..567a72565b 100644 --- a/api/@internal/component/ets/refresh.d.ts +++ b/api/@internal/component/ets/refresh.d.ts @@ -19,7 +19,7 @@ */ /*** if arkts 1.2 */ -import { Callback, Optional, CommonMethod } from './common' +import { Callback, Optional, CommonMethod, Bindable } from './common' import { CustomBuilder } from './builder' import { ResourceStr } from './units' import { ComponentContent } from '../ComponentContent' @@ -223,10 +223,21 @@ interface RefreshOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ refreshing: boolean; + /** + * Whether the current component is being refreshed. + * This parameter supports $$ for two-way binding of variables. + * + * @type { boolean | Bindable } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + refreshing: boolean | Bindable; /** * Distance to the top of the parent component from the component that diff --git a/api/@internal/component/ets/swiper.d.ts b/api/@internal/component/ets/swiper.d.ts index 66df0bdc03..357f1d17c8 100644 --- a/api/@internal/component/ets/swiper.d.ts +++ b/api/@internal/component/ets/swiper.d.ts @@ -20,7 +20,7 @@ /*** if arkts 1.2 */ import { IndicatorComponentController } from './indicatorcomponent'; -import { CommonMethod, Callback, ICurve, Optional } from './common'; +import { CommonMethod, Callback, ICurve, Optional, Bindable } from './common'; import { EdgeEffect, Curve, PageFlipMode } from './enums'; import { Length, LengthMetrics, VoidCallback, ResourceColor, VP, Font } from './units'; /*** endif */ @@ -1582,10 +1582,22 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ index(value: number): SwiperAttribute; + /** + * Called when the index value of the displayed subcomponent is set in the container. + * + * @param { number | Bindable } value + * @returns { SwiperAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + index(value: number | Bindable): SwiperAttribute; /** * Called when setting whether the subcomponent plays automatically. diff --git a/api/@internal/component/ets/tabs.d.ts b/api/@internal/component/ets/tabs.d.ts index 015fabcf27..1e9092cc80 100644 --- a/api/@internal/component/ets/tabs.d.ts +++ b/api/@internal/component/ets/tabs.d.ts @@ -19,7 +19,7 @@ */ /*** if arkts 1.2 */ -import { BackgroundBlurStyleOptions, BackgroundEffectOptions, BlurStyle, Callback, CommonMethod, Optional, TranslateOptions, DividerStyle } from './common'; +import { BackgroundBlurStyleOptions, BackgroundEffectOptions, BlurStyle, Callback, CommonMethod, Optional, TranslateOptions, DividerStyle, Bindable } from './common'; import { EdgeEffect, PageFlipMode } from './enums'; import { Dimension, Length, ResourceColor } from './units'; import { CommonModifier } from "../CommonModifier"; @@ -537,10 +537,20 @@ declare interface TabsOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ index?: number; + /** + * Set the index of the currently displayed tab. + * + * @type { ?(number | Bindable) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + index?: number | Bindable; /** * Set the Tabs controller. -- Gitee