!9509 【api】【position/offset】支持top/left/bottom/right属性定位

Merge pull request !9509 from 冯纪拓/position_sdk
This commit is contained in:
openharmony_ci 2024-03-15 09:15:52 +00:00 committed by Gitee
commit 5cc1dc495e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 86 additions and 2 deletions

View File

@ -14534,7 +14534,18 @@ declare class CommonMethod<T> {
* @since 11
* @form
*/
position(value: Position): T;
/**
* position
*
* @param { Position | Edges } value
* @returns { T }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
* @form
*/
position(value: Position | Edges): T;
/**
* Sets the anchor point of the element when it is positioned. The base point is offset from the top start point of the element.
@ -14618,7 +14629,19 @@ declare class CommonMethod<T> {
* @since 11
* @form
*/
offset(value: Position): T;
/**
* Coordinate offset relative to the layout completion position.
* Setting this attribute does not affect the layout of the parent container. The position is adjusted only during drawing.
*
* @param { Position | Edges } value
* @returns { T }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
* @form
*/
offset(value: Position | Edges): T;
/**
* If the value is true, the component is available and can respond to operations such as clicking.

View File

@ -1789,6 +1789,67 @@ declare interface Position {
*/
y?: Length;
}
/**
* Defines the Edges.
*
* @interface Edges
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
* @form
*/
declare interface Edges {
/**
* top property.
*
* @type { ?Dimension }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
* @form
*/
top?: Dimension;
/**
* left property.
*
* @type { ?Dimension }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
* @form
*/
left?: Dimension;
/**
* bottom property.
*
* @type { ?Dimension }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
* @form
*/
bottom?: Dimension;
/**
* right property.
*
* @type { ?Dimension }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
* @form
*/
right?: Dimension;
}
/**
* Defines the Bias.
*