Skip to content
Snippets Groups Projects
Select Git revision
  • 7436e185c8484e48b4161e11b47d3fce8d463516
  • master default protected
  • ll-wf-finitions
  • b24
  • ll-workflow
  • alc-scindage-donnees-pj
  • FJ_LL_Tbl_Contrat
  • alc-docker-node
  • ll-apiplatform
  • php84
  • ll-rgpd
  • b23
  • alc-filtre-type-intervenant
  • ll-sans-mdb5
  • formules-ancienne-infra
  • ll-formules
  • alc-intervenant-dmep
  • ll-suppr-v_vol-s
  • b20
  • ll-postgresql
  • b23.0.1
  • 24.10
  • 24.9
  • 24.8
  • 24.7
  • 24.6
  • 24.5
  • 24.4
  • 24.3
  • 24.2
  • 24.1
  • 24.0
  • 23.15
  • 24.0-beta19
  • 24.0-beta18
  • 24.0-beta17
  • 24.0-beta16
  • 24.0-beta15
  • 24.0-beta14
  • 24.0-beta13
  • 23.14
41 results

EntityService.php

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    main.js 1.35 KiB
    import {createApp} from 'vue';
    import {createBootstrap} from 'bootstrap-vue-next';
    
    // on met en place le client d'UnicaenVue
    import unicaenVue from './unicaenVue';
    
    function init(vues, options)
    {
        const components = {}
    
        if (undefined === options){
            options = {};
        }
    
        for (const path in vues) {
            let compPath = path.slice(2, -4);
            let compName = compPath.replaceAll('/', '');
    
            components[compName] = vues[path].default;
        }
    
        // instantiate the Vue apps
        // Note our lookup is a wrapping div with .vue-app class
        for (const el of document.getElementsByClassName('vue-app')) {
            let app = createApp({
                template: el.innerHTML,
                components: components
            });
    
            if (undefined !== options.beforeMount){
                options.beforeMount(app);
            }
    
            //autoload de tous les composants déclarés
            if (undefined !== options.autoloads){
    
                for (const alias in options.autoloads) {
                    let compName = options.autoloads[alias].replaceAll('/', '');
                    app.component(alias, components[compName]);
                }
            }
    
            app.use(createBootstrap({components: true, directives: true}))
            app.mount(el);
    
            if (undefined !== options.afterMount){
                options.afterMount(app);
            }
        }
    }
    
    export default {
        init
    }