update
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { RouterConfig } from '@nuxt/schema'
|
||||
import type { RouterConfig } from "@nuxt/schema";
|
||||
|
||||
// https://router.vuejs.org/api/#routeroptions
|
||||
export default <RouterConfig>{
|
||||
@@ -10,8 +10,8 @@ export default <RouterConfig>{
|
||||
return {
|
||||
el: to.hash,
|
||||
top: 100,
|
||||
behavior: 'smooth',
|
||||
}
|
||||
behavior: "smooth",
|
||||
};
|
||||
}
|
||||
|
||||
// The remainder is optional but maybe useful as well
|
||||
@@ -21,8 +21,8 @@ export default <RouterConfig>{
|
||||
return {
|
||||
left: 0,
|
||||
top: 0,
|
||||
behavior: 'smooth',
|
||||
}
|
||||
behavior: "smooth",
|
||||
};
|
||||
}
|
||||
|
||||
// this will use saved scroll position on browser forward/back navigation
|
||||
@@ -31,8 +31,8 @@ export default <RouterConfig>{
|
||||
resolve({
|
||||
left: savedPosition?.left || 0,
|
||||
top: savedPosition?.top || 0,
|
||||
})
|
||||
}, 500)
|
||||
})
|
||||
});
|
||||
}, 500);
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user