mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix example redirect
This commit is contained in:
parent
e4075e91df
commit
6f51c93d6c
@ -9,7 +9,7 @@
|
||||
</zan-swipe>
|
||||
|
||||
</example-block><example-block title="自动轮播">
|
||||
<zan-swipe :auto-play="true">
|
||||
<zan-swipe :auto-play="true" @pagechange:end="handlePageEnd">
|
||||
<zan-swipe-item>
|
||||
<img src="https://img.yzcdn.cn/upload_files/2017/03/14/FmTPs0SeyQaAOSK1rRe1sL8RcwSY.jpeg?imageView2/2/w/980/h/980/q/75/format/webp" alt="">
|
||||
</zan-swipe-item>
|
||||
@ -33,4 +33,12 @@
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
import Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock);</script>
|
||||
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);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user