diff --git a/api/@internal/component/ets/index-full.d.ts b/api/@internal/component/ets/index-full.d.ts index aaadf3ba2de71619662f6f389f30d2d2ac9a82a2..85abad3e47bf7fc15895bc09c2cdb7140322d481 100644 --- a/api/@internal/component/ets/index-full.d.ts +++ b/api/@internal/component/ets/index-full.d.ts @@ -51,6 +51,7 @@ /// /// /// +/// /// /// /// diff --git a/api/@internal/component/ets/list.d.ts b/api/@internal/component/ets/list.d.ts index 9d12aef34008d36787354f2044b7f53b3bd3ccf9..61c33282774d73ee9f71bc321d3abfcdaecc2755 100644 --- a/api/@internal/component/ets/list.d.ts +++ b/api/@internal/component/ets/list.d.ts @@ -61,6 +61,30 @@ declare enum ListItemAlign { End, } +/** + * Declare item group sticky style. + * @since 9 + */ + declare enum StickyStyle { + /** + * The header and footer of each item group will not be pinned. + * @since 9 + */ + None = 0, + + /** + * The header of each item group will be pinned. + * @since 9 + */ + Header = 1, + + /** + * The footer of each item group will be pinned. + * @since 9 + */ + Footer = 2, +} + /** * The list interface is extended. * @since 7 @@ -144,6 +168,12 @@ declare class ListAttribute extends CommonMethod { */ chainAnimation(value: boolean): ListAttribute; + /** + * Called when header or footer of item group will be pinned. + * @since 9 + */ + sticky(value: StickyStyle): ListAttribute; + /** * Called when the offset and status callback of the slide are set. * @since 7 diff --git a/api/@internal/component/ets/list_item_group.d.ts b/api/@internal/component/ets/list_item_group.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6914c606ce942197b419d6794065efb632ad394b --- /dev/null +++ b/api/@internal/component/ets/list_item_group.d.ts @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Defines the list item group options. + * @since 9 + */ +declare interface ListItemGroupOptions { + /** + * Describes the ListItemGroup header. + * @since 9 + */ + header?: CustomBuilder; + + /** + * Describes the ListItemGroup footer. + * @since 9 + */ + footer?: CustomBuilder; + + /** + * Describes the ListItemGroup space. + * @since 9 + */ + space?: number | string; +} + +/** + * Defines the ListItemGroup component + * @since 9 + */ +interface ListItemGroupInterface { + /** + * Called when interface is called. + * @since 9 + */ + (options?: ListItemGroupOptions): ListItemGroupAttribute; +} + +/** + * Defines the item group attibute functions. + * @since 9 + */ +declare class ListItemGroupAttribute extends CommonMethod { + /** + * Called when the ListItemGroup split line style is set. + * @since 9 + */ + divider( + value: { + strokeWidth: Length; + color?: ResourceColor; + startMargin?: Length; + endMargin?: Length; + } | null, + ): ListItemGroupAttribute; +} + +/** + * @since 9 + */ +declare const ListItemGroupInstance: ListItemGroupAttribute; +declare const ListItemGroup: ListItemGroupInterface; + \ No newline at end of file