66 lines
1.4 KiB
JavaScript
Raw Normal View History

2021-05-20 15:18:43 +03:00
require('./bootstrap');
import Vue from 'vue';
import VueRouter from 'vue-router';
import DashboardPlugin from './plugins/dashboard-plugin';
Vue.use(DashboardPlugin);
Vue.use(VueRouter);
2021-05-28 15:45:19 +03:00
import Wizard from './Wizard.vue';
2021-05-20 15:18:43 +03:00
import Company from './views/wizard/Company.vue';
import Currencies from './views/wizard/Currencies.vue';
import Finish from './views/wizard/Finish.vue';
var global_path = new URL(url).protocol + '//' + window.location.host;
var base_path = url.replace(global_path, '');
const router = new VueRouter({
mode: 'history',
2021-05-20 15:18:43 +03:00
base: base_path,
2021-05-20 15:18:43 +03:00
routes: [
2021-09-08 11:40:03 +03:00
{
path: '/wizard',
name: 'Wizard',
component: Company
},
{
path: '/wizard/companies',
name: 'Company',
component: Company
},
{
path: '/wizard/currencies',
name: 'Currencies',
component: Currencies
},
{
path: '/wizard/finish',
name: 'Finish',
component: Finish
}
],
2021-09-08 11:40:03 +03:00
linkActiveClass: 'active',
2021-09-08 11:40:03 +03:00
scrollBehavior: (to, from ,savedPosition) => {
if (savedPosition) {
return savedPosition;
}
if (to.hash) {
return { selector: to.hash };
}
return { x: 0, y: 0 };
2021-05-20 15:18:43 +03:00
}
});
new Vue({
2021-09-08 11:40:03 +03:00
el : '#app',
router,
render: h => h(Wizard),
2021-05-20 15:18:43 +03:00
});