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>
<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

@ -4,7 +4,7 @@
<script>
import '@fullcalendar/core/vdom'; // vite support
import {Calendar} from '@fullcalendar/core';
import { Calendar } from '@fullcalendar/core';
export default {
name: 'FullCalendar',
@ -46,8 +46,8 @@ export default {
},
methods: {
initialize() {
let defaultConfig = {themeSystem: 'standard'};
let config = this.options ? {...this.options, ...defaultConfig} : defaultConfig;
let defaultConfig = { themeSystem: 'standard' };
let config = this.options ? { ...this.options, ...defaultConfig } : defaultConfig;
this.calendar = new Calendar(this.$el, config);
this.calendar.render();
@ -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',
},
}