From da8289cd4f1d2fb32e8d3fa0efda77b24b8986a4 Mon Sep 17 00:00:00 2001 From: Yao yuchi Date: Thu, 19 May 2022 16:37:01 +0800 Subject: [PATCH] grid layout direction Signed-off-by: Yao yuchi --- api/@internal/component/ets/enums.d.ts | 30 ++++++++++++++++++++++++++ api/@internal/component/ets/grid.d.ts | 24 ++++++++++++++++++--- 2 files changed, 51 insertions(+), 3 deletions(-) diff --git a/api/@internal/component/ets/enums.d.ts b/api/@internal/component/ets/enums.d.ts index 518e2efabf..49b18c3d1e 100644 --- a/api/@internal/component/ets/enums.d.ts +++ b/api/@internal/component/ets/enums.d.ts @@ -1415,3 +1415,33 @@ declare enum Placement { */ BottomRight, } + +/** + * LayoutOrientation enumeration description + * @since 9 + */ +declare enum LayoutOrientation { + /** + * The main axis is consistent with the row direction as the layout mode. + * @since 9 + */ + Row, + + /** + * The main axis is consistent with the column direction as the layout mode. + * @since 9 + */ + Column, + + /** + * The layout is in the opposite direction to the Row direction. + * @since 9 + */ + RowReverse, + + /** + * Layout in the opposite direction to the column. + * @since 9 + */ + ColumnReverse, +} diff --git a/api/@internal/component/ets/grid.d.ts b/api/@internal/component/ets/grid.d.ts index e58a4765bc..41bf6ed59c 100644 --- a/api/@internal/component/ets/grid.d.ts +++ b/api/@internal/component/ets/grid.d.ts @@ -28,26 +28,31 @@ interface GridInterface { /** * The enum of property layoutDirection * @since 8 + * @deprecated since 9 */ declare enum GridDirection { /** * The row direction. * @since 8 + * @deprecated since 9 */ Row, /** * The column direction. * @since 8 + * @deprecated since 9 */ Column, /** * The row reverse direction. * @since 8 + * @deprecated since 9 */ RowReverse, /** * The column reverse direction. * @since 8 + * @deprecated since 9 */ ColumnReverse, } @@ -142,17 +147,30 @@ declare class GridAttribute extends CommonMethod { cellLength(value: number): GridAttribute; /** - * control GridDirection of the grid. + * control the layout orientation of the grid. * @since 8 */ - layoutDirection(value: GridDirection): GridAttribute; + layoutDirection(value: LayoutOrientation | GridDirection): GridAttribute; /** * control if the grid supports animation. * @since 8 + * @deprecated since 9 */ supportAnimation(value: boolean): GridAttribute; + /** + * control if the grid supports drag animation. + * @since 9 + */ + dragAnimation(value: boolean): GridAttribute; + + /** + * control if the grid supports edge effection. + * @since 9 + */ + edgeEffection(value: EdgeEffect): GridAttribute; + /** * 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)) @@ -189,4 +207,4 @@ declare class GridAttribute extends CommonMethod { } declare const Grid: GridInterface; -declare const GridInstance: GridAttribute; +declare const GridInstance: GridAttribute; \ No newline at end of file -- Gitee