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