Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

weiyi-vue-navigate

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

weiyi-vue-navigate

微易app跳转

  • 1.1.5
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

app导航库

lib主要解决在h5中各种跳转(原生,h5)等问题,旨在简化操作

如何使用

目前仅支持 webpack, 并且开启了es6的代码转换功能使用

安装

#切换到微易仓库
npm install weiyi-vue-navigate

使用

import navigate from 'weiyi-vue-navigate'

//跳h5
navigate.gotoUrl('http://baidu.com')
//跳原生
navigate.gotoNative('redBag')
//增加webview 回调
navigate.addAppBackFun(function(){
    ...
})

gotoUrl(url, params)

  • url[string] 要跳转的url地址
  • params[Object] url的querystring参数即 (e.g. {a:123} ==> baidu.com?a=123)

gotoNative(nativeName, params)

  • nativeName[string] 参考 native.js 文件
  • params[Object] 跳原生需要带的参数 参考 native.js 文件

addAppBackFun(fun)

  • fun [Function] app的webview跳出去后,再跳回来触发的事件

Note

lib在默认加载的时候会绑定onAppBackToInputPage事件,并添加标识为,用来防止 跳原生页面多次点击会造成多次触发的问题

FAQs

Package last updated on 23 Apr 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc