This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from 'vue' | |
import Vuex from 'vuex' | |
Vue.use(Vuex) | |
const store = new Vuex.Store({ | |
state: { | |
count: 0 | |
}, | |
mutations: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const userModule = { | |
namespaced: true, | |
state: () => ({}), | |
mutations: {}, | |
actions: {}, | |
getters: {} | |
} | |
const organisationModule = { | |
namespaced: true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const userModule = { | |
namespaced: true, | |
state: () => ({}), | |
mutations: {}, | |
actions: { | |
'SET_USER'() {}, | |
'SET_USER_LOCATION'() {} | |
}, | |
getters: {} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// userModule.js | |
export const SET_USER = 'SET_USER' | |
export const SET_USER_LOCATION = 'SET_USER_LOCATION' | |
const userModule = { | |
namespaced: true, | |
state: () => ({}), | |
mutations: {}, | |
actions: { | |
[SET_USER]() {}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// actions | |
export const SET_USER = 'SET_USER' | |
export const SET_USER_LOCATION = 'SET_USER_LOCATION' | |
// mutations | |
// getters |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { SET_USER, SET_USER_LOCATION } from './types.js' | |
export default { | |
[SET_USER]() {}, | |
[SET_USER_LOCATION]() {} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import actions from './actions.js' | |
import mutations from './mutations.js' | |
import getters from './getters.js' | |
const state = {} | |
export default { | |
namespaced: true, | |
state, | |
actions, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from 'vue' | |
import Vuex from 'vuex' | |
// Modules import | |
import UserModule from 'modules/user' | |
import OrganisationModule from 'modules/organisation' | |
Vue.use(Vuex) | |
const state = {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.your-class-name { | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.your-class-name { | |
margin-top: 16px; | |
margin-right: 12px; | |
margin-bottom: 16px; | |
} | |
// shorthand | |
.your-class-name { | |
margin: 16px 12px; | |
} |
OlderNewer