mirror of
https://gitee.com/openharmony/interface_sdk-js
synced 2024-10-07 14:13:45 +00:00
!11994 FrameNode支持查询Navigation/Router页面信息
Merge pull request !11994 from 向首兴/navRouter
This commit is contained in:
commit
c6a227ff53
59
api/@ohos.arkui.UIContext.d.ts
vendored
59
api/@ohos.arkui.UIContext.d.ts
vendored
@ -1160,6 +1160,38 @@ declare type ClickEventListenerCallback = (event: ClickEvent, node?: FrameNode)
|
|||||||
*/
|
*/
|
||||||
declare type GestureEventListenerCallback = (event: GestureEvent, node?: FrameNode) => void;
|
declare type GestureEventListenerCallback = (event: GestureEvent, node?: FrameNode) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines the PageInfo type.
|
||||||
|
* The value of routerPageInfo indicates the information of the router page, or undefined if the
|
||||||
|
* frameNode does not have router page information. And the value of navDestinationInfo indicates
|
||||||
|
* the information of the navDestination, or undefined if the frameNode does not have navDestination
|
||||||
|
* information.
|
||||||
|
*
|
||||||
|
* @interface PageInfo
|
||||||
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
||||||
|
* @crossplatform
|
||||||
|
* @since 12
|
||||||
|
*/
|
||||||
|
export interface PageInfo {
|
||||||
|
/**
|
||||||
|
* the property of router page information.
|
||||||
|
*
|
||||||
|
* @type { ?observer.RouterPageInfo }
|
||||||
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
||||||
|
* @since 12
|
||||||
|
*/
|
||||||
|
routerPageInfo?: observer.RouterPageInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the property of navDestination information.
|
||||||
|
*
|
||||||
|
* @type { ?observer.NavDestinationInfo }
|
||||||
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
||||||
|
* @since 12
|
||||||
|
*/
|
||||||
|
navDestinationInfo?: observer.NavDestinationInfo;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register callbacks to observe ArkUI behavior.
|
* Register callbacks to observe ArkUI behavior.
|
||||||
*
|
*
|
||||||
@ -2643,6 +2675,33 @@ export class UIContext {
|
|||||||
*/
|
*/
|
||||||
getFrameNodeByUniqueId(id: number): FrameNode | null;
|
getFrameNodeByUniqueId(id: number): FrameNode | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get page information of the frameNode with uniqueId.
|
||||||
|
*
|
||||||
|
* @param { number } id - The uniqueId of the target FrameNode.
|
||||||
|
* @returns { PageInfo } - The page information of the frameNode with the target uniqueId, includes
|
||||||
|
* navDestination and router page information. If the frame node does not have navDestination and
|
||||||
|
* router page information, it will return an empty object.
|
||||||
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
||||||
|
* @crossplatform
|
||||||
|
* @atomicservice
|
||||||
|
* @since 12
|
||||||
|
*/
|
||||||
|
getPageInfoByUniqueId(id: number): PageInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get navigation information of the frameNode with uniqueId.
|
||||||
|
*
|
||||||
|
* @param { number } id - The uniqueId of the target FrameNode.
|
||||||
|
* @returns { observer.NavigationInfo | undefined } - The navigation information of the frameNode with the
|
||||||
|
* target uniqueId, or undefined if the frameNode is not existed or does not have navigation information.
|
||||||
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
||||||
|
* @crossplatform
|
||||||
|
* @atomicservice
|
||||||
|
* @since 12
|
||||||
|
*/
|
||||||
|
getNavigationInfoByUniqueId(id: number): observer.NavigationInfo | undefined;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get FocusController.
|
* Get FocusController.
|
||||||
* @returns { FocusController } the FocusController
|
* @returns { FocusController } the FocusController
|
||||||
|
Loading…
Reference in New Issue
Block a user