//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
import ShoppingListComponent from './components/ShoppingListComponent'
import ShoppingListTitleComponent from './components/ShoppingListTitleComponent'
import store from './vuex/store'
import { mapGetters, mapActions } from 'vuex'
import _ from 'underscore'
export default {
components: {
ShoppingListComponent,
ShoppingListTitleComponent
},
computed: mapGetters({
shoppinglists: 'getLists'
}),
methods: _.extend({}, mapActions(['populateShoppingLists', 'createShoppingList']), {
addShoppingList () {
let list = {
title: 'New Shopping List',
items: []
}
this.createShoppingList(list)
}
}),
store,
mounted () {
this.populateShoppingLists()
}
}
|