diff --git a/docs/src/components/DemoList.vue b/docs/src/components/DemoList.vue
index d493f10ca..c0bb3c819 100644
--- a/docs/src/components/DemoList.vue
+++ b/docs/src/components/DemoList.vue
@@ -9,11 +9,14 @@
中文
{{ description }}
-
+
+
+
diff --git a/docs/src/components/MobileNav.vue b/docs/src/components/MobileNav.vue
index 4d697ddd5..bcbd2060a 100644
--- a/docs/src/components/MobileNav.vue
+++ b/docs/src/components/MobileNav.vue
@@ -1,145 +1,51 @@
-
-
- {{ group.groupName }}
-
-
-
-
- -
-
-
- {{ navItem.title }}
-
-
-
-
-
-
-
-
+
+
+
+
+
diff --git a/docs/src/mobile.js b/docs/src/mobile.js
index 166932aa2..55fd79f1d 100644
--- a/docs/src/mobile.js
+++ b/docs/src/mobile.js
@@ -1,15 +1,18 @@
+import '../../packages/vant-css/src/index.css';
+import './components/nprogress.css';
import Vue from 'vue';
import VueRouter from 'vue-router';
import App from './WapApp';
import routes from './router';
import progress from 'nprogress';
-import '../../packages/vant-css/src/index.css';
import 'vant-doc/src/helper/touch-simulator';
-import './components/nprogress.css';
const router = new VueRouter({
mode: 'hash',
- routes: routes(true)
+ routes: routes(true),
+ scrollBehavior(to, from, savedPosition) {
+ return savedPosition || { x: 0, y: 0 };
+ }
});
router.beforeEach((route, redirect, next) => {
@@ -19,9 +22,6 @@ router.beforeEach((route, redirect, next) => {
router.afterEach(() => {
progress.done();
- if (router.currentRoute.name) {
- window.scrollTo(0, 0);
- }
if (!router.currentRoute.redirectedFrom) {
Vue.nextTick(() => window.syncPath());
}