关于跳转页面及数据的传递
<navigator open-type="navigate" url="tab1?id=11111">默认跳转,跳转相应页面,可返回</navigator>
<navigator open-type="redirect" url="tab3">关闭当前页面,跳转到相应页面</navigator>
<!-- <navigator open-type="navigateBack" >返回上一页</navigator> -->
<navigator open-type="reLaunch" url="tab3">跳转到相应页面,并关闭所有页面</navigator>
<navigator open-type="switchTab" url="tab2">只能跳转到tab页面</navigator>
1.navigate :默认跳转,跳转相应页面,可返回
redirect:关闭当前页面,跳转到相应页面
reLaunch:跳转到相应页面,并关闭所有页面
navigateBack:当有上一页的时候,返回上一页
switchTab:只能跳转到tab页面
2.跳转到话。是在url上加问号:例如
<navigator open-type="navigate" url="tab1?id=11111"></navigator>
然后在跳转到的页面,用props接收 例如
<script>
export default {
props:['id']
}
</script>