Scrolltotop added to plugin

This commit is contained in:
Bahadir Sofuoglu 2022-09-12 13:35:24 +03:00
parent 3eac7d6658
commit a6de96f5fb
9 changed files with 28 additions and 11 deletions

View file

@ -48,7 +48,7 @@
</template>
<script>
import Quill from "quill";
//import Quill from "quill";
export default {
name: 'Editor',

View file

@ -29,7 +29,7 @@ declare module '@vue/runtime-core' {
*
* Demos:
*
* - [FullCalendar](https://www.primefaces.org/primevue/showcase/#/fullcalendar)
* - [FullCalendar](https://www.primefaces.org/primevue/fullcalendar)
*
* @deprecated
*/

View file

@ -57,8 +57,7 @@ export default {
}
}
}
}
};
</script>
<style>
</style>
<style></style>

View file

@ -20,7 +20,7 @@ export default defineNuxtConfig({
rel: 'stylesheet',
href: './styles/landing/themes/lara-light-blue/theme.css'
}
]
],
},
},
css: [

View file

@ -152,7 +152,7 @@ nuxtApp.vueApp.component('Dropdown', Dropdown);
/* nuxtApp.vueApp.component('Editor', Editor); */
nuxtApp.vueApp.component('Fieldset', Fieldset);
nuxtApp.vueApp.component('FileUpload', FileUpload);
nuxtApp.vueApp.component('FullCalendar', FullCalendar);
//nuxtApp.vueApp.component('FullCalendar', FullCalendar);
nuxtApp.vueApp.component('Image', Image);
nuxtApp.vueApp.component('InlineMessage', InlineMessage);
nuxtApp.vueApp.component('Inplace', Inplace);

9
plugins/scrollToTop.js Normal file
View file

@ -0,0 +1,9 @@
export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.$router.options.scrollBehavior = (to, from, savedPosition) => {
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve({ left: 0, top: 0, behaviour: "smooth" });
}, 100);
});
};
});

9
vitest.config.js Normal file
View file

@ -0,0 +1,9 @@
import vue from '@vitejs/plugin-vue';
export default {
plugins: [vue()],
test: {
globals: true,
environment: 'jsdom',
},
}