update 搬迁list组件
This commit is contained in:
@@ -29,11 +29,11 @@ store.subscribe = (...args) => {
|
||||
if (path) {
|
||||
const resultState = cloneDeep(result(state, path))
|
||||
if (!isEqual(snapshot, resultState)) {
|
||||
listener.apply(this, [...args, resultState])
|
||||
listener.apply(this, [resultState, ...args])
|
||||
}
|
||||
snapshot = resultState
|
||||
} else {
|
||||
listener.apply(this, [...args, state])
|
||||
listener.apply(this, [state, ...args])
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -11,7 +11,9 @@ const user = (state = {}, action) => {
|
||||
}
|
||||
}
|
||||
|
||||
const layout = (state = {}, action) => {
|
||||
const layout = (state = {
|
||||
siderCollapsed: false
|
||||
}, action) => {
|
||||
switch (action.type) {
|
||||
// 打开窗口
|
||||
case 'OPEN_WINDOW':
|
||||
@@ -24,7 +26,8 @@ const layout = (state = {}, action) => {
|
||||
return state
|
||||
// 侧边收起状态
|
||||
case 'TOGGLE_COLLAPSED':
|
||||
return state
|
||||
const _state = { ...state, siderCollapsed: action.siderCollapsed }
|
||||
return _state
|
||||
default:
|
||||
return state
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user