!9389 【新需求】scroll支持初始偏移量

Merge pull request !9389 from honzx/0217
This commit is contained in:
openharmony_ci 2024-03-14 07:16:33 +00:00 committed by Gitee
commit ec3c744ce7
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -282,6 +282,36 @@ declare interface ScrollAnimationOptions {
canOverScroll?: boolean;
}
/**
* OffsetOptions info.
*
* @interface OffsetOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
declare interface OffsetOptions {
/**
* The X-axis offset.
*
* @type { ?Dimension }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
xOffset?: Dimension;
/**
* The y-axis offset.
*
* @type { ?Dimension }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
yOffset?: Dimension;
}
/**
* Scroller
*
@ -1236,6 +1266,17 @@ declare class ScrollAttribute extends ScrollableCommonMethod<ScrollAttribute> {
* @since 11
*/
enablePaging(value: boolean): ScrollAttribute;
/**
* Called to setting the initial offset
*
* @param { OffsetOptions } value - options for scroll initial offset.
* @returns { ScrollAttribute } the attribute of the scroll.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
initialOffset(value: OffsetOptions): ScrollAttribute;
}
/**