navigator.md 1.9 KB
Newer Older
D
DCloud_LXH 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
## uni.navigateTo(options) @navigateto

<!-- UTSAPIJSON.navigateTo.description -->

<!-- UTSAPIJSON.navigateTo.param -->

<!-- UTSAPIJSON.navigateTo.returnValue -->

<!-- UTSAPIJSON.navigateTo.example -->

<!-- UTSAPIJSON.navigateTo.compatibility -->

<!-- UTSAPIJSON.navigateTo.tutorial -->

## uni.redirectTo(options) @redirectto

<!-- UTSAPIJSON.redirectTo.description -->

<!-- UTSAPIJSON.redirectTo.param -->

<!-- UTSAPIJSON.redirectTo.returnValue -->

<!-- UTSAPIJSON.redirectTo.example -->

<!-- UTSAPIJSON.redirectTo.compatibility -->

<!-- UTSAPIJSON.redirectTo.tutorial -->

## uni.reLaunch(options) @relaunch

<!-- UTSAPIJSON.reLaunch.description -->

<!-- UTSAPIJSON.reLaunch.param -->

<!-- UTSAPIJSON.reLaunch.returnValue -->

<!-- UTSAPIJSON.reLaunch.example -->

<!-- UTSAPIJSON.reLaunch.compatibility -->

<!-- UTSAPIJSON.reLaunch.tutorial -->

## uni.switchTab(options) @switchtab

<!-- UTSAPIJSON.switchTab.description -->

<!-- UTSAPIJSON.switchTab.param -->

<!-- UTSAPIJSON.switchTab.returnValue -->

<!-- UTSAPIJSON.switchTab.example -->

<!-- UTSAPIJSON.switchTab.compatibility -->

<!-- UTSAPIJSON.switchTab.tutorial -->

## uni.navigateBack(options?) @navigateback

<!-- UTSAPIJSON.navigateBack.description -->

<!-- UTSAPIJSON.navigateBack.param -->

<!-- UTSAPIJSON.navigateBack.returnValue -->

<!-- UTSAPIJSON.navigateBack.example -->

<!-- UTSAPIJSON.navigateBack.compatibility -->

<!-- UTSAPIJSON.navigateBack.tutorial -->

<!-- UTSAPIJSON.navigator.example -->

<!-- UTSAPIJSON.general_type.name -->

<!-- UTSAPIJSON.general_type.param -->

## Bug & Tips@tips

* ``navigateTo``, ``redirectTo`` 只能打开非 tabBar 页面。
* ``switchTab`` 只能打开 ``tabBar`` 页面。
* ``reLaunch`` 可以打开任意页面。
* 页面底部的 ``tabBar`` 由页面决定,即只要是定义为 ``tabBar`` 的页面,底部都有 ``tabBar``
* 不能在首页 ```onReady``` 之前进行页面跳转。