navigator

Page link

Property

TypeDefaultDescription
open-typeStringnavigateJump mode.
hover-classStringnone Added 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

Property

Description
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>