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() { window.syncPath = function() {
const router = window.vueRouter; const router = window.vueRouter;
const isInIframe = window !== window.top; const isInIframe = window !== window.top;
const currentDir = router.history.current.path; const currentDir = router.currentRoute.value.path;
if (isInIframe) { if (isInIframe) {
window.top.replacePath(currentDir); window.top.replacePath(currentDir);

View File

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