import { NavigationGuard, Route } from 'vue-router' export const setTitle: NavigationGuard = (to, from, next) => { document.title = to?.meta?.title ?? 'demo' next() } export const qoeHook: NavigationGuard = (to: Route, from: Route, next: any) => { if (from.matched.length > 0) { const origin = window.location.host + '/#' + from.fullPath // qoe.performance(origin) next() } else { next() } next(); }