navigator

Page link.

Attribute NameTypeDefaultDescriptionMinimum Version
open-typeStringnavigatejump mode
hover-classStringnoneadded class upon click
hover-start-timeNumberclick status shown in certain time after clicking, in milliseconds
hover-stay-timeNumberclicking status retention time after release, in milliseconds
urlStringjump link within application

open-type Effective Value

Attribute NameDescriptionMinimum Version
navigatecorresponding to my.navigateTo function
redirectcorresponding to my.redirectTo function
switchTabcorresponding to my.switchTab function
navigateBackcorresponding to my.navigateBack function

Sample Code

copy
<!-- sample.axml -->
<view class="btn-area">
  <navigator url="/page/navigate/navigate?title=navigate" hover-class="navigator-hover">Jump to new page</navigator>
  <navigator url="../../redirect/redirect/redirect?title=redirect" open-type="redirect" hover-class="other-navigator-hover">Open in current page</navigator>
  <navigator url="/page/index/index" open-type="switchTab" hover-class="other-navigator-hover">Switch Tab</navigator>
</view>