From d9b5e4b766081ae5cf05df2bf3b82111cc68d772 Mon Sep 17 00:00:00 2001 From: chenghongxing <1126263215@qq.com> Date: Sun, 29 Nov 2020 14:31:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E9=A1=B5=E7=AD=BE=20api=20=E5=A2=9E=E5=8A=A0=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E5=AF=B9=E8=B1=A1=E5=8F=82=E6=95=B0=E6=94=AF=E6=8C=81=EF=BC=9B?= =?UTF-8?q?:star:=20optimize:=20add=20support=20of=20route=20parameter=20f?= =?UTF-8?q?or=20refresh=20page=20api;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugins/tabs-page-plugin.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/tabs-page-plugin.js b/src/plugins/tabs-page-plugin.js index d3c2ed2..6c9d95c 100644 --- a/src/plugins/tabs-page-plugin.js +++ b/src/plugins/tabs-page-plugin.js @@ -6,8 +6,9 @@ const TabsPagePlugin = { const event = new CustomEvent('page:close', {detail:{closeRoute, nextRoute}}) window.dispatchEvent(event) }, - $refreshPage(pageKey) { - const event = new CustomEvent('page:refresh', {detail:{pageKey}}) + $refreshPage(route) { + const fullPath = typeof route === 'object' ? route.fullPath : route + const event = new CustomEvent('page:refresh', {detail:{fullPath}}) window.dispatchEvent(event) }, $openPage(route, title) {