From 3f58bd4b293602168ea6406a8ec7fd73f9d4b0a2 Mon Sep 17 00:00:00 2001 From: cookfront Date: Thu, 9 Mar 2017 21:22:25 +0800 Subject: [PATCH] fix docs --- docs/components/mobile-computed.js | 2 +- docs/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/components/mobile-computed.js b/docs/components/mobile-computed.js index fafec730d..3e0ebced2 100644 --- a/docs/components/mobile-computed.js +++ b/docs/components/mobile-computed.js @@ -7,7 +7,7 @@ export default { computed: { mobileUrl() { - return '/examples.html' + location.hash; + return location.pathname + 'examples.html' + location.hash; } }, diff --git a/docs/index.js b/docs/index.js index b194abc83..b946c1569 100644 --- a/docs/index.js +++ b/docs/index.js @@ -38,7 +38,7 @@ router.beforeEach((route, redirect, next) => { indexScrollTop = document.body.scrollTop; } if (isMobile()) { - window.location.replace('/examples.html#' + route.path); + window.location.replace(location.pathname + 'examples.html#' + route.path); return; } document.title = route.meta.title || document.title;