From 6f51c93d6ce83b8e1f5c06441af27ce83fdf97c2 Mon Sep 17 00:00:00 2001 From: cookfront Date: Mon, 27 Mar 2017 18:59:43 +0800 Subject: [PATCH] fix example redirect --- docs/examples-dist/swipe.vue | 12 ++++++++++-- docs/index.js | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/examples-dist/swipe.vue b/docs/examples-dist/swipe.vue index e107e8bf5..4ddd3719d 100644 --- a/docs/examples-dist/swipe.vue +++ b/docs/examples-dist/swipe.vue @@ -9,7 +9,7 @@ - + @@ -33,4 +33,12 @@ } \ No newline at end of file +import Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock); +export default { + methods: { + handlePageEnd(page, index) { + console.log(page, index); + } + } +}; + \ No newline at end of file diff --git a/docs/index.js b/docs/index.js index cdbb3a4cb..1a954a26b 100644 --- a/docs/index.js +++ b/docs/index.js @@ -39,7 +39,7 @@ router.beforeEach((route, redirect, next) => { window.scrollTo(0, 0); } if (isMobile()) { - window.location.replace(location.pathname + 'examples.html#' + route.path); + window.location.replace('/vue/' + 'examples.html#' + route.path); return; } document.title = route.meta.title || document.title;