From a47b0c87bb456dd08fc8fa3ee62efed587375436 Mon Sep 17 00:00:00 2001 From: zhenyuWang <13641039885@163.com> Date: Wed, 7 Sep 2022 17:42:48 +0800 Subject: [PATCH] =?UTF-8?q?update(eventChannel):=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E5=85=A8=E7=AB=AF=E9=80=9A=E8=BF=87this.getOpenerEventChannel(?= =?UTF-8?q?)=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/api/router.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/docs/api/router.md b/docs/api/router.md index 78d473d03..0de24e1c3 100644 --- a/docs/api/router.md +++ b/docs/api/router.md @@ -65,12 +65,7 @@ uni.navigateTo({ // 在test.vue页面,向起始页通过事件传递数据 onLoad: function(option) { - // #ifdef APP-NVUE - const eventChannel = this.$scope.eventChannel; // 兼容APP-NVUE - // #endif - // #ifndef APP-NVUE const eventChannel = this.getOpenerEventChannel(); - // #endif eventChannel.emit('acceptDataFromOpenedPage', {data: 'data from test page'}); eventChannel.emit('someEvent', {data: 'data from test page for someEvent'}); // 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据 @@ -96,7 +91,6 @@ onLoad: function (option) { * 页面跳转路径有层级限制,不能无限制跳转新页面 * 跳转到 tabBar 页面只能使用 switchTab 跳转 * 路由API的目标页面必须是在pages.json里注册的vue页面。如果想打开web url,在App平台可以使用 [plus.runtime.openURL](http://www.html5plus.org/doc/zh_cn/runtime.html#plus.runtime.openURL)或web-view组件;H5平台使用 window.open;小程序平台使用web-view组件(url需在小程序的联网白名单中)。在hello uni-app中有个组件ulink.vue已对多端进行封装,可参考。 -* APP-NVUE平台 vue2 暂不支持以`this.getOpenerEventChannel()`方式获取`eventChannel`,请换用`this.$scope.eventChannel`来获取,具体方式请参考上述示例。 ### uni.redirectTo(OBJECT) -- GitLab