优化:刷新页签 api 增加路由对象参数支持;

optimize: add support of route parameter for refresh page api;
This commit is contained in:
chenghongxing 2020-11-29 14:33:38 +08:00
parent 9842434405
commit 76985657e7

View File

@ -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) {