;`;
return {
widgetScript: str
}
},
methods: {
// scrollFix: function(hashbang)
// {
// location.hash = hashbang;
// }
}
});
// const DocsPage = Vue.component('doc-page',{
// template: '#doc-page'
// });
const routes = [
{ path: '/docs', component: DocsPage },
// { path: '/noticias', component: ArticleList },
{ path: '/', component: Home }
];
const router = new VueRouter({
routes,
scrollBehavior(to, from, savedPosition) {
if (to.hash) {
VueScrollTo.scrollTo(to.hash, 700);
return { selector: to.hash }
} else if (savedPosition) {
return savedPosition;
} else {
return { x: 0, y: 0 }
}
}
})
var app = new Vue({
el: '#app',
router
});