1
0
Fork 0
mirror of https://github.com/em-squared/5e-drs.git synced 2025-10-30 21:24:18 +00:00

refonte du grimoire personnel, suivi des emplacements de sorts par niveau

This commit is contained in:
Maxime Moraine 2020-05-03 19:35:37 +02:00
parent 7cf83baed3
commit 9dae3aec37
6 changed files with 180 additions and 27 deletions

View file

@ -5,6 +5,7 @@ export default {
state: {
spells: [],
spellSlots: []
},
getters: {
@ -32,6 +33,7 @@ export default {
if(localStorage.getItem('mySpells') && localStorage.getItem('mySpells') !== undefined) {
let localStorageData = JSON.parse(localStorage.getItem('mySpells'))
state.spells = localStorageData.spells
state.spellSlots = localStorageData.spellSlots
}
},
setSpells: (state, payload) => {
@ -58,6 +60,9 @@ export default {
}
})
},
setSpellSlots: (state, payload) => {
state.spellSlots = payload
},
}
}