mirror of
https://gitee.com/openharmony/interface_sdk-js
synced 2024-11-23 07:10:52 +00:00
!13095 Grid组件新增alignitems接口
Merge pull request !13095 from tomkl123/cherry-pick-1722823302
This commit is contained in:
commit
7ae2b2382e
45
api/@internal/component/ets/grid.d.ts
vendored
45
api/@internal/component/ets/grid.d.ts
vendored
@ -294,6 +294,39 @@ declare enum GridDirection {
|
||||
ColumnReverse,
|
||||
}
|
||||
|
||||
/**
|
||||
* Declare grid item alignment status
|
||||
*
|
||||
* @enum { number }
|
||||
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
||||
* @crossplatform
|
||||
* @atomicservice
|
||||
* @since 12
|
||||
*/
|
||||
declare enum GridItemAlignment {
|
||||
|
||||
/**
|
||||
* Use the default alignment of the Grid.
|
||||
*
|
||||
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
||||
* @crossplatform
|
||||
* @atomicservice
|
||||
* @since 12
|
||||
*/
|
||||
DEFAULT = 0,
|
||||
|
||||
/**
|
||||
* The height of the tallest grid item in the current line
|
||||
* will be used as the height for the other items in the same line
|
||||
*
|
||||
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
||||
* @crossplatform
|
||||
* @atomicservice
|
||||
* @since 12
|
||||
*/
|
||||
STRETCH = 1,
|
||||
}
|
||||
|
||||
/**
|
||||
* The attribute of scrollbar to compute scrollbar position and height.
|
||||
*
|
||||
@ -1107,6 +1140,18 @@ declare class GridAttribute extends ScrollableCommonMethod<GridAttribute> {
|
||||
*/
|
||||
friction(value: number | Resource): GridAttribute;
|
||||
|
||||
/**
|
||||
* Set the alignment of grid items.
|
||||
*
|
||||
* @param { Optional<GridItemAlignment> } alignment - Items alignment
|
||||
* @returns { GridAttribute } The attribute of the grid.
|
||||
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
||||
* @crossplatform
|
||||
* @atomicservice
|
||||
* @since 12
|
||||
*/
|
||||
alignItems(alignment: Optional<GridItemAlignment>): GridAttribute;
|
||||
|
||||
/**
|
||||
* Called When sliding the grid.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user