Scrolltotop added to plugin

pull/3420/head
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> </template>
<script> <script>
import Quill from "quill"; //import Quill from "quill";
export default { export default {
name: 'Editor', name: 'Editor',

View File

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

View File

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

View File

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

View File

@ -152,7 +152,7 @@ nuxtApp.vueApp.component('Dropdown', Dropdown);
/* nuxtApp.vueApp.component('Editor', Editor); */ /* nuxtApp.vueApp.component('Editor', Editor); */
nuxtApp.vueApp.component('Fieldset', Fieldset); nuxtApp.vueApp.component('Fieldset', Fieldset);
nuxtApp.vueApp.component('FileUpload', FileUpload); nuxtApp.vueApp.component('FileUpload', FileUpload);
nuxtApp.vueApp.component('FullCalendar', FullCalendar); //nuxtApp.vueApp.component('FullCalendar', FullCalendar);
nuxtApp.vueApp.component('Image', Image); nuxtApp.vueApp.component('Image', Image);
nuxtApp.vueApp.component('InlineMessage', InlineMessage); nuxtApp.vueApp.component('InlineMessage', InlineMessage);
nuxtApp.vueApp.component('Inplace', Inplace); 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',
},
}