fix: currentRoute

This commit is contained in:
chenjiahan 2020-07-04 21:29:10 +08:00
parent 18a3e80864
commit 7346f20e96
2 changed files with 4 additions and 2 deletions

View File

@ -7,7 +7,7 @@ import { iframeReady, isMobile } from '.';
window.syncPath = function() {
const router = window.vueRouter;
const isInIframe = window !== window.top;
const currentDir = router.history.current.path;
const currentDir = router.currentRoute.value.path;
if (isInIframe) {
window.top.replacePath(currentDir);

View File

@ -1,6 +1,7 @@
<template>
<div class="app">
<van-doc
v-if="config"
:lang="lang"
:config="config"
:versions="versions"
@ -73,7 +74,8 @@ export default {
},
created() {
this.setTitle();
// TODO
// this.setTitle();
},
mounted() {