提交 353b57bb 编写于 作者: Q qiang

docs: uni.navigateTo

上级 90f8085e
......@@ -77,7 +77,7 @@ onLoad: function(option) {
```
url当作参数传递的时候,如参数出现空格这样的特殊字段,只可以读取到空格前的内容,后面内容丢失导致传递失败,可使用[窗体通信](https://uniapp.dcloud.io/collocation/frame/communication)[全局变量](https://ask.dcloud.net.cn/article/35021),或`encodeURIComponent`等多种方式解决,如下为`encodeURIComponent`示例。
url有长度限制,太长的字符串会传递失败,可改用[窗体通信](https://uniapp.dcloud.io/collocation/frame/communication)[全局变量](https://ask.dcloud.net.cn/article/35021),另外参数中出现空格等特殊字符时需要对参数进行编码,如下为使用`encodeURIComponent`对参数进行编码的示例。
```html
<navigator :url="'/pages/test/test?item='+ encodeURIComponent(JSON.stringify(item))"></navigator>
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册