Model in effects get the value of state

export default {
    namespace: 'roleManage',

    state: {
        // 角色信息
        role: {
            state: '',
            id: '',
            roleName: '',
            superTube: false,
        },
    },

    effects: {
        *saveAddRole({ payload }, { select,call, put}) { 
            // 此处 state 不单只是该模型里面的数据,包含全部,所以需state.roleManage         
            const condition = yield select(state => state.roleManage.condition);              
        },
    },

    reducers: {
    },
};

Guess you like

Origin blog.csdn.net/weixin_33755847/article/details/91007743