1) 修改page
This commit is contained in:
parent
979a862672
commit
a86dd06885
|
@ -200,6 +200,23 @@ const UseKeyList = (props, ref) => {
|
|||
const key_query_el = useRef(null);
|
||||
const plan_list_el = useRef(null);
|
||||
|
||||
const resParam = () => {
|
||||
return new Promise((res, rej) => {
|
||||
const { queryParams, limit, page } = state;
|
||||
return {
|
||||
...queryParams,
|
||||
limit,
|
||||
page,
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
const tetxajax = () => {
|
||||
resParam().then((res) => {
|
||||
console.log("请求方法....", res);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取table 数据
|
||||
* data 兼容 react state 无同步问题!!!!!!!!!!!
|
||||
|
@ -275,6 +292,7 @@ const UseKeyList = (props, ref) => {
|
|||
limit: 10,
|
||||
hash: null,
|
||||
};
|
||||
dispatch({ type: "setPages", payload: { page: 1, limit: 10 } });
|
||||
getTable(data);
|
||||
};
|
||||
|
||||
|
@ -535,6 +553,8 @@ const UseKeyList = (props, ref) => {
|
|||
const onPageChange = (e) => {
|
||||
dispatch({ type: "setPages", payload: { page: e } });
|
||||
getTable({ page: e, hash: state.hash });
|
||||
|
||||
tetxajax();
|
||||
};
|
||||
|
||||
const onCountChange = (e) => {
|
||||
|
|
Loading…
Reference in New Issue