mirror of
https://github.com/youzan/vant.git
synced 2025-10-16 08:00:34 +00:00
docs: add more links (#4420)
This commit is contained in:
@@ -21,16 +21,16 @@ importAll(docs, docsFromPackages);
|
||||
const router = new VueRouter({
|
||||
mode: 'hash',
|
||||
routes: routes({ componentMap: docs }),
|
||||
scrollBehavior(to, from, savedPosition) {
|
||||
scrollBehavior(to) {
|
||||
if (to.hash) {
|
||||
return { selector: to.hash };
|
||||
}
|
||||
|
||||
return savedPosition || { x: 0, y: 0 };
|
||||
return { x: 0, y: 0 };
|
||||
}
|
||||
});
|
||||
|
||||
router.afterEach(path => {
|
||||
router.afterEach(() => {
|
||||
Vue.nextTick(() => window.syncPath());
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user