diff --git a/api/@internal/component/ets/grid.d.ts b/api/@internal/component/ets/grid.d.ts index c6bda2eaae02761c49d8d7f0222a22ae011c5f1a..53a51ca5440e6341ceadaf8dd2d0830b4d9223c2 100644 --- a/api/@internal/component/ets/grid.d.ts +++ b/api/@internal/component/ets/grid.d.ts @@ -558,7 +558,7 @@ declare class GridAttribute extends ScrollableCommonMethod { /** * Allows you to set the spacing between columns. * - * @param { Length } value + * @param { Length } value - Spacing between columns.
Default value: 0
Unit: vp * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 @@ -566,7 +566,7 @@ declare class GridAttribute extends ScrollableCommonMethod { /** * Allows you to set the spacing between columns. * - * @param { Length } value + * @param { Length } value - Spacing between columns.
Default value: 0
Unit: vp * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -575,7 +575,7 @@ declare class GridAttribute extends ScrollableCommonMethod { /** * Allows you to set the spacing between columns. * - * @param { Length } value + * @param { Length } value - Spacing between columns.
Default value: 0
Unit: vp * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -588,7 +588,7 @@ declare class GridAttribute extends ScrollableCommonMethod { /** * Lets you set the spacing between rows. * - * @param { Length } value + * @param { Length } value - Spacing between rows.
Default value: 0
Unit: vp * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 @@ -596,7 +596,7 @@ declare class GridAttribute extends ScrollableCommonMethod { /** * Lets you set the spacing between rows. * - * @param { Length } value + * @param { Length } value - Spacing between rows.
Default value: 0
Unit: vp * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -605,7 +605,7 @@ declare class GridAttribute extends ScrollableCommonMethod { /** * Lets you set the spacing between rows. * - * @param { Length } value + * @param { Length } value - Spacing between rows.
Default value: 0
Unit: vp * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -618,7 +618,7 @@ declare class GridAttribute extends ScrollableCommonMethod { /** * This parameter specifies the width of the scroll bar. * - * @param { number | string } value + * @param { number | string } value - Scrollbar width.
Default value: 4
Unit: vp * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 @@ -626,7 +626,7 @@ declare class GridAttribute extends ScrollableCommonMethod { /** * This parameter specifies the width of the scroll bar. * - * @param { number | string } value + * @param { number | string } value - Scrollbar width.
Default value: 4
Unit: vp * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -635,7 +635,7 @@ declare class GridAttribute extends ScrollableCommonMethod { /** * This parameter specifies the width of the scroll bar. * - * @param { number | string } value + * @param { number | string } value - Scrollbar width.
Default value: 4
Unit: vp * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -645,26 +645,26 @@ declare class GridAttribute extends ScrollableCommonMethod { scrollBarWidth(value: number | string): GridAttribute; /** - * Sets the color of the scroll bar. + * Set the color of the scroll bar. * - * @param { Color | number | string } value + * @param { Color | number | string } value - Scrollbar color.
Default value: '#182431' * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Sets the color of the scroll bar. + * Set the color of the scroll bar. * - * @param { Color | number | string } value + * @param { Color | number | string } value - Scrollbar color.
Default value: '#182431' * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Sets the color of the scroll bar. + * Set the color of the scroll bar. * - * @param { Color | number | string } value + * @param { Color | number | string } value - Scrollbar color.
Default value: '#182431' * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -674,26 +674,26 @@ declare class GridAttribute extends ScrollableCommonMethod { scrollBarColor(value: Color | number | string): GridAttribute; /** - * Lets you set the spacing between rows. + * Let you set the scrollbar state. * - * @param { BarState } value + * @param { BarState } value - Scrollbar state.
Default value: BarState.Off * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Lets you set the spacing between rows. + * Let you set the scrollbar state. * - * @param { BarState } value + * @param { BarState } value - Scrollbar state.
Default value: BarState.Auto * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Lets you set the spacing between rows. + * Lets you set the scrollbar state. * - * @param { BarState } value + * @param { BarState } value - Scrollbar state.
Default value: BarState.Auto * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -764,26 +764,27 @@ declare class GridAttribute extends ScrollableCommonMethod { onScrollIndex(event: (first: number, last: number) => void): GridAttribute; /** - * cached Count + * Set the number of rows of grid items to be cached (preloaded). * - * @param { number } value + * @param { number } value - Number of rows of GridItems to be preloaded.
Default value: 1 * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * cached Count + * Set the number of rows of grid items to be cached (preloaded). * - * @param { number } value + * @param { number } value - Number of rows of GridItems to be preloaded.
Default value: 1 * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * cached Count + * Set the number of rows of grid items to be cached (preloaded). * - * @param { number } value + * @param { number } value - Number of rows of GridItems to be preloaded. + *
Default value: number of nodes visible on the screen, with the maximum value of 16 * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -794,9 +795,12 @@ declare class GridAttribute extends ScrollableCommonMethod { cachedCount(value: number): GridAttribute; /** - * Called to set number of GridItems to be preloaded (cached) in LazyForEach / Repeat. - * @param { number } count - number of GridItems to be preloaded (cached). - * @param { boolean } show - if true, cached items are displayed when clip is disabled. + * Set number of rows of GridItems to be preloaded (cached) in LazyForEach / Repeat. + * @param { number } count - number of rows of GridItems to be preloaded (cached). + *
Default value: number of nodes visible on the screen, with the maximum value of 16 + *
Value range: [0, +∞). + *
Values less than 0 are treated as 1. + * @param { boolean } show - if true, cached items are displayed when clip is disabled.
Default value: false * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -807,26 +811,26 @@ declare class GridAttribute extends ScrollableCommonMethod { cachedCount(count: number, show: boolean): GridAttribute; /** - * editMode + * Set whether to enable edit mode. * - * @param { boolean } value + * @param { boolean } value - Whether to enable edit mode.
Default value: false * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * editMode + * Set whether to enable edit mode. * - * @param { boolean } value + * @param { boolean } value - Whether to enable edit mode.
Default value: false * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * editMode + * Set whether to enable edit mode. * - * @param { boolean } value + * @param { boolean } value - Whether to enable edit mode.
Default value: false * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -837,26 +841,32 @@ declare class GridAttribute extends ScrollableCommonMethod { editMode(value: boolean): GridAttribute; /** - * Called when judging whether it is multiSelectable. + * Set whether to enable multi-select. * - * @param { boolean } value + * @param { boolean } value - Whether to enable multiselect. + *
false (default): Multiselect is disabled. + *
true: Multiselect is enabled. * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Called when judging whether it is multiSelectable. + * Set whether to enable multi-select. * - * @param { boolean } value + * @param { boolean } value - Whether to enable multiselect. + *
false (default): Multiselect is disabled. + *
true: Multiselect is enabled. * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Called when judging whether it is multiSelectable. + * Set whether to enable multi-select. * - * @param { boolean } value + * @param { boolean } value - Whether to enable multiselect. + *
false (default): Multiselect is disabled. + *
true: Multiselect is enabled. * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -867,26 +877,32 @@ declare class GridAttribute extends ScrollableCommonMethod { multiSelectable(value: boolean): GridAttribute; /** - * maxCount + * Set the maximum number of rows or columns to be displayed. * - * @param { number } value + * @param { number } value - The maximum number of rows or columns to be displayed. + *
Default value: Infinity + *
Values less than 1 are treated as Infinity. * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * maxCount + * Set the maximum number of rows or columns to be displayed. * - * @param { number } value + * @param { number } value - The maximum number of rows or columns to be displayed. + *
Default value: Infinity + *
Values less than 0 are treated as Infinity. * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * maxCount + * Set the maximum number of rows or columns that can be displayed. * - * @param { number } value + * @param { number } value - The maximum number of rows or columns that can be displayed. + *
Default value: Infinity + *
Values less than 0 are treated as Infinity. * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -897,26 +913,26 @@ declare class GridAttribute extends ScrollableCommonMethod { maxCount(value: number): GridAttribute; /** - * minCount + * Set the maximum number of rows or columns that can be displayed. * - * @param { number } value + * @param { number } value - The minimun number of rows or columns that can be displayed.
Default value: 1 * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * minCount + * Set the minimun number of rows or columns that can be displayed. * - * @param { number } value + * @param { number } value - The minimun number of rows or columns that can be displayed.
Default value: 1 * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * minCount + * Set the minimun number of rows or columns that can be displayed. * - * @param { number } value + * @param { number } value - The minimun number of rows or columns that can be displayed.
Default value: 1 * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -927,26 +943,29 @@ declare class GridAttribute extends ScrollableCommonMethod { minCount(value: number): GridAttribute; /** - * cellLength + * Set the height per row or width per column. * - * @param { number } value + * @param { number } value - the height per row or width per column. + *
Default value: the size of the first element.
Unit: vp * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * cellLength + * Set the height per row or width per column. * - * @param { number } value + * @param { number } value - the height per row or width per column. + *
Default value: the size of the first element.
Unit: vp * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * cellLength + * Set the height per row or width per column. * - * @param { number } value + * @param { number } value - the height per row or width per column. + *
Default value: the size of the first element.
Unit: vp * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -957,26 +976,26 @@ declare class GridAttribute extends ScrollableCommonMethod { cellLength(value: number): GridAttribute; /** - * Control GridDirection of the grid. + * Set the main axis layout direction of the grid. * - * @param { GridDirection } value + * @param { GridDirection } value - main axis layout direction of the grid.
Default value: GridDirection.Row * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Control GridDirection of the grid. + * Set the main axis layout direction of the grid. * - * @param { GridDirection } value + * @param { GridDirection } value - main axis layout direction of the grid.
Default value: GridDirection.Row * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Control GridDirection of the grid. + * Set the main axis layout direction of the grid. * - * @param { GridDirection } value + * @param { GridDirection } value - main axis layout direction of the grid.
Default value: GridDirection.Row * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -987,26 +1006,32 @@ declare class GridAttribute extends ScrollableCommonMethod { layoutDirection(value: GridDirection): GridAttribute; /** - * Control if the grid supports animation. + * Set weather to enable grid drag-and-drop animation. * - * @param { boolean } value + * @param { boolean } value - Whether to enable drag-and-drop animation. + *
false (default): drag-and-drop animation is disabled. + *
true: drag-and-drop animation is enabled. * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Control if the grid supports animation. + * Set weather to enable grid drag-and-drop animation. * - * @param { boolean } value + * @param { boolean } value - Whether to enable drag-and-drop animation. + *
false (default): drag-and-drop animation is disabled. + *
true: drag-and-drop animation is enabled. * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Control if the grid supports animation. + * Set weather to enable grid drag-and-drop animation. * - * @param { boolean } value + * @param { boolean } value - Whether to enable drag-and-drop animation. + *
false (default): drag-and-drop animation is disabled. + *
true: drag-and-drop animation is enabled. * @returns { GridAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -1187,19 +1212,23 @@ declare class GridAttribute extends ScrollableCommonMethod { ): GridAttribute; /** - * Called when the sliding effect is set. + * Set the effect used when the scroll boundary is reached. * * @param { EdgeEffect } value - Scroll effect. For details, see EdgeEffect. + *
Default value: EdgeEffect.None * @returns { GridAttribute } The attribute of the grid * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Called when the sliding effect is set. + * Set the effect used when the scroll boundary is reached. * - * @param { EdgeEffect } value - * @param { EdgeEffectOptions } options + * @param { EdgeEffect } value - Effect used when the scroll boundary is reached. The spring and shadow effects are supported. + *
Default value: EdgeEffect.None + * @param { EdgeEffectOptions } options - Whether to enable the scroll effect when the component content is smaller than the component itself. + * The value { alwaysEnabled: true } means to enable the scroll effect, and { alwaysEnabled: false } means the opposite. + *
Default value: { alwaysEnabled: false } * @returns { GridAttribute } The attribute of the grid * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -1209,17 +1238,21 @@ declare class GridAttribute extends ScrollableCommonMethod { edgeEffect(value: EdgeEffect, options?: EdgeEffectOptions): GridAttribute; /** - * Called to setting the nested scroll options. + * Set the nested scrolling options. You can set the nested scrolling mode in the forward and backward directions + * to implement scrolling linkage with the parent component. * * @param { NestedScrollOptions } value - options for nested scrolling. + *
Default value: { scrollForward: NestedScrollMode.SELF_ONLY, scrollBackward: NestedScrollMode.SELF_ONLY } * @returns { GridAttribute } the attribute of the grid. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ /** - * Called to setting the nested scroll options. + * Set the nested scrolling options. You can set the nested scrolling mode in the forward and backward directions + * to implement scrolling linkage with the parent component. * * @param { NestedScrollOptions } value - options for nested scrolling. + *
Default value: { scrollForward: NestedScrollMode.SELF_ONLY, scrollBackward: NestedScrollMode.SELF_ONLY } * @returns { GridAttribute } the attribute of the grid. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -1229,18 +1262,19 @@ declare class GridAttribute extends ScrollableCommonMethod { nestedScroll(value: NestedScrollOptions): GridAttribute; /** - * Called when setting whether to enable scroll by gesture or mouse. + * Set whether to enable scroll by gesture or mouse. * - * @param { boolean } value + * @param { boolean } value - Whether to support scroll gestures.
Default value: true * @returns { GridAttribute } The attribute of the grid * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Called when setting whether to enable scroll by gesture or mouse. + * Set whether to enable scroll by gesture or mouse. When this attribute is set to false, + * scrolling by finger or mouse is not supported, but the scroll controller API is not affected. * - * @param { boolean } value + * @param { boolean } value - Whether to support scroll gestures.
Default value: true * @returns { GridAttribute } The attribute of the grid * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -1250,7 +1284,7 @@ declare class GridAttribute extends ScrollableCommonMethod { enableScrollInteraction(value: boolean): GridAttribute; /** - * Called to setting the friction. + * Set the friction coefficient. * * @param { number | Resource } value - options for scrolling friction. * @returns { GridAttribute } the attribute of the grid. @@ -1259,9 +1293,14 @@ declare class GridAttribute extends ScrollableCommonMethod { * @since 10 */ /** - * Called to setting the friction. + * Set the friction coefficient. It applies only to gestures in the scrolling area, + * and it affects only indirectly the scroll chaining during the inertial scrolling process. + * A value less than or equal to 0 evaluates to the default value. * - * @param { number | Resource } value - options for scrolling friction. + * @param { number | Resource } 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. * @returns { GridAttribute } the attribute of the grid. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -1273,7 +1312,7 @@ declare class GridAttribute extends ScrollableCommonMethod { /** * Set the alignment of grid items. * - * @param { Optional } alignment - Items alignment + * @param { Optional } alignment - Items alignment
Default value: GridItemAlignment.DEFAULT * @returns { GridAttribute } The attribute of the grid. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -1284,7 +1323,7 @@ declare class GridAttribute extends ScrollableCommonMethod { alignItems(alignment: Optional): GridAttribute; /** - * Sets the focus wrap mode of the grid. + * Set the focus wrap mode of the grid. * * @param { Optional } mode - the focus wrap mode of the grid. *
Default value: **FocusWrapMode.DEFAULT**. @@ -1299,7 +1338,7 @@ declare class GridAttribute extends ScrollableCommonMethod { /** * Set whether to synchronously load child nodes within one frame. * - * @param { boolean } enable - Whether to synchronously load child nodes within one frame + * @param { boolean } enable - Whether to synchronously load child nodes within one frame.
Default value: true * @returns { GridAttribute } The attribute of the grid. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform