navigator
Page link.
Attribute Name | Type | Default | Description | Minimum Version |
open-type | String | navigate | jump mode | |
hover-class | String | none | added class upon click | |
hover-start-time | Number | click status shown in certain time after clicking, in milliseconds | ||
hover-stay-time | Number | clicking status retention time after release, in milliseconds | ||
url | String | jump link within application |
open-type Effective Value
Attribute Name | Description | Minimum Version |
navigate | corresponding to my.navigateTo function | |
redirect | corresponding to my.redirectTo function | |
switchTab | corresponding to my.switchTab function | |
navigateBack | corresponding 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>