All Products
Document Center


Last Updated: Feb 04, 2021

This section describes the navigator.

Attribute Type Default value Description Minimum version
open-type String navigate Redirection method -
hover-class String none Class attached when the URL is tapped. -
hover-start-time Number - Time when the tapping state appears after tapping and multiple events, in milliseconds -
hover-stay-time Number - The retention period of the clicked state after you release the finger, in milliseconds. -
url String - Redirection URL in an application -

open-type possible values

Attribute Description Minimum version
navigate Corresponding to the function my.navigateTo. -
redirect Corresponding to the function my.redirectTo. -
switchTab Corresponding to the function my.switchTab. -
navigateBack Corresponding to the function my.navigateBack. -

Code sample

  1. <!-- sample.axml -->
  2. <view class="btn-area">
  3. <navigator url="/page/navigate/navigate?title=navigate" hover-class="navigator-hover">redirect to new page</navigator>
  4. <navigator url="../../redirect/redirect/redirect?title=redirect" open-type="redirect" hover-class="other-navigator-hover">open link in current tab</navigator>
  5. <navigator url="/page/index/index" open-type="switchTab" hover-class="other-navigator-hover">switch tab</navigator>
  6. </view>