set scrollnav

This commit is contained in:
jiaming 2018-12-17 16:48:57 +08:00
parent b553ef8e16
commit 4c1af63c91
1 changed files with 7 additions and 0 deletions

View File

@ -13,6 +13,13 @@ const View = r => require.ensure([], () => r(require('../views/dataView/index.vu
Vue.use(Router)
export default new Router({
scrollBehavior (to, from, savedPosition) {
if (to.hash) {
return {
selector: to.hash
}
}
},
routes: [
{
path: '/demo',