c
Size: a a a
c
AS
N
router: {
scrollBehavior (to) {
if (to.hash) {
window.location.hash = ''
return window.scrollTo({
top: document.querySelector(to.hash).offsetTop - (window.innerHeight * 0.2),
behavior: 'smooth',
})
}
return window.scrollTo({ top: 0, behavior: 'smooth' })
},
},
AN
c
c
AS
AS
AS
AN
👑R
T
T
СК
(state, post) => {
let index = state.posts.indexOf(post);
if (index !== -1) {
state.posts.splice(index, 1, post);
} else {
state.posts.push(post);
}
}
T
N
N