React--点击查询列表左侧复选框仍然处于勾选状态问题解决

在获取新的数据前,清空上一次查询的数据即可。

      const result = yield call(query, payload);
      if (result.success) {
        yield put({
          type: 'saveValue',
          payload: {
            list:[],
          },
        })
        const data = result.obj;
        yield put({
          type: 'queryListSuccess',
          payload: {
            list: data.items,
            elist: [],
            epagination: {
              showSizeChanger: true,
              showQuickJumper: true,
              showTotal: total =>
                formatMessage({ id: 'common_total' }) +
                total +
                formatMessage({ id: 'common_total_pix' }),
              current: 1,
              total: null,
            },
            pagination: {
              current: Number(data.pageNum),
              pageSize: Number(data.pageSize),
              total: data.total,
            },
          },
        });

你可能感兴趣的:(react.js,前端,前端框架)