mirror of
https://iceshrimp.dev/Crimekillz/jointrashposs.git
synced 2024-11-25 02:09:05 +01:00
(fix) ルート遷移時に上に戻らない
This commit is contained in:
parent
e2438ba03e
commit
82008e1fb8
@ -1,12 +1,10 @@
|
||||
import type { RouterConfig } from '@nuxt/schema'
|
||||
|
||||
export default <RouterConfig> {
|
||||
scrollBehavior(to, from, savedPosition) {
|
||||
scrollBehavior(to) {
|
||||
if (to.meta.layout && to.hash) {
|
||||
const width = window ? window.innerWidth : 0;
|
||||
|
||||
if (savedPosition) {
|
||||
return savedPosition;
|
||||
} else if (to.meta.layout && to.hash) {
|
||||
switch (to.meta.layout) {
|
||||
case 'blank':
|
||||
return { el: to.hash };
|
||||
|
Loading…
Reference in New Issue
Block a user