# 导航组件
# 导航组件说明
组件 | 说明 | 最低版本 |
---|---|---|
navigator | 页面链接 | 1.0.0 |
functional-page-navigator | 用于跳转插件功能页 | 不支持 |
# navigator
属性 | 类型 | 默认值 | 必填 | 说明 | 最低版本 |
---|---|---|---|---|---|
url | string | 否 | 当前小程序内的跳转链接 | ||
open-type | navigate | 否 | 跳转方式 | ||
hover-class | string | navigator-hover | 否 | 指定点击时的样式类,当hover-class="none"时,没有点击态效果 | |
hover-stay-time | number | 600 | 否 | 手指松开后点击态保留时间,单位毫秒 | |
delta | number | 1 | 否 | 当 open-type 为 'navigateBack' 时有效,表示回退的层数 | 3.0.1 |
target | string | 否 | 在哪个目标上发生跳转,默认当前小程序 | 3.0.1 | |
app-id | string | 否 | 当 target="miniProgram" 且 open-type="navigate" 时有效,要打开的小程序 appId | 3.0.1 | |
path | string | 否 | 当 target="miniProgram" 且 open-type="navigate" 时有效,打开的页面路径,如果为空则打开首页 | 3.0.1 | |
extraData | object | 否 | 当 target="miniProgram" 且 open-type="navigate/navigateBack" 时有效,需要传递给目标小程序的数据,目标小程序可在 App.onLaunch() ,App.onShow() 中获取到这份数据。 | 3.0.1 |
# open-type 的合法值
值 | 说明 | 最低版本 |
---|---|---|
navigate | 对应 navigateTo 或 navigateToMiniProgram 的功能 | |
redirect | redirectTo | |
switchTab | switchTab | |
reLaunch | reLaunch | |
navigateBack | navigateBack | |
exit | 退出小程序,target="miniProgram"时生效 |