universal-navigate
TypeScript icon, indicating that this package has built-in type declarations

1.2.1 • Public • Published

universal-navigate npm

Route navigation capability implementation.

Support

browser weex miniApp wechatMiniprogram quickApp bytedanceMicroApp

Install

$ npm install universal-navigate --save

Usage

import Navigate from 'universal-navigate';
 
// How to use it in quickapp
// import chooseImage from 'universal-navigate/lib/quickapp;
 
Navigate.push({
  url: 'https://www.taobao.com/',
  animated: true // Only supported in weex
}).then(() => {
});
 
Navigate.pop({
  animated: false // Only supported in weex
}).then(() => {
});
 
Navigate.go({
  step: -1,
  animated: false // Only supported in weex
}).then(() => {
});

Methods

push(options)

Arguments

Property Type Description required Default Supported
options object Push function arguments true -
options.url string The page URL. true -
options.animated boolean Support only in weex, whether animated effects are required when pages are pressed false true weex

pop(options)

Arguments

Property Type Description required Default Supported
options object Pop function arguments false -
options.animated boolean Support only in weex, whether animated effects are required when pages are pressed false true weex

go(options)

Arguments

Property Type Description required Default Supported
options object Go function arguments true -
options.step number The number of forward steps is positive and only supports the web, and the number of backward steps is negative. true -
options.animated boolean Support only in weex, whether animated effects are required when pages are pressed false true weex

Versions

Current Tags

Version History

Package Sidebar

Install

npm i universal-navigate

Weekly Downloads

4

Version

1.2.1

License

BSD-3-Clause

Unpacked Size

42.2 kB

Total Files

46

Last publish

Collaborators

  • zeroling
  • rax-publisher