docs: add more links (#4420)

This commit is contained in:
neverland
2019-09-10 20:27:42 +08:00
committed by GitHub
parent a80773e19e
commit 6069d72df4
17 changed files with 28 additions and 28 deletions

View File

@@ -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());
});