1.0.11 • Published 2 years ago
@uni/navigate v1.0.11
navigate
Route navigation capability implementation.
Support
Install
$ npm install @uni/navigate --save
Usage
import navigate from '@uni/navigate';
// How to use it in quickapp
// import chooseImage from '@uni/navigate/lib/quickapp;
navigate.push({
url: 'https://www.taobao.com/'
}).then(() => {
});
navigate.back().then(() => {
});
navigate.go({
step: -1
}).then(() => {
});
navigate.replace({
url: 'https://www.taobao.com/'
}).then(() => {
});
navigate.reLaunch({
url: 'https://www.taobao.com/'
}).then(() => {
});
Methods
push(options)
Arguments
Property | Type | Description | required | Default |
---|---|---|---|---|
options | object | Push function arguments | true | - |
options.url | string | The page URL. | true | - |
options.success | Function | The callback function for a successful API call | false | - |
options.fail | Function | The callback function for a failed API call | false | - |
options.complete | Function | The callback function used when the API call completed (always executed whether the call succeeds or fails) | 否 | - |
back(options)
Arguments
Property | Type | Description | required | Default |
---|---|---|---|---|
options | object | Pop function arguments | false | - |
options.success | Function | The callback function for a successful API call | false | - |
options.fail | Function | The callback function for a failed API call | false | - |
options.complete | Function | The callback function used when the API call completed (always executed whether the call succeeds or fails) | 否 | - |
go(options)
Arguments
Property | Type | Description | required | Default |
---|---|---|---|---|
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.success | Function | The callback function for a successful API call | false | - |
options.fail | Function | The callback function for a failed API call | false | - |
options.complete | Function | The callback function used when the API call completed (always executed whether the call succeeds or fails) | 否 | - |
replace(options)
Arguments
Property | Type | Description | required | Default |
---|---|---|---|---|
options | object | Go function arguments | true | - |
options.url | number | The page URL. | true | - |
options.success | Function | The callback function for a successful API call | false | - |
options.fail | Function | The callback function for a failed API call | false | - |
options.complete | Function | The callback function used when the API call completed (always executed whether the call succeeds or fails) | 否 | - |
reLaunch(options)
Arguments
Property | Type | Description | required | Default |
---|---|---|---|---|
options | object | Go function arguments | true | - |
options.url | number | The page URL. | true | - |
options.success | Function | The callback function for a successful API call | false | - |
options.fail | Function | The callback function for a failed API call | false | - |
options.complete | Function | The callback function used when the API call completed (always executed whether the call succeeds or fails) | 否 | - |
switchTab(options)
Does not support web
Arguments
Property | Type | Description | required | Default |
---|---|---|---|---|
options | object | Function options | Yes | - |
options.url | string | Page url | Yes | - |
options.success | Function | Callback on success | No | - |
options.fail | Function | Callback on fail | No | - |
options.complete | Function | Callback on complete | No | - |
1.0.11
2 years ago
1.0.9
4 years ago
1.0.10
4 years ago
1.0.10-beta
4 years ago
1.0.10-beta1
4 years ago
1.0.9-beta
4 years ago
1.0.8
4 years ago
1.0.7
4 years ago
1.0.6
4 years ago
1.0.5
4 years ago
1.0.5-beta1
4 years ago
1.0.5-beta
4 years ago
1.0.4
4 years ago
1.0.4-beta1
4 years ago
1.0.4-beta
4 years ago
1.0.3
4 years ago
1.0.2
4 years ago
1.0.1
4 years ago
1.0.0
4 years ago
1.0.0-beta1
4 years ago
1.0.0-beta
4 years ago