import store from '@/store' store.registerModule('dashboard', { namespaced: true, // State loaded when this component is first loaded. state: { test: 0 }, mutations: { updateTest (state, newVal) { state.test = newVal } }, actions: { updateTest ({ state, commit, rootState, dispatch }, newVal) { console.log(newVal) commit('updateTest', newVal) } } })
import language from '@/store/modules/language' import revision from '@/store/modules/revision' import browser from '@/store/modules/browser' import repeaters from '@/store/modules/repeaters' import parents from '@/store/modules/parents' import attributes from '@/store/modules/attributes' // mixins import formatPermalink from '@/mixins/formatPermalink' import editorMixin from '@/mixins/editor.js' // configuration Vue.use(A17Config) Vue.use(A17Notif) store.registerModule('form', form) store.registerModule('publication', publication) store.registerModule('content', content) store.registerModule('language', language) store.registerModule('revision', revision) store.registerModule('browser', browser) store.registerModule('repeaters', repeaters) store.registerModule('parents', parents) store.registerModule('attributes', attributes) // Browser Vue.component('a17-repeater', a17Repeater) Vue.component('a17-browser', a17Browser) // Form : connector fields Vue.component('a17-connectorfield', a17ConnectorField)
import A17Notif from '@/plugins/A17Notif' // Dashboard import a17ShortcutCreator from '@/components/dashboard/shortcutCreator.vue' import A17ActivityFeed from '@/components/dashboard/activityFeed.vue' import A17StatFeed from '@/components/dashboard/statFeed.vue' import A17GenericFeed from '@/components/dashboard/genericFeed.vue' // Store modules import datatable from '@/store/modules/datatable' // configuration Vue.use(A17Config) Vue.use(A17Notif) store.registerModule('datatable', datatable) /* eslint-disable no-new */ /* eslint no-unused-vars: "off" */ window.vm = new Vue({ store, // inject store to all children el: '#app', components: { 'a17-shortcut-creator': a17ShortcutCreator, 'a17-activity-feed': A17ActivityFeed, 'a17-stat-feed': A17StatFeed, 'a17-feed': A17GenericFeed }, created: function () { openMediaLibrary() }