ptut-vhost/webpack/page/home.js

39 lines
986 B
JavaScript
Raw Permalink Normal View History

/* (1) Imports
---------------------------------------------------------*/
/* (1) NPM libs */
import Vue from 'vue'
2018-02-28 11:36:54 +00:00
import VueRouter from 'vue-router'
import routes from '../routes/home'
/* (2) Vues */
import wrapper_vue from '../vue/wrapper.vue'
/* (3) Data */
require('../data/common');
require('../data/home');
/* (2) Initialisation
---------------------------------------------------------*/
2018-02-28 11:36:54 +00:00
/* (1) Init Router */
const router = new VueRouter({
mode: 'history',
routes: routes[0]
});
/* (2) Store router in gstore */
gstore.add('router', router);
/* (3) Render view */
Vue.use(VueRouter);
new Vue({
el: '#main-vue',
2018-02-28 11:36:54 +00:00
router,
render: h => h(wrapper_vue)
});
// popup test
// popup.ask({title: 'Un exemple de popup', content: "Un <b>PopUp</b> <i>sauvage</i> apparait !!<br>contenu HTML quelconque ...<br> une question, validation de suppression, etc.", action: 'Bouton d\'action', 'type': 'neutral' }, function(e){ console.log("Resultat Popup: "+!!e); });