baseui/src/main.js

48 lines
682 B
JavaScript
Raw Normal View History

2017-08-24 11:16:07 +02:00
import Vue from 'vue';
import Vuex from 'vuex';
import VueRouter from 'vue-router';
import Navigation from './components/navigation.vue';
import Dashboard from './components/dashboard.vue';
import Userlist from './components/userlist.vue';
Vue.use(Vuex);
Vue.use(VueRouter);
const store = new Vuex.Store({
state: {
count: 0
},
mutations: {
increment (state) {
state.count++
}
}
})
const routes = [
{
path: '/',
component: Dashboard
},
{
path: '/userlist',
component: Userlist
}
];
const router = new VueRouter({
routes
});
new Vue({
el: '#vue-app',
components: {
Navigation
},
store,
router,
data: {
}
});