Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
6d488a18
U
uni-app
项目概览
DCloud
/
uni-app
2 个月 前同步成功
通知
717
Star
38705
Fork
3642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
7
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
7
Issue
7
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
6d488a18
编写于
8月 21, 2019
作者:
W
wanganxp
提交者:
GitHub
8月 21, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update navigator.md
上级
a06eaeac
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
24 addition
and
3 deletion
+24
-3
docs/component/navigator.md
docs/component/navigator.md
+24
-3
未找到文件。
docs/component/navigator.md
浏览文件 @
6d488a18
...
@@ -26,8 +26,8 @@
...
@@ -26,8 +26,8 @@
|reLaunch|对应 uni.reLaunch 的功能|头条小程序不支持|
|reLaunch|对应 uni.reLaunch 的功能|头条小程序不支持|
|navigateBack|对应 uni.navigateBack 的功能|
|
|navigateBack|对应 uni.navigateBack 的功能|
|
**注意**
**注意**
-
navigator-hover 默认为 {background-color: rgba(0, 0, 0, 0.1); opacity: 0.7;},
``<navigator>``
的子节点背景色应为透明色。
**
-
navigator-hover 默认为 {background-color: rgba(0, 0, 0, 0.1); opacity: 0.7;},
``<navigator>``
的子节点背景色应为透明色。
**
-
app-nvue 平台暂不支持
`<navigator>`
-
app-nvue 平台暂不支持
`<navigator>`
**示例**
**示例**
...
@@ -49,5 +49,26 @@
...
@@ -49,5 +49,26 @@
</template>
</template>
```
```
```
javascript
// navigate.vue页面接受参数
export
default
{
onLoad
:
function
(
option
)
{
//option为object类型,会序列化上个页面传递的参数
console
.
log
(
option
.
id
);
//打印出上个页面传递的参数。
console
.
log
(
option
.
name
);
//打印出上个页面传递的参数。
}
}
```
url有长度限制,太长的字符串会传递失败,可使用
[
窗体通信
](
https://uniapp.dcloud.io/collocation/frame/communication
)
、
[
全局变量
](
https://ask.dcloud.net.cn/article/35021
)
,或
`encodeURIComponent`
等多种方式解决,如下为
`encodeURIComponent`
示例。
```
html
<navigator
:url=
"'/pages/navigate/navigate?item='+ encodeURIComponent(JSON.stringify(item))"
></navigator>
```
```
javascript
// navigate.vue页面接受参数
onLoad
:
function
(
option
)
{
const
item
=
JSON
.
parse
(
decodeURIComponent
(
option
.
item
));
}
```
**注意**
**注意**
-
跳转tabbar页面,必须设置open-type="switchTab"
-
跳转tabbar页面,必须设置open-type="switchTab"
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录