0👍
You have to move the control of your scrolling behaviour from your router scrollBehavior
handler to your component index
and there into the place that knows the logo show state is off
.
This might be:
- a Vue lifecycle hook (either
mounted
orupdated
); - or other point in this component that knows the logo state (
watch
aftercomputed
?);
As soon as you find that place (watch
) in your component you have to check if the logo state is off and do your scroll using this approach.
Source:stackexchange.com