mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix: currentRoute
This commit is contained in:
parent
18a3e80864
commit
7346f20e96
@ -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);
|
||||||
|
@ -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() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user