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;