replace
Start from API_LEVEL
2.0
. Please refer to API_LEVEL.
Close the current page and jump to a page within the app.
Type
function replace(option: Option): void
Parameters
Option
Property | Type | Required | DefaultValue | Description | API_LEVEL |
---|---|---|---|---|---|
url | string | Y | - | path | 2.0 |
params | string|object | N | - | Parameters passed to the page onCreate lifecycle, supporting strings or standard JSON objects. If a standard JSON object is passed, the method internally converts it to a string | 2.0 |
Example
import { replace } from '@zos/router'
replace({
url: 'page/index',
params: 'type=1',
})