@@ -2,6 +2,10 @@ import types from './mutation-types'
22import Immutable from 'immutable'
33import shortid from 'js-shortid'
44
5+ const makeAction = type => {
6+ return ( { commit } , ...args ) => commit ( type , ...args )
7+ }
8+
59export default {
610 addRow ( { commit, state } , reload ) {
711 let { layoutSections } = state
@@ -67,7 +71,7 @@ export default {
6771 let _list = Immutable . fromJS ( layoutSections )
6872 commit ( types . UPDATE_LAYOUT_SECTIONS , _list . set ( activeSection , newVal ) . toJS ( ) )
6973 } ,
70- async delteColComp ( { commit, state, dispatch } , { colIndex, newVal, prop } ) {
74+ async deleteColComp ( { commit, state, dispatch } , { colIndex, newVal, prop } ) {
7175 let { layoutSections, activeSection } = state
7276 let _list = Immutable . fromJS ( layoutSections )
7377 console . log ( 1 )
@@ -123,5 +127,6 @@ export default {
123127 ] } )
124128 }
125129 commit ( types . UPDATE_ACTIVE_PROP , `default_${ _propIdx } ` )
126- }
130+ } ,
131+ resetGlobalStore : makeAction ( 'RESET_GLOBAL_STORE' )
127132}
0 commit comments