♻️ (music) change music var name
This commit is contained in:
@@ -6,14 +6,14 @@ Vue.use(Vuex)
|
||||
|
||||
export interface State {
|
||||
interval: number
|
||||
withMusic: boolean
|
||||
hasMusic: boolean
|
||||
dev1: string | null
|
||||
dev2: string | null
|
||||
}
|
||||
|
||||
export interface RootActions extends ActionTree<State, State> {
|
||||
setInterval: (ctx: ActionContext<State, State>, payload: number) => void
|
||||
setWithMusic: (ctx: ActionContext<State, State>, payload: boolean) => void
|
||||
setHasMusic: (ctx: ActionContext<State, State>, payload: boolean) => void
|
||||
setDev1: (ctx: ActionContext<State, State>, payload: string) => void
|
||||
setDev2: (ctx: ActionContext<State, State>, payload: string) => void
|
||||
}
|
||||
@@ -31,13 +31,13 @@ const SET_DEV_2 = 'SET_DEV_2'
|
||||
const store = new Vuex.Store<State>({
|
||||
state: {
|
||||
interval: 5,
|
||||
withMusic: true,
|
||||
hasMusic: true,
|
||||
dev1: null,
|
||||
dev2: null
|
||||
},
|
||||
getters: {
|
||||
interval: ({ interval }) => interval,
|
||||
withMusic: ({ withMusic }) => withMusic,
|
||||
hasMusic: ({ hasMusic }) => hasMusic,
|
||||
dev1: ({ dev1 }) => dev1,
|
||||
dev2: ({ dev2 }) => dev2
|
||||
},
|
||||
@@ -45,8 +45,8 @@ const store = new Vuex.Store<State>({
|
||||
[SET_INTERVAL](state, interval: number) {
|
||||
state.interval = interval
|
||||
},
|
||||
[WITH_MUSIC](state, withMusic: boolean) {
|
||||
state.withMusic = withMusic
|
||||
[WITH_MUSIC](state, hasMusic: boolean) {
|
||||
state.hasMusic = hasMusic
|
||||
},
|
||||
[SET_DEV_1](state, dev1: string) {
|
||||
state.dev1 = dev1
|
||||
@@ -61,8 +61,8 @@ const store = new Vuex.Store<State>({
|
||||
commit(SET_INTERVAL, interval)
|
||||
}
|
||||
},
|
||||
setWithMusic({ commit }, withMusic: boolean) {
|
||||
commit(WITH_MUSIC, withMusic)
|
||||
setHasMusic({ commit }, hasMusic: boolean) {
|
||||
commit(WITH_MUSIC, hasMusic)
|
||||
},
|
||||
setDev1({ commit }, dev1: string) {
|
||||
commit(SET_DEV_1, dev1)
|
||||
|
||||
Reference in New Issue
Block a user