drupal-caravane/web/themes/custom/caravane/assets/js/utils/vue-setup.js

30 lines
832 B
JavaScript
Raw Normal View History

import { createApp } from 'vue';
import { createPinia } from 'pinia';
import router from '../router/router';
import Modale from '../vuejs/Modale.vue';
2024-11-14 02:31:10 +01:00
import AnimationToggle from '../vuejs/AnimationToggle.vue';
import VueImageZoomer from 'vue-image-zoomer';
import 'vue-image-zoomer/dist/style.css';
import { useContentStore } from '../stores/content';
2024-10-19 04:08:11 +02:00
import { useMapStore } from '../stores/map';
export function initVueContentModale() {
2024-11-14 02:31:10 +01:00
const pinia = createPinia();
const app = createApp(Modale)
2024-11-14 02:31:10 +01:00
.use(pinia)
.use(router)
.use(VueImageZoomer);
const store = useContentStore();
const mapStore = useMapStore();
2024-11-14 02:31:10 +01:00
app.mount('#content-modale');
const animationToggle = createApp(AnimationToggle)
.use(pinia)
.mount('#animation-toggle');
return { store, mapStore, router };
2024-11-14 02:31:10 +01:00
}