var obj1 = {
5: [
{title: 'test 1', props: [4,5]},
{title: 'test 2', props: [1,2,5]},
],
2: [
{title: 'test 3', props: [2,4]},
],
...
}
var arr2 = [
['5', [
{title: 'test 1', props: [4,5]},
{title: 'test 2', props: [1,2,5]}
]],
['2', [
{title: 'test 3', props: [2,4]}
]],
...
]
<md-table @md-selected="setNotes">
methods: {
...mapMutations({
setNotes: 'SET_NOTES'
})
}
mutations: {
SET_NOTES(state, notes) {
state.notes = [...notes]
}
}