mirror of
https://iceshrimp.dev/Crimekillz/jointrashposs.git
synced 2024-11-23 01:13:49 +01:00
parent
077f18b90b
commit
e2438ba03e
5
app.vue
5
app.vue
@ -20,11 +20,6 @@ router.beforeEach((to, from) => {
|
||||
}
|
||||
})
|
||||
|
||||
nuxtApp.hook('page:loading:start', () => {
|
||||
if (!NProgress.isStarted()) {
|
||||
NProgress.start();
|
||||
}
|
||||
});
|
||||
nuxtApp.hook('page:loading:end', () => {
|
||||
nextTick(() => {
|
||||
setTimeout(() => {
|
||||
|
34
app/router.options.ts
Normal file
34
app/router.options.ts
Normal file
@ -0,0 +1,34 @@
|
||||
import type { RouterConfig } from '@nuxt/schema'
|
||||
|
||||
export default <RouterConfig> {
|
||||
scrollBehavior(to, from, savedPosition) {
|
||||
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 };
|
||||
|
||||
case 'docs':
|
||||
if (width < 1024) {
|
||||
return { top: 128, el: to.hash };
|
||||
} else {
|
||||
return { top: 80, el: to.hash };
|
||||
}
|
||||
|
||||
case 'slim':
|
||||
case 'tools':
|
||||
return { top: 80, el: to.hash };
|
||||
|
||||
default:
|
||||
if (width < 1024) {
|
||||
return { top: 80, el: to.hash };
|
||||
} else {
|
||||
return { top: 96, el: to.hash };
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
@ -14,6 +14,7 @@ export default <Config> {
|
||||
],
|
||||
safelist: [
|
||||
'scroll-pt-20',
|
||||
'scroll-pt-24',
|
||||
'scroll-pt-32',
|
||||
'lg:scroll-pt-4',
|
||||
'lg:scroll-pt-20',
|
||||
|
Loading…
Reference in New Issue
Block a user