diff --git a/api/@ohos.arkui.ArcList.d.ts b/api/@ohos.arkui.ArcList.d.ts index 7f79f569b8985d6c5ef6a5a372e7abbdca81389d..5faa582851cce99f737bffbe69424f2c2bf9ef4c 100755 --- a/api/@ohos.arkui.ArcList.d.ts +++ b/api/@ohos.arkui.ArcList.d.ts @@ -22,15 +22,15 @@ * Called when the start, end and center positions of the display change. * * @typedef { function } ArcScrollIndexHandler - * @param { number } start - the start index of the display area. - * @param { number } end - the end index of the display area. - * @param { number } center - the center index of the display area. + * @param { int } start - the start index of the display area. + * @param { int } end - the end index of the display area. + * @param { int } center - the center index of the display area. * @syscap SystemCapability.ArkUI.ArkUI.Circle * @crossplatform * @atomicservice * @since 18 */ -declare type ArcScrollIndexHandler = (start: number, end: number, center: number) => void; +declare type ArcScrollIndexHandler = (start: int, end: int, center: int) => void; /** * Defines the arc list options. @@ -45,13 +45,13 @@ declare interface ArkListOptions { /** * Describes the index of initial item, the default value is 0. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.ArkUI.ArkUI.Circle * @crossplatform * @atomicservice * @since 18 */ - initialIndex?: number; + initialIndex?: int; /** * Describes the controller for scrollable container. @@ -194,14 +194,14 @@ export declare class ArcListAttribute extends CommonMethod { /** * Set the minimum number of list item caches for long list deferred loading. * - * @param { Optional } count + * @param { Optional } count * @returns { ArcListAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Circle * @crossplatform * @atomicservice * @since 18 */ - cachedCount(count: Optional): ArcListAttribute; + cachedCount(count: Optional): ArcListAttribute; /** * Whether to enable chain linkage dynamic effect. @@ -254,19 +254,19 @@ export declare class ArcListAttribute extends CommonMethod { /** * Friction coefficient. * - * @param { Optional } friction - friction coefficient. + * @param { Optional } friction - friction coefficient. * @returns { ArcListAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Circle * @crossplatform * @atomicservice * @since 18 */ - friction(friction: Optional): ArcListAttribute; + friction(friction: Optional): ArcListAttribute; /** * Limit the max speed when fling. * - * @param { Optional } speed - Max fling speed, the value needs to be a positive number, the maximum value is not limited. + * @param { Optional } speed - Max fling speed, the value needs to be a positive number, the maximum value is not limited. * The unit is vp/s. * @returns { ArcListAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Circle @@ -274,7 +274,7 @@ export declare class ArcListAttribute extends CommonMethod { * @atomicservice * @since 18 */ - flingSpeedLimit(speed: Optional): ArcListAttribute; + flingSpeedLimit(speed: Optional): ArcListAttribute; /** * Called when the start, end and center positions of the display change. diff --git a/api/arkui/component/list.static.d.ets b/api/arkui/component/list.static.d.ets index ad2b22a9b8c4368113ce2242627f52833e1799c2..7662d2e2723b3ebf76bd5e2c646e006be8412f5d 100644 --- a/api/arkui/component/list.static.d.ets +++ b/api/arkui/component/list.static.d.ets @@ -27,7 +27,7 @@ import { AttributeModifier, CommonMethod } from "./common"; /** * Declare scroll status * - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -59,7 +59,7 @@ export declare enum ScrollState { /** * Declare list item alignment status * - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -89,7 +89,7 @@ export declare enum ListItemAlign { /** * Declare list item group area * - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -126,7 +126,7 @@ export declare enum ListItemGroupArea { /** * Declare item group sticky style. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -159,7 +159,7 @@ export declare enum StickyStyle { /** * Declare edge effect of chain animation. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 20 @@ -186,7 +186,7 @@ export declare enum ChainEdgeEffect { /** * Declare limited position when scroll end. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -265,23 +265,23 @@ export declare interface ChainAnimationOptions { /** * Conductivity of chain animation. * - * @type { ?number } + * @type { ?double } * @default 0.7 * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 20 */ - conductivity?: number; + conductivity?: double; /** * Intensity of chain animation. * - * @type { ?number } + * @type { ?double } * @default 0.3 * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 20 */ - intensity?: number; + intensity?: double; /** * Edge effect of chain animation. * @@ -295,23 +295,23 @@ export declare interface ChainAnimationOptions { /** * Stiffness of chain spring. * - * @type { ?number } + * @type { ?double } * @default 228 * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 20 */ - stiffness?: number; + stiffness?: double; /** * Damping of chain spring. * - * @type { ?number } + * @type { ?double } * @default 30 * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 20 */ - damping?: number; + damping?: double; } /** * Defines the close swipe action options. @@ -341,11 +341,11 @@ export declare interface VisibleListContentInfo { /** * Index of the list item or list item group in the list display area. * - * @type { number } + * @type { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - index: number; + index: int; /** * Position of the top or bottom edge of the viewport in the * list item group to which the edge is located, if applicable. @@ -359,11 +359,11 @@ export declare interface VisibleListContentInfo { * Index of the starting or ending list item in the list * item group to which the top or bottom edge of the viewport is located. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - itemIndexInGroup?: number; + itemIndexInGroup?: int; } /** * Called when a child component enters or leaves the list display area. @@ -394,8 +394,8 @@ export declare class ListScroller extends Scroller { *
- When index or indexInGroup is set to an invalid value, the returned size and position are both 0. *

* - * @param { number } index - Index of the list item group in the list. - * @param { number } indexInGroup - Index of the list item in the list item group. + * @param { int } index - Index of the list item group in the list. + * @param { int } indexInGroup - Index of the list item in the list item group. * @returns { RectResult } - Size of the list item in the list item group and its position relative to the list. * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. @@ -405,15 +405,15 @@ export declare class ListScroller extends Scroller { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - getItemRectInGroup(index: number, indexInGroup: number): RectResult; + getItemRectInGroup(index: int, indexInGroup: int): RectResult; /** * Scrolls to the specified list item in the specified list item group. * - * @param { number } index - Index of the target list item group in the current container. + * @param { int } index - Index of the target list item group in the current container. *
NOTE *
If the value set is a negative value or greater than the maximum index of the items in the container, * the value is deemed abnormal, and no scrolling will be performed. - * @param { number } indexInGroup - Index of the target list item in the list item group specified by index. + * @param { int } indexInGroup - Index of the target list item in the list item group specified by index. *
NOTE *
If the value set is a negative value or greater than the maximum index of the items in the list item group, * the value is deemed abnormal, and no scrolling will be performed. @@ -428,7 +428,7 @@ export declare class ListScroller extends Scroller { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - scrollToItemInGroup(index: number, indexInGroup: number, smooth?: boolean, align?: ScrollAlign): void; + scrollToItemInGroup(index: int, indexInGroup: int, smooth?: boolean, align?: ScrollAlign): void; /** * Collapses the list items in the EXPANDED state and sets callback events. * @@ -455,8 +455,8 @@ export declare class ListScroller extends Scroller { * and both itemGroupArea and itemIndexInGroup are undefined. *

* - * @param { number } x - X-coordinate, in vp. - * @param { number } y - Y-coordinate, in vp. + * @param { double } x - X-coordinate, in vp. + * @param { double } y - Y-coordinate, in vp. * @returns { VisibleListContentInfo } Index information of the child component at the specified coordinates. * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. @@ -466,7 +466,7 @@ export declare class ListScroller extends Scroller { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - getVisibleListContentInfo(x: number, y: number): VisibleListContentInfo; + getVisibleListContentInfo(x: double, y: double): VisibleListContentInfo; } /** * Defines the options of the List component. @@ -489,12 +489,12 @@ export interface ListOptions { * the value is invalid. In this case, the default value will be used. *

* - * @type { ?number } + * @type { ?int } * @default 0 * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - initialIndex?: number; + initialIndex?: int; /** * Spacing between list items along the main axis. * Anonymous Object Rectification. @@ -505,12 +505,12 @@ export interface ListOptions { *
Child components of List whose visibility attribute is set to None are not displayed, but the spacing above and below them still takes effect. *

* - * @type { ?(number | string) } + * @type { ?(double | string) } * @default 0 * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - space?: number | string; + space?: double | string; /** * Scroller, which can be bound to scrollable components. * Anonymous Object Rectification. @@ -586,13 +586,13 @@ export declare interface ListAttribute extends ScrollableCommonMethod { * Sets the number of columns or rows in the list. If the value is set to the gutter type, it indicates the gap between columns. * It takes effect when the number of columns is greater than 1. * - * @param { number | LengthConstrain | undefined } value - Number of columns or rows in the list.
Default value: 1 + * @param { int | LengthConstrain | undefined } value - Number of columns or rows in the list.
Default value: 1 * @param { Dimension | undefined } [gutter] - Gap between columns.
Default value: 0 * @returns { this } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - default lanes(value: number | LengthConstrain | undefined, gutter?: Dimension | undefined): this; + default lanes(value: int | LengthConstrain | undefined, gutter?: Dimension | undefined): this; /** * Alignment mode of list items along the cross axis when the cross-axis width of the list is greater * than the cross-axis width of list items multiplied by the value of lanes. @@ -614,23 +614,23 @@ export declare interface ListAttribute extends ScrollableCommonMethod { default listDirection(value: Axis | undefined): this; /** * Sets the offset from the start of the list content to the boundary of the list display area. - * @param { number | undefined } value - Offset from the start of the list content to the boundary of the list display + * @param { double | undefined } value - Offset from the start of the list content to the boundary of the list display *
Default value: 0 * @returns { this } the attribute of the list. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - default contentStartOffset(value: number | undefined): this; + default contentStartOffset(value: double | undefined): this; /** * Sets the offset from the end of the list content to the boundary of the list display area. * - * @param { number | undefined } value - Offset from the end of the list content to the boundary of the list display area. + * @param { double | undefined } value - Offset from the end of the list content to the boundary of the list display area. *
Default value: 0 * @returns { this } the attribute of the list. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - default contentEndOffset(value: number | undefined): this; + default contentEndOffset(value: double | undefined): this; /** * Sets the style of the divider for the list items. By default, there is no divider. * Anonymous Object Rectification. @@ -655,18 +655,18 @@ export declare interface ListAttribute extends ScrollableCommonMethod { /** * Called when the minimum number of list item caches is set for long list deferred loading. * - * @param { number | undefined } value - Number of list items to be preloaded. + * @param { int | undefined } value - Number of list items to be preloaded. *
Default value: number of nodes visible on the screen, with the maximum value of 16 *
Value range: [0, +∞) * @returns { this } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - default cachedCount(value: number | undefined): this; + default cachedCount(value: int | undefined): this; /** * Sets the number of list items or list item groups to be cached (preloaded) and specifies whether to display the preloaded nodes. * - * @param { number | undefined } count - Number of list items to be preloaded. + * @param { int | undefined } count - Number of list items to be preloaded. *
Default value: number of nodes visible on the screen, with the maximum value of 16 *
Value range: [0, +∞) * @param { boolean | undefined } show - Whether to display the preloaded list items.
Default value: false @@ -674,7 +674,7 @@ export declare interface ListAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - default cachedCount(count: number | undefined, show: boolean | undefined): this; + default cachedCount(count: int | undefined, show: boolean | undefined): this; /** * Sets whether to enable chained animations, which provide a visually connected, * or "chained," effect when the list is scrolled or its top or bottom edge is dragged. @@ -779,7 +779,7 @@ export declare interface ListAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - default onScrollIndex(event: ((start: number, end: number, center: number) => void) | undefined): this; + default onScrollIndex(event: ((start: int, end: int, center: int) => void) | undefined): this; /** * Triggered when a child component enters or leaves the list display area. * @@ -797,7 +797,7 @@ export declare interface ListAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - default onItemMove(event: ((from: number, to: number) => boolean) | undefined): this; + default onItemMove(event: ((from: int, to: int) => boolean) | undefined): this; /** * After a listener is bound, the component can be dragged. After the drag occurs, a callback is triggered. * (To be triggered, press and hold for 170 milliseconds (ms)) @@ -825,7 +825,7 @@ export declare interface ListAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - default onItemDragMove(event: ((event: ItemDragInfo, itemIndex: number, insertIndex: number) => void) | undefined): this; + default onItemDragMove(event: ((event: ItemDragInfo, itemIndex: int, insertIndex: int) => void) | undefined): this; /** * Triggered when the dragged item leaves the drop target of the list. * @@ -834,7 +834,7 @@ export declare interface ListAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - default onItemDragLeave(event: ((event: ItemDragInfo, itemIndex: number) => void) | undefined): this; + default onItemDragLeave(event: ((event: ItemDragInfo, itemIndex: int) => void) | undefined): this; /** * Triggered when the dragged item is dropped on the drop target of the list. * @@ -843,7 +843,7 @@ export declare interface ListAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - default onItemDrop(event: ((event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void) | undefined): this; + default onItemDrop(event: ((event: ItemDragInfo, itemIndex: int, insertIndex: int, isSuccess: boolean) => void) | undefined): this; /** * Called when scrolling begin each frame. * Anonymous Object Rectification. diff --git a/api/arkui/component/listItem.static.d.ets b/api/arkui/component/listItem.static.d.ets index 9bbee82e1ffdc23c6cc5877f5017db27733d7809..c7393dab681e45bb0c5c702cdd0087a05735f20d 100644 --- a/api/arkui/component/listItem.static.d.ets +++ b/api/arkui/component/listItem.static.d.ets @@ -27,7 +27,7 @@ import { AttributeModifier, CommonMethod } from "./common"; /** * Sliding effect * - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -50,7 +50,7 @@ export declare enum SwipeEdgeEffect { /** * Declare enum SwipeActionState. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -192,12 +192,12 @@ export declare interface SwipeActionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - onOffsetChange?: (offset: number) => void; + onOffsetChange?: (offset: double) => void; } /** * Defines the list item style. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ diff --git a/api/arkui/component/listItemGroup.static.d.ets b/api/arkui/component/listItemGroup.static.d.ets index 10dfda2eb4066720a0cf066ef1821d6431cd2915..15ace4a1be3b4ac38bf7a3a482112974b76f1ce2 100644 --- a/api/arkui/component/listItemGroup.static.d.ets +++ b/api/arkui/component/listItemGroup.static.d.ets @@ -27,7 +27,7 @@ import { AttributeModifier, CommonMethod } from "./common"; /** * Defines the list item group style. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -90,11 +90,11 @@ export declare interface ListItemGroupOptions { /** * Describes the ListItemGroup space. * - * @type { ?(number | string) } + * @type { ?(double | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - space?: number | string; + space?: double | string; /** * Describes the ListItemGroup style. * diff --git a/api/arkui/component/scroll.static.d.ets b/api/arkui/component/scroll.static.d.ets index cdbbf6ccf2880411f69d511dd2b18a6255448712..74fa5f112b5c643772a6e667daa40422bba49e27 100644 --- a/api/arkui/component/scroll.static.d.ets +++ b/api/arkui/component/scroll.static.d.ets @@ -27,7 +27,7 @@ import { AttributeModifier, CommonMethod } from "./common"; /** * Enumerates the scrolling directions. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -57,7 +57,7 @@ export declare enum ScrollDirection { /** * Enumerates alignment modes. * - * @enum { number } ScrollAlign + * @enum { int } ScrollAlign * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -102,19 +102,19 @@ export declare interface OffsetResult { /** * Horizontal scrolling offset. * - * @type { number } + * @type { double } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - xOffset: number; + xOffset: double; /** * Vertical scrolling offset. * - * @type { number } + * @type { double } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - yOffset: number; + yOffset: double; } /** * Provides parameters for scrolling to the edge of a scrollable container. @@ -128,12 +128,12 @@ export declare interface ScrollEdgeOptions { * Fixed velocity for scrolling to the edge of the container. * If the value specified is less than or equal to 0, the parameter will not take effect. * - * @type { ?number } + * @type { ?double } * @default 0vp/s * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - velocity?: number; + velocity?: double; } /** * Provides parameters for scrolling to a specific index. @@ -167,12 +167,12 @@ export declare interface ScrollAnimationOptions { *
A value less than 0 evaluates to the default value. *

* - * @type { ?number } + * @type { ?int } * @default 1000 * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - duration?: number; + duration?: int; /** * Scrolling curve. * @@ -269,7 +269,7 @@ export declare class Scroller { /** * Performs inertial scrolling based on the initial velocity passed in. * - * @param { number } velocity - Initial velocity of inertial scrolling. Unit: vp/s + * @param { double } velocity - Initial velocity of inertial scrolling. Unit: vp/s *
NOTE *
If the value specified is 0, it is considered as invalid, and the scrolling for this instance will not take effect. * A positive value indicates scrolling towards the top, while a negative value indicates scrolling towards the bottom. @@ -281,7 +281,7 @@ export declare class Scroller { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - fling(velocity: number): void; + fling(velocity: double): void; /** * Called when page turning mode is set. * @@ -301,14 +301,14 @@ export declare class Scroller { /** * Scroll to the specified index. * - * @param { number } value - Index to jump to. + * @param { int } value - Index to jump to. * @param { boolean } [smooth] - If true, scroll to index item with animation. If false, scroll to index item without animation. * @param { ScrollAlign } [align] - Sets the alignment mode of a specified index. * @param { ScrollToIndexOptions } [options] - Sets the options of a specified index, such as extra offset. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - scrollToIndex(value: number, smooth?: boolean, align?: ScrollAlign, options?: ScrollToIndexOptions): void; + scrollToIndex(value: int, smooth?: boolean, align?: ScrollAlign, options?: ScrollToIndexOptions): void; /** * Called when the setting slides by offset. * @@ -340,7 +340,7 @@ export declare class Scroller { * the value is considered invalid. *

* - * @param { number } index - Index of the target child component. + * @param { int } index - Index of the target child component. * @returns { RectResult } Returns the size and position. * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. @@ -350,7 +350,7 @@ export declare class Scroller { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - getItemRect(index: number): RectResult; + getItemRect(index: int): RectResult; /** * Obtains the index of a child component based on coordinates. * @@ -358,9 +358,9 @@ export declare class Scroller { *
The returned index is -1 for invalid coordinates. *

* - * @param { number } x - X-coordinate, in vp. - * @param { number } y - Y-coordinate, in vp. - * @returns { number } Index of the item. + * @param { double } x - X-coordinate, in vp. + * @param { double } y - Y-coordinate, in vp. + * @returns { int } Index of the item. * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. @@ -369,7 +369,7 @@ export declare class Scroller { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - getItemIndex(x: number, y: number): number; + getItemIndex(x: double, y: double): int; } /** * Provides parameters for scrolling to a specific position in a scrollable container. @@ -391,11 +391,11 @@ export declare interface ScrollOptions { *
This parameter takes effect only when the scroll axis is the x-axis. *

* - * @type { number | string } + * @type { double | string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - xOffset: number | string; + xOffset: double | string; /** * Vertical scrolling offset. * Anonymous Object Rectification. @@ -408,11 +408,11 @@ export declare interface ScrollOptions { *
This parameter takes effect only when the scroll axis is the y-axis. *

* - * @type { number | string } + * @type { double | string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - yOffset: number | string; + yOffset: double | string; /** * Animation configuration * Anonymous Object Rectification. @@ -544,23 +544,23 @@ export interface OnScrollFrameBeginHandlerResult { * Actual scroll offset. * Anonymous Object Rectification. * - * @type { number } + * @type { double } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - offsetRemain: number; + offsetRemain: double; } /** * Represents the callback triggered before each frame scrolling starts. * * @typedef { function } OnScrollFrameBeginCallback - * @param { number } offset - Amount to scroll by, in vp. + * @param { double } offset - Amount to scroll by, in vp. * @param { ScrollState } state - Current scroll state. * @returns { OnScrollFrameBeginHandlerResult } data - the scroll data return by handler * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ -export type OnScrollFrameBeginCallback = (offset: number, state: ScrollState) => OnScrollFrameBeginHandlerResult; +export type OnScrollFrameBeginCallback = (offset: double, state: ScrollState) => OnScrollFrameBeginHandlerResult; /** * The ScrollAttribute @@ -671,21 +671,21 @@ export declare interface ScrollAttribute extends ScrollableCommonMethod { /** * Sets the scrollbar color. * - * @param { Color | number | string | undefined } color - Scrollbar color.
Default value: '\#182431' (40% opacity) + * @param { Color | int | string | undefined } color - Scrollbar color.
Default value: '\#182431' (40% opacity) * @returns { this } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - default scrollBarColor(color: Color | number | string | undefined): this; + default scrollBarColor(color: Color | int | string | undefined): this; /** * Sets the scrollbar width. * - * @param { number | string | undefined } value - Scrollbar width.
Default value: 4
Unit: vp + * @param { double | string | undefined } value - Scrollbar width.
Default value: 4
Unit: vp * @returns { this } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - default scrollBarWidth(value: number | string | undefined): this; + default scrollBarWidth(value: double | string | undefined): this; /** * Sets the effect used when the scroll boundary is reached. * @@ -735,7 +735,7 @@ export declare interface ScrollAttribute extends ScrollableCommonMethod { * it affects only indirectly the scroll chaining during the inertial scrolling process. * If this attribute is set to a value less than or equal to 0, the default value is used. * - * @param { number | Resource | undefined } value - Friction coefficient. + * @param { double | Resource | undefined } value - Friction coefficient. *
Default value: 0.9 for wearable devices and 0.6 for non-wearable devices *
Since API version 11, the default value for non-wearable devices is 0.7. *
Since API version 12, the default value for non-wearable devices is 0.75. @@ -743,7 +743,7 @@ export declare interface ScrollAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - default friction(value: number | Resource | undefined): this; + default friction(value: double | Resource | undefined): this; /** * Sets the scroll snapping mode. * @@ -794,23 +794,23 @@ export declare interface ScrollAttribute extends ScrollableCommonMethod { *

* * @typedef { function } ScrollOnScrollCallback - * @param { number } xOffset - Horizontal offset per frame during scrolling. A positive offset indicates scrolling to the left, + * @param { double } xOffset - Horizontal offset per frame during scrolling. A positive offset indicates scrolling to the left, * and a negative offset indicates scrolling to the right. *
Unit: vp - * @param { number } yOffset - Vertical offset per frame during scrolling. + * @param { double } yOffset - Vertical offset per frame during scrolling. * A positive offset indicates scrolling upward, and a negative offset indicates scrolling downward. *
Unit: vp * @param { ScrollState } scrollState - Current scrolling state. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ -export type ScrollOnScrollCallback = (xOffset: number, yOffset: number, scrollState: ScrollState) => void; +export type ScrollOnScrollCallback = (xOffset: double, yOffset: double, scrollState: ScrollState) => void; /** * Called before scroll to allow developer to control real offset the Scroll can scroll. * * @typedef { function } ScrollOnWillScrollCallback - * @param { number } xOffset - horizontal offset this frame will scroll, which may or may not be reached. - * @param { number } yOffset - vertical offset this frame will scroll, which may or may not be reached. + * @param { double } xOffset - horizontal offset this frame will scroll, which may or may not be reached. + * @param { double } yOffset - vertical offset this frame will scroll, which may or may not be reached. * @param { ScrollState } scrollState - current scroll state. * @param { ScrollSource } scrollSource - source of current scroll. * @returns { undefined | OffsetResult } the remain offset for the Scroll, @@ -818,7 +818,7 @@ export type ScrollOnScrollCallback = (xOffset: number, yOffset: number, scrollSt * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ -export type ScrollOnWillScrollCallback = (xOffset: number, yOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => undefined | OffsetResult; +export type ScrollOnWillScrollCallback = (xOffset: double, yOffset: double, scrollState: ScrollState, scrollSource: ScrollSource) => undefined | OffsetResult; /** * Defines Scroll Component. diff --git a/api/arkui/component/scrollBar.static.d.ets b/api/arkui/component/scrollBar.static.d.ets index 0a9330a156d789eb9d7d35f5c94b56b81c57322d..64f85404790bf11c770ab4b316611272276aad9a 100644 --- a/api/arkui/component/scrollBar.static.d.ets +++ b/api/arkui/component/scrollBar.static.d.ets @@ -26,7 +26,7 @@ import { AttributeModifier, CommonMethod } from "./common"; /** * Content scroll direction. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */