fix 一些问题
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
const nav = (state = { nav: [] }, action) => {
|
||||
const defaultState = { nav: [] }
|
||||
|
||||
const nav = (state = defaultState, action) => {
|
||||
// 写入各种action对应的操作
|
||||
switch (action.type) {
|
||||
case 'SET_ANV':
|
||||
case 'SET_NAV':
|
||||
const _state = { ...state, nav: action.nav }
|
||||
return _state
|
||||
case 'RESET_NAV':
|
||||
return defaultState
|
||||
default:
|
||||
return state
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user