navigator组件(相当于a标签)

  navigator组件:页面链接;

  navigator组件属性:

    target:类型  字符串  在哪个目标上发生跳转,默认当前小程序

      属性值:self  当前小程序

          miniProgram  其他小程序

    url:类型  字符串  当前小程序内的跳转链接

    open-type:类型  字符串  跳转方式

      属性值:navigate  对应的 wx.navigateTo 或 wx.navigateToMiniProgram 的功能

          redirect    对应 wx.redirectTo 的功能

          switchTab  对应 wx.switchTab 的功能

          reLaunch  对应 wx.reLaunch 的功能

          navigateBack  对应 wx.navigateBack 的功能

          exit  退出小程序,target="miniProgram" 时生效 

    delta:类型  数字  表示回退的层数,当 open-type ='navigateBack' 时有效

    app-id:类型  字符串  当 target="miniProgram" 时有效,要打开的小程序 appId 

    path:类型  字符串  当 target="miniProgram" 时有效,打开的页面路径,如果为空则打开首页

    extra-data:类型  对象  当 target="miniProgram" 时有效,需要传递给目标小程序的数据,目标小程序可在  App.onLaunch(),App.onShow() 中获取到这份数据

    version:类型  字符串  要打开小程序的版本 target="miniProgram"

    hover-class:类型  字符串  点击的样式类

    hover-stop-propagation:类型  布尔  阻止本节点的祖先节点的样式类

    hover-start-time:类型  数字  按住后多久出现点击态

    hover-stay-time:类型  数字  手指松开后点击态保持多长时间

  事件:

    bindsuccess:当 target="miniProgram" 时有效,跳转小程序成功 

    bindfail:跳转小程序失败,当 target="miniProgram" 时有效

    bindcomplete:跳转小程序完成,当 target="miniProgram" 时有效

posted on 2019-05-28 20:08  Web引领者  阅读(2959)  评论(0编辑  收藏  举报