update 搬迁list组件

This commit is contained in:
2021-06-14 10:35:57 +08:00
parent 453ee91b22
commit 3221960ec2
10 changed files with 774 additions and 14 deletions

View File

@@ -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])
}
})
}

View File

@@ -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
}