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

optimize: add support of route parameter for refresh page api;
master
chenghongxing 4 years ago
parent 75a510edbd
commit d9b5e4b766
  1. 5
      src/plugins/tabs-page-plugin.js

@ -6,8 +6,9 @@ const TabsPagePlugin = {
const event = new CustomEvent('page:close', {detail:{closeRoute, nextRoute}}) const event = new CustomEvent('page:close', {detail:{closeRoute, nextRoute}})
window.dispatchEvent(event) window.dispatchEvent(event)
}, },
$refreshPage(pageKey) { $refreshPage(route) {
const event = new CustomEvent('page:refresh', {detail:{pageKey}}) const fullPath = typeof route === 'object' ? route.fullPath : route
const event = new CustomEvent('page:refresh', {detail:{fullPath}})
window.dispatchEvent(event) window.dispatchEvent(event)
}, },
$openPage(route, title) { $openPage(route, title) {

Loading…
Cancel
Save