Skip to main content

navigator

Navigator.

Example

index.bxml

<view>
<navigator url="/navigate/navigate?title=navigate" hover-class="navigator-hover">jump to new page</navigator>
<navigator url="../redirect/redirect?title=redirect" open-type="redirect" hover-class="other-navigator-hover">open in current page</navigator>
</view>

/navigate/navigate.bxml

<view> Click on the upper left corner to return to the previous page </view>

/redirect/redirect.bxml

<view> Click on the upper left corner to return to the previous page </view>

Bug & Tip

  • tip: navigator-hover Default is {background-color: rgba(0, 0, 0, 0.1) opacity: 0.7}, navigator Child node background color should be transparent

Props

NameTypeDescriptionDefault
targetTargetOn which target to jump, default current Mini Program"self"
urlstringJump links within the current Mini Program
app-idstringWhen target="miniProgram" The Mini Program that you want to open appId
pathstringWhen target="miniProgram" Open the page path, if empty then open the home page
extra-dataobjectWhen target="miniProgram" data that needs to be passed to the target Mini Program, which is available in the App.onLaunch(),App.onShow() Get this data from.details
versionNavigationMPChannelWhen target="miniProgram" version of the Mini Program to be opened"published"
typeNavigationMPTypedefined in Nezha deeplink"app"
revstring 

Events

NameDescription
bindsuccess
bindfail
bindcomplete
bindtap