ion-nav-link
导航链接用于导航到指定的组件。可以通过 forward、back 或作为 root 组件导航到该组件。
¥A navigation link is used to navigate to a specified component. The component can be navigated to by going forward, back or as a root component.
是调用导航控制器上的 push()、pop()、setRoot() 方法的元素形式。
¥It is the element form of calling the push(), pop(), and setRoot() methods on the navigation controller.
有关详细信息,请参阅 nav 文档。
¥See the nav documentation for more information.
属性
¥Properties
component
| Description | Component to navigate to. Only used if the routerDirection is "forward" or "root". |
| Attribute | component |
| Type | Function | HTMLElement | ViewController | null | string | undefined |
| Default | undefined |
componentProps
| Description | Data you want to pass to the component as props. Only used if the "routerDirection" is "forward" or "root". |
| Attribute | component-props |
| Type | undefined | { [key: string]: any; } |
| Default | undefined |
routerAnimation
| Description | The transition animation when navigating to another page. |
| Attribute | router-animation |
| Type | ((baseEl: any, opts?: any) => Animation) | undefined |
| Default | undefined |
routerDirection
| Description | The transition direction when navigating to another page. |
| Attribute | router-direction |
| Type | "back" | "forward" | "root" |
| Default | 'forward' |
事件
¥Events
No events available for this component.
方法
¥Methods
No public methods available for this component.
CSS 阴影部分
¥CSS Shadow Parts
No CSS shadow parts available for this component.
CSS 自定义属性
¥CSS Custom Properties
No CSS custom properties available for this component.
插槽
¥Slots
No slots available for this component.